summaryrefslogtreecommitdiffstats
path: root/kernel/drivers/video/fbdev/fsl-diu-fb.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/drivers/video/fbdev/fsl-diu-fb.c')
-rw-r--r--kernel/drivers/video/fbdev/fsl-diu-fb.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/kernel/drivers/video/fbdev/fsl-diu-fb.c b/kernel/drivers/video/fbdev/fsl-diu-fb.c
index 7fa2e6f9e..fe00a07c1 100644
--- a/kernel/drivers/video/fbdev/fsl-diu-fb.c
+++ b/kernel/drivers/video/fbdev/fsl-diu-fb.c
@@ -479,7 +479,10 @@ static enum fsl_diu_monitor_port fsl_diu_name_to_port(const char *s)
port = FSL_DIU_PORT_DLVDS;
}
- return diu_ops.valid_monitor_port(port);
+ if (diu_ops.valid_monitor_port)
+ port = diu_ops.valid_monitor_port(port);
+
+ return port;
}
/*
@@ -1628,9 +1631,16 @@ static int fsl_diu_suspend(struct platform_device *ofdev, pm_message_t state)
static int fsl_diu_resume(struct platform_device *ofdev)
{
struct fsl_diu_data *data;
+ unsigned int i;
data = dev_get_drvdata(&ofdev->dev);
- enable_lcdc(data->fsl_diu_info);
+
+ fsl_diu_enable_interrupts(data);
+ update_lcdc(data->fsl_diu_info);
+ for (i = 0; i < NUM_AOIS; i++) {
+ if (data->mfb[i].count)
+ fsl_diu_enable_panel(&data->fsl_diu_info[i]);
+ }
return 0;
}
@@ -1908,6 +1918,14 @@ static int __init fsl_diu_init(void)
#else
monitor_port = fsl_diu_name_to_port(monitor_string);
#endif
+
+ /*
+ * Must to verify set_pixel_clock. If not implement on platform,
+ * then that means that there is no platform support for the DIU.
+ */
+ if (!diu_ops.set_pixel_clock)
+ return -ENODEV;
+
pr_info("Freescale Display Interface Unit (DIU) framebuffer driver\n");
#ifdef CONFIG_NOT_COHERENT_CACHE