summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPer Persson <per.xb.persson@stericsson.com>2011-05-23 15:11:29 +0200
committerUlf Hansson <ulf.hansson@stericsson.com>2011-09-19 15:15:27 +0200
commitd87c5fb75b8c922fd2b7e4a16761b619bc0ff1e8 (patch)
tree1a988100d5f8f6a5fdcf298af9b513d85e177ef9
parentb690aa3af419cf88cfff95076852c5db58c28fd2 (diff)
arm: ux500: Correct FB height when triple buffer
When triple buffering is enabled, the correct virtual height shall be used when the frame buffer is dynamicaly created. Dispdev is removed for HDMI case. board-u5500-mcde is updated. ST-Ericsson ID: 341298 ST-Ericsson Linux next: Not tested, ER 282779 ST-Ericsson FOSS-OUT ID: Trivial Change-Id: Id9dac8b436a6013e5bf3a775ef93d99705663fb2 Signed-off-by: Per Persson <per.xb.persson@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/23545 Reviewed-by: Jimmy RUBIN <jimmy.rubin@stericsson.com> Reviewed-by: Marcel TUNNISSEN <marcel.tuennissen@stericsson.com>
-rw-r--r--arch/arm/mach-ux500/board-mop500-mcde.c13
-rw-r--r--arch/arm/mach-ux500/board-u5500-mcde.c16
2 files changed, 19 insertions, 10 deletions
diff --git a/arch/arm/mach-ux500/board-mop500-mcde.c b/arch/arm/mach-ux500/board-mop500-mcde.c
index d9b36fcdb81..bf4045f3965 100644
--- a/arch/arm/mach-ux500/board-mop500-mcde.c
+++ b/arch/arm/mach-ux500/board-mop500-mcde.c
@@ -43,7 +43,6 @@ static struct delayed_work work_dispreg_hdmi;
#endif
#define MCDE_NR_OF_DISPLAYS 3
-static struct mcde_display_device *displays[MCDE_NR_OF_DISPLAYS] = { NULL };
static int display_initialized_during_boot;
static int __init startup_graphics_setup(char *str)
@@ -419,7 +418,6 @@ static void delayed_work_dispreg_hdmi(struct work_struct *ptr)
{
if (mcde_display_device_register(&av8100_hdmi))
pr_warning("Failed to register av8100_hdmi\n");
- displays[TERTIARY_DISPLAY_ID] = &av8100_hdmi;
}
#endif /* CONFIG_DISPLAY_AV8100_TERTIARY */
@@ -494,16 +492,20 @@ static int display_postregistered_callback(struct notifier_block *nb,
ddev->default_pixel_format,
rotate);
- if (IS_ERR(fbi))
+ if (IS_ERR(fbi)) {
dev_warn(&ddev->dev,
"Failed to create fb for display %s\n",
ddev->name);
- else
+ goto display_postregistered_callback_err;
+ } else
dev_info(&ddev->dev, "Framebuffer created (%s)\n",
ddev->name);
}
return 0;
+
+display_postregistered_callback_err:
+ return -1;
}
static struct notifier_block display_nb = {
@@ -648,7 +650,6 @@ int __init init_display_devices(void)
ret = mcde_display_device_register(&generic_display0);
if (ret)
pr_warning("Failed to register generic display device 0\n");
- displays[0] = &generic_display0;
#endif
#ifdef CONFIG_DISPLAY_GENERIC_DSI_SECONDARY
@@ -659,7 +660,6 @@ int __init init_display_devices(void)
ret = mcde_display_device_register(&generic_subdisplay);
if (ret)
pr_warning("Failed to register generic sub display device\n");
- displays[1] = &generic_subdisplay;
#endif
#ifdef CONFIG_DISPLAY_AV8100_TERTIARY
@@ -673,7 +673,6 @@ int __init init_display_devices(void)
ret = mcde_display_device_register(&tvout_ab8500_display);
if (ret)
pr_warning("Failed to register ab8500 tvout device\n");
- displays[2] = &tvout_ab8500_display;
#endif
return ret;
diff --git a/arch/arm/mach-ux500/board-u5500-mcde.c b/arch/arm/mach-ux500/board-u5500-mcde.c
index eba695e5ed5..d1a49297965 100644
--- a/arch/arm/mach-ux500/board-u5500-mcde.c
+++ b/arch/arm/mach-ux500/board-u5500-mcde.c
@@ -163,7 +163,7 @@ static struct mcde_display_hdmi_platform_data av8100_hdmi_pdata = {
{0xffda, 0xffb6, 0x70},
{0x70, 0xffa2, 0xffee},
},
- .offset = {0x80, 0x10, 0x80},
+ .offset = {0x10, 0x80, 0x80},
}
};
@@ -234,11 +234,17 @@ static int display_postregistered_callback(struct notifier_block *nb,
virtual_width = width;
virtual_height = height * 2;
+
#ifdef CONFIG_DISPLAY_GENERIC_DSI_PRIMARY_AUTO_SYNC
if (ddev->id == PRIMARY_DISPLAY_ID)
virtual_height = height;
#endif
+#ifdef CONFIG_DISPLAY_AV8100_TRIPPLE_BUFFER
+ if (ddev->id == TERTIARY_DISPLAY_ID)
+ virtual_height = height * 3;
+#endif
+
if (ddev->id == TERTIARY_DISPLAY_ID) {
#ifdef CONFIG_MCDE_DISPLAY_HDMI_FB_AUTO_CREATE
hdmi_fb_onoff(ddev, 1, 0, 0);
@@ -251,16 +257,20 @@ static int display_postregistered_callback(struct notifier_block *nb,
ddev->default_pixel_format,
rotate);
- if (IS_ERR(fbi))
+ if (IS_ERR(fbi)) {
dev_warn(&ddev->dev,
"Failed to create fb for display %s\n",
ddev->name);
- else
+ goto display_postregistered_callback_err;
+ } else
dev_info(&ddev->dev, "Framebuffer created (%s)\n",
ddev->name);
}
return 0;
+
+display_postregistered_callback_err:
+ return -1;
}
static struct notifier_block display_nb = {