summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorMarcus Lorentzon <marcus.xm.lorentzon@stericsson.com>2011-10-25 19:12:44 +0200
committerJonas ABERG <jonas.aberg@stericsson.com>2011-10-27 11:32:46 +0200
commit47d191541803bf372b744b5ba6d28b181e42c430 (patch)
tree356d72f27d82048bcf5798c7d0a54efcba85d91c /arch
parent1b8cbdab7d3a2182aa518cfcf445e4d0505b1a24 (diff)
mach: ux500: Make fb create code generic
fbdev create use an hmdi specific function. This patch remove that function and makes fbcreate generic and shared. ST-Ericsson ID: 369972 ST-Ericsson FOSS-OUT ID: Trivial ST-Ericsson Linux next: NA Change-Id: I8a4b148bb6a01cde74fbe7c4fb30e9d7ee77ef68 Signed-off-by: Marcus Lorentzon <marcus.xm.lorentzon@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/35244 Reviewed-by: QATOOLS Reviewed-by: QABUILD Reviewed-by: Per PERSSON <per.xb.persson@stericsson.com> Reviewed-by: Robert MARKLUND <robert.marklund@stericsson.com> Reviewed-by: Jimmy RUBIN <jimmy.rubin@stericsson.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-ux500/board-mop500-mcde.c11
-rw-r--r--arch/arm/mach-ux500/board-u5500-mcde.c11
-rw-r--r--arch/arm/mach-ux500/devices-common.c65
3 files changed, 6 insertions, 81 deletions
diff --git a/arch/arm/mach-ux500/board-mop500-mcde.c b/arch/arm/mach-ux500/board-mop500-mcde.c
index 65a3256d5b3..fd51f357faa 100644
--- a/arch/arm/mach-ux500/board-mop500-mcde.c
+++ b/arch/arm/mach-ux500/board-mop500-mcde.c
@@ -361,15 +361,10 @@ static int display_postregistered_callback(struct notifier_block *nb,
virtual_height = height * 2;
- if (ddev->id == AV8100_DISPLAY_ID) {
-#ifdef CONFIG_DISPLAY_AV8100_TRIPPLE_BUFFER
- virtual_height = height * 3;
-#endif
-#ifdef CONFIG_MCDE_DISPLAY_HDMI_FB_AUTO_CREATE
- hdmi_fb_onoff(ddev, 1, 0, 0);
-#endif
+#ifndef CONFIG_MCDE_DISPLAY_HDMI_FB_AUTO_CREATE
+ if (ddev->id == AV8100_DISPLAY_ID)
goto out;
- }
+#endif
/* Create frame buffer */
fbi = mcde_fb_create(ddev, width, height, width, virtual_height,
diff --git a/arch/arm/mach-ux500/board-u5500-mcde.c b/arch/arm/mach-ux500/board-u5500-mcde.c
index 1e5a5e6b3a1..1b5ea959511 100644
--- a/arch/arm/mach-ux500/board-u5500-mcde.c
+++ b/arch/arm/mach-ux500/board-u5500-mcde.c
@@ -168,15 +168,10 @@ static int display_postregistered_callback(struct notifier_block *nb,
virtual_height = height * 2;
- if (ddev->id == AV8100_DISPLAY_ID) {
-#ifdef CONFIG_DISPLAY_AV8100_TRIPPLE_BUFFER
- virtual_height = height * 3;
-#endif
-#ifdef CONFIG_MCDE_DISPLAY_HDMI_FB_AUTO_CREATE
- hdmi_fb_onoff(ddev, 1, 0, 0);
-#endif
+#ifndef CONFIG_MCDE_DISPLAY_HDMI_FB_AUTO_CREATE
+ if (ddev->id == AV8100_DISPLAY_ID)
goto out;
- }
+#endif
/* Create frame buffer */
fbi = mcde_fb_create(ddev, width, height, width, virtual_height,
diff --git a/arch/arm/mach-ux500/devices-common.c b/arch/arm/mach-ux500/devices-common.c
index 4d705af245e..77a8d66dd9f 100644
--- a/arch/arm/mach-ux500/devices-common.c
+++ b/arch/arm/mach-ux500/devices-common.c
@@ -16,10 +16,6 @@
#include <linux/gpio.h>
#include <linux/gpio/nomadik.h>
-#include <video/mcde_display.h>
-#include <video/mcde_display-av8100.h>
-#include <video/mcde_fb.h>
-
#include <mach/hardware.h>
#include <mach/pm.h>
@@ -168,64 +164,3 @@ void dbx500_add_gpios(resource_size_t *base, int num, int irq,
}
}
-void hdmi_fb_onoff(struct mcde_display_device *ddev,
- bool enable, u8 cea, u8 vesa_cea_nr)
-{
- struct fb_info *fbi;
- u16 w, h;
- u16 vw, vh;
- u32 rotate = FB_ROTATE_UR;
- struct display_driver_data *driver_data = dev_get_drvdata(&ddev->dev);
-
- dev_dbg(&ddev->dev, "%s\n", __func__);
- dev_dbg(&ddev->dev, "en:%d cea:%d nr:%d\n", enable, cea, vesa_cea_nr);
-
- if (enable) {
- if (ddev->enabled) {
- dev_dbg(&ddev->dev, "Display is already enabled.\n");
- return;
- }
-
- /* Create fb */
- if (ddev->fbi == NULL) {
- /* Note: change when dynamic buffering is available */
- int buffering = 2;
-
- /* Get default values */
- mcde_dss_get_native_resolution(ddev, &w, &h);
- vw = w;
- vh = h * buffering;
-
- if (vesa_cea_nr != 0)
- ddev->ceanr_convert(ddev, cea, vesa_cea_nr,
- buffering, &w, &h, &vw, &vh);
-
- fbi = mcde_fb_create(ddev, w, h, vw, vh,
- ddev->default_pixel_format, rotate);
-
- if (IS_ERR(fbi)) {
- dev_warn(&ddev->dev,
- "Failed to create fb for display %s\n",
- ddev->name);
- goto hdmi_fb_onoff_end;
- } else {
- dev_info(&ddev->dev,
- "Framebuffer created (%s)\n",
- ddev->name);
- }
- driver_data->fbdevname = (char *)dev_name(fbi->dev);
- }
- } else {
- if (!ddev->enabled) {
- dev_dbg(&ddev->dev, "Display %s is already disabled.\n",
- ddev->name);
- return;
- }
- mcde_fb_destroy(ddev);
- }
-
-hdmi_fb_onoff_end:
- return;
-}
-EXPORT_SYMBOL(hdmi_fb_onoff);
-