summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2016-11-30 12:11:18 +0530
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2017-01-11 21:27:12 +0100
commit148e408351971128dc69fecfebac2b6cf06d68ed (patch)
tree001db73131d5b0adf093272f384b14f39e17975d /drivers
parent5db39f3e4238c727d7ad901120c7d24b9b5ba53e (diff)
video: dcu: add additional modes for DCU
Add common widescreen modes 800x480 and 1024x600. Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/fsl_dcu_fb.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/drivers/video/fsl_dcu_fb.c b/drivers/video/fsl_dcu_fb.c
index ed1aab3d2e..993309d635 100644
--- a/drivers/video/fsl_dcu_fb.c
+++ b/drivers/video/fsl_dcu_fb.c
@@ -136,6 +136,38 @@ static struct fb_videomode fsl_dcu_mode_640_480 = {
.vmode = FB_VMODE_NONINTERLACED,
};
+static struct fb_videomode fsl_dcu_mode_800_480 = {
+ .name = "800x480-60",
+ .refresh = 60,
+ .xres = 800,
+ .yres = 480,
+ .pixclock = 33260,
+ .left_margin = 216,
+ .right_margin = 40,
+ .upper_margin = 35,
+ .lower_margin = 10,
+ .hsync_len = 128,
+ .vsync_len = 2,
+ .sync = 0,
+ .vmode = FB_VMODE_NONINTERLACED,
+};
+
+static struct fb_videomode fsl_dcu_mode_1024_600 = {
+ .name = "1024x600-60",
+ .refresh = 60,
+ .xres = 1024,
+ .yres = 600,
+ .pixclock = 48000,
+ .left_margin = 104,
+ .right_margin = 43,
+ .upper_margin = 24,
+ .lower_margin = 20,
+ .hsync_len = 5,
+ .vsync_len = 5,
+ .sync = 0,
+ .vmode = FB_VMODE_NONINTERLACED,
+};
+
/*
* DCU register map
*/
@@ -365,6 +397,12 @@ void *video_hw_init(void)
else
fsl_dcu_mode_db = &fsl_dcu_mode_640_480;
break;
+ case RESOLUTION(800, 480):
+ fsl_dcu_mode_db = &fsl_dcu_mode_800_480;
+ break;
+ case RESOLUTION(1024, 600):
+ fsl_dcu_mode_db = &fsl_dcu_mode_1024_600;
+ break;
default:
printf("unsupported resolution %ux%u\n",
ctfb.winSizeX, ctfb.winSizeY);