public
anonymous / board-omap4panda.c
Last active

Pandaboard Outputs 1920x1200@30 DPI

  • Download Gist
board-omap4panda.c
C
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
static struct panel_generic_dpi_data omap4_lcd_panel = {
.name = "1920x1200",
};
 
struct omap_dss_device omap4_panda_lcd_device = {
.type = OMAP_DISPLAY_TYPE_DPI,
.name = "lcd",
.driver_name = "generic_dpi_panel",
.data = &omap4_lcd_panel,
.phy.dpi.data_lines = 24,
.channel = OMAP_DSS_CHANNEL_LCD2,
};
 
static struct omap_dss_device *omap4_panda_dss_devices[] = {
&omap4_panda_lcd_device,
};
dispc.c.diff
Diff
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index a9c8ccb..0604cdd 100644
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c
@@ -174,6 +174,7 @@ static void dispc_save_context(void)
SR(IRQENABLE);
SR(CONTROL);
SR(CONFIG);
+ SR(GLOBAL_BUFFER);
SR(DEFAULT_COLOR(OMAP_DSS_CHANNEL_LCD));
SR(DEFAULT_COLOR(OMAP_DSS_CHANNEL_DIGIT));
SR(TRANS_COLOR(OMAP_DSS_CHANNEL_LCD));
@@ -328,6 +329,7 @@ static void dispc_restore_context(void)
/*RR(IRQENABLE);*/
/*RR(CONTROL);*/
RR(CONFIG);
+ RR(GLOBAL_BUFFER);
RR(DEFAULT_COLOR(OMAP_DSS_CHANNEL_LCD));
RR(DEFAULT_COLOR(OMAP_DSS_CHANNEL_DIGIT));
RR(TRANS_COLOR(OMAP_DSS_CHANNEL_LCD));
@@ -4318,6 +4317,9 @@ static void _omap_dispc_initial_config(void)
 
if (dss_has_feature(FEAT_GLOBAL_MFLAG))
dispc_write_reg(DISPC_GLOBAL_MFLAG, 2);
+
+ DSSDBG("modify DISPC_GLOBAL_BUFFER=0x006D2240: allocate WB buffer for GF
+ dispc_write_reg(DISPC_GLOBAL_BUFFER, 0x006D2240);
}
 
/* DISPC HW IP initialisation */
dispc.h.diff
Diff
1 2 3 4 5 6 7 8 9 10 11
diff --git a/drivers/video/omap2/dss/dispc.h b/drivers/video/omap2/dss/dispc.h
index 53146cd..ec04007 100644
--- a/drivers/video/omap2/dss/dispc.h
+++ b/drivers/video/omap2/dss/dispc.h
@@ -35,6 +35,7 @@
#define DISPC_GLOBAL_ALPHA 0x0074
#define DISPC_CONTROL2 0x0238
#define DISPC_CONFIG2 0x0620
+#define DISPC_GLOBAL_BUFFER 0x0800
#define DISPC_DIVISOR 0x0804
#define DISPC_GLOBAL_MFLAG 0x085C
modedb.c
C
1 2 3 4 5 6
static const struct fb_videomode modedb[] = {
/* 1920x1200 @ 30 Hz */
{ NULL, 60, 1920, 1200, 12847, 80, 48, 26, 13, 32, 6,
FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
FB_VMODE_NONINTERLACED },
};
panel-generic-dpi.c
C
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
static struct panel_config generic_dpi_panels[] = {
/* 1920x1200 30Hz */
{
{
.x_res = 1920,
.y_res = 1200,
 
.pixel_clock = 77688,
 
.hfp = 48,
.hsw = 32,
.hbp = 80,
 
.vfp = 13,
.vsw = 6,
.vbp = 26,
},
.acbi = 0x0,
.acb = 0x0,
.config = OMAP_DSS_LCD_TFT,
.power_on_delay = 0,
.power_off_delay = 0,
.name = "1920x1200",
},
};

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.