summaryrefslogtreecommitdiff
path: root/arch/arm/mach-ux500/board-mop500-mcde.c
diff options
context:
space:
mode:
authorPhilippe Langlais <philippe.langlais@linaro.org>2011-05-11 09:09:27 +0200
committerUlf Hansson <ulf.hansson@stericsson.com>2011-09-19 15:15:13 +0200
commit6d4c60e9470b03d9ae737c35e6732275a2cd5bfd (patch)
treedc3ce196c10f72767450a6d63d0dee7e5f4a82f8 /arch/arm/mach-ux500/board-mop500-mcde.c
parent5626e5cbf17b1030a1aba01b88bd43ff00739dc2 (diff)
mach-ux500: framebuffer: Changes to be able to compile with u5500 and u8500 both enable
Move mcde fb common part in devices-common.c Signed-off-by: Philippe Langlais <philippe.langlais@linaro.org>
Diffstat (limited to 'arch/arm/mach-ux500/board-mop500-mcde.c')
-rw-r--r--arch/arm/mach-ux500/board-mop500-mcde.c67
1 files changed, 2 insertions, 65 deletions
diff --git a/arch/arm/mach-ux500/board-mop500-mcde.c b/arch/arm/mach-ux500/board-mop500-mcde.c
index 3826fc5a337..bc7d596d88f 100644
--- a/arch/arm/mach-ux500/board-mop500-mcde.c
+++ b/arch/arm/mach-ux500/board-mop500-mcde.c
@@ -378,7 +378,7 @@ static struct mcde_port port2 = {
.hdmi_sdtv_switch = HDMI_SWITCH,
};
-struct mcde_display_hdmi_platform_data av8100_hdmi_pdata = {
+static struct mcde_display_hdmi_platform_data av8100_hdmi_pdata = {
.reset_gpio = 0,
.reset_delay = 1,
.regulator_id = NULL, /* TODO: "display_main" */
@@ -394,7 +394,7 @@ struct mcde_display_hdmi_platform_data av8100_hdmi_pdata = {
}
};
-struct mcde_display_device av8100_hdmi = {
+static struct mcde_display_device av8100_hdmi = {
.name = "av8100_hdmi",
.id = TERTIARY_DISPLAY_ID,
.port = &port2,
@@ -685,69 +685,6 @@ struct mcde_display_device *mcde_get_main_display(void)
}
EXPORT_SYMBOL(mcde_get_main_display);
-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);
-
-
module_init(init_display_devices);
#endif