Skip to content

Instantly share code, notes, and snippets.

Created November 20, 2012 09:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/4116881 to your computer and use it in GitHub Desktop.
Save anonymous/4116881 to your computer and use it in GitHub Desktop.
Pandaboard Outputs 1920x1200@30 DPI
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,
};
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 */
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
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 },
};
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",
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment