Commit f149e17a authored by Peter Ujfalusi's avatar Peter Ujfalusi Committed by Tomi Valkeinen

drm/omap: omap_display_timings: Use display_flags for pixel data edge

In preparation to move the stack to use the generic videmode struct for
display timing information use display_flags for pixel data edge.
Signed-off-by: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent 531efb38
...@@ -33,11 +33,10 @@ static const struct omap_video_timings dvic_default_timings = { ...@@ -33,11 +33,10 @@ static const struct omap_video_timings dvic_default_timings = {
.vsync_len = 4, .vsync_len = 4,
.vback_porch = 7, .vback_porch = 7,
.data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
.sync_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE, .sync_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE,
.flags = DISPLAY_FLAGS_HSYNC_HIGH | DISPLAY_FLAGS_VSYNC_HIGH | .flags = DISPLAY_FLAGS_HSYNC_HIGH | DISPLAY_FLAGS_VSYNC_HIGH |
DISPLAY_FLAGS_DE_HIGH, DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE,
}; };
struct panel_drv_data { struct panel_drv_data {
......
...@@ -115,9 +115,8 @@ static void tfp410_disable(struct omap_dss_device *dssdev) ...@@ -115,9 +115,8 @@ static void tfp410_disable(struct omap_dss_device *dssdev)
static void tfp410_fix_timings(struct omap_video_timings *timings) static void tfp410_fix_timings(struct omap_video_timings *timings)
{ {
timings->data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE;
timings->sync_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE; timings->sync_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE;
timings->flags |= DISPLAY_FLAGS_DE_HIGH; timings->flags |= DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE;
} }
static void tfp410_set_timings(struct omap_dss_device *dssdev, static void tfp410_set_timings(struct omap_dss_device *dssdev,
......
...@@ -33,11 +33,10 @@ static struct omap_video_timings lb035q02_timings = { ...@@ -33,11 +33,10 @@ static struct omap_video_timings lb035q02_timings = {
.vfront_porch = 4, .vfront_porch = 4,
.vback_porch = 18, .vback_porch = 18,
.data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
.sync_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE, .sync_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE,
.flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW | .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW |
DISPLAY_FLAGS_DE_HIGH, DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE,
}; };
struct panel_drv_data { struct panel_drv_data {
......
...@@ -76,11 +76,10 @@ static const struct omap_video_timings nec_8048_panel_timings = { ...@@ -76,11 +76,10 @@ static const struct omap_video_timings nec_8048_panel_timings = {
.vsync_len = 1, .vsync_len = 1,
.vback_porch = 4, .vback_porch = 4,
.data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
.sync_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE, .sync_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
.flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW | .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW |
DISPLAY_FLAGS_DE_HIGH, DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE,
}; };
#define to_panel_data(p) container_of(p, struct panel_drv_data, dssdev) #define to_panel_data(p) container_of(p, struct panel_drv_data, dssdev)
......
...@@ -49,11 +49,10 @@ static const struct omap_video_timings sharp_ls_timings = { ...@@ -49,11 +49,10 @@ static const struct omap_video_timings sharp_ls_timings = {
.vfront_porch = 1, .vfront_porch = 1,
.vback_porch = 1, .vback_porch = 1,
.data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
.sync_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE, .sync_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE,
.flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW | .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW |
DISPLAY_FLAGS_DE_HIGH, DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE,
}; };
#define to_panel_data(p) container_of(p, struct panel_drv_data, dssdev) #define to_panel_data(p) container_of(p, struct panel_drv_data, dssdev)
......
...@@ -103,11 +103,10 @@ static const struct omap_video_timings acx565akm_panel_timings = { ...@@ -103,11 +103,10 @@ static const struct omap_video_timings acx565akm_panel_timings = {
.vsync_len = 3, .vsync_len = 3,
.vback_porch = 4, .vback_porch = 4,
.data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
.sync_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE, .sync_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE,
.flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW | .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW |
DISPLAY_FLAGS_DE_HIGH, DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE,
}; };
#define to_panel_data(p) container_of(p, struct panel_drv_data, dssdev) #define to_panel_data(p) container_of(p, struct panel_drv_data, dssdev)
......
...@@ -53,11 +53,10 @@ static struct omap_video_timings td028ttec1_panel_timings = { ...@@ -53,11 +53,10 @@ static struct omap_video_timings td028ttec1_panel_timings = {
.vsync_len = 2, .vsync_len = 2,
.vback_porch = 2, .vback_porch = 2,
.data_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE,
.sync_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE, .sync_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
.flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW | .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW |
DISPLAY_FLAGS_DE_HIGH, DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_NEGEDGE,
}; };
#define JBT_COMMAND 0x000 #define JBT_COMMAND 0x000
......
...@@ -86,11 +86,10 @@ static const struct omap_video_timings tpo_td043_timings = { ...@@ -86,11 +86,10 @@ static const struct omap_video_timings tpo_td043_timings = {
.vfront_porch = 39, .vfront_porch = 39,
.vback_porch = 34, .vback_porch = 34,
.data_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE,
.sync_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE, .sync_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
.flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW | .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW |
DISPLAY_FLAGS_DE_HIGH, DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_NEGEDGE,
}; };
#define to_panel_data(p) container_of(p, struct panel_drv_data, dssdev) #define to_panel_data(p) container_of(p, struct panel_drv_data, dssdev)
......
...@@ -3172,16 +3172,10 @@ static void _dispc_mgr_set_lcd_timings(enum omap_channel channel, ...@@ -3172,16 +3172,10 @@ static void _dispc_mgr_set_lcd_timings(enum omap_channel channel,
else else
de = true; de = true;
switch (ovt->data_pclk_edge) { if (ovt->flags & DISPLAY_FLAGS_PIXDATA_POSEDGE)
case OMAPDSS_DRIVE_SIG_RISING_EDGE:
ipc = false; ipc = false;
break; else
case OMAPDSS_DRIVE_SIG_FALLING_EDGE:
ipc = true; ipc = true;
break;
default:
BUG();
}
/* always use the 'rf' setting */ /* always use the 'rf' setting */
onoff = true; onoff = true;
...@@ -3261,7 +3255,8 @@ void dispc_mgr_set_timings(enum omap_channel channel, ...@@ -3261,7 +3255,8 @@ void dispc_mgr_set_timings(enum omap_channel channel,
DSSDBG("vsync_level %d hsync_level %d data_pclk_edge %d de_level %d sync_pclk_edge %d\n", DSSDBG("vsync_level %d hsync_level %d data_pclk_edge %d de_level %d sync_pclk_edge %d\n",
!!(t.flags & DISPLAY_FLAGS_VSYNC_HIGH), !!(t.flags & DISPLAY_FLAGS_VSYNC_HIGH),
!!(t.flags & DISPLAY_FLAGS_HSYNC_HIGH), !!(t.flags & DISPLAY_FLAGS_HSYNC_HIGH),
t.data_pclk_edge, !!(t.flags & DISPLAY_FLAGS_DE_HIGH), !!(t.flags & DISPLAY_FLAGS_PIXDATA_POSEDGE),
!!(t.flags & DISPLAY_FLAGS_DE_HIGH),
t.sync_pclk_edge); t.sync_pclk_edge);
DSSDBG("hsync %luHz, vsync %luHz\n", ht, vt); DSSDBG("hsync %luHz, vsync %luHz\n", ht, vt);
...@@ -4205,11 +4200,10 @@ static const struct dispc_errata_i734_data { ...@@ -4205,11 +4200,10 @@ static const struct dispc_errata_i734_data {
.pixelclock = 16000000, .pixelclock = 16000000,
.hsync_len = 8, .hfront_porch = 4, .hback_porch = 4, .hsync_len = 8, .hfront_porch = 4, .hback_porch = 4,
.vsync_len = 1, .vfront_porch = 1, .vback_porch = 1, .vsync_len = 1, .vfront_porch = 1, .vback_porch = 1,
.data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
.sync_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE, .sync_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
.flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW | .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW |
DISPLAY_FLAGS_DE_HIGH, DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE,
}, },
.ovli = { .ovli = {
.screen_width = 1, .screen_width = 1,
......
...@@ -234,11 +234,9 @@ void videomode_to_omap_video_timings(const struct videomode *vm, ...@@ -234,11 +234,9 @@ void videomode_to_omap_video_timings(const struct videomode *vm,
ovt->vsync_len = vm->vsync_len; ovt->vsync_len = vm->vsync_len;
ovt->flags = vm->flags; ovt->flags = vm->flags;
ovt->data_pclk_edge = vm->flags & DISPLAY_FLAGS_PIXDATA_POSEDGE ? ovt->sync_pclk_edge = ovt->flags & DISPLAY_FLAGS_PIXDATA_POSEDGE ?
OMAPDSS_DRIVE_SIG_RISING_EDGE : OMAPDSS_DRIVE_SIG_RISING_EDGE :
OMAPDSS_DRIVE_SIG_FALLING_EDGE; OMAPDSS_DRIVE_SIG_FALLING_EDGE;
ovt->sync_pclk_edge = ovt->data_pclk_edge;
} }
EXPORT_SYMBOL(videomode_to_omap_video_timings); EXPORT_SYMBOL(videomode_to_omap_video_timings);
...@@ -258,10 +256,5 @@ void omap_video_timings_to_videomode(const struct omap_video_timings *ovt, ...@@ -258,10 +256,5 @@ void omap_video_timings_to_videomode(const struct omap_video_timings *ovt,
vm->vfront_porch = ovt->vfront_porch; vm->vfront_porch = ovt->vfront_porch;
vm->vsync_len = ovt->vsync_len; vm->vsync_len = ovt->vsync_len;
vm->flags = ovt->flags; vm->flags = ovt->flags;
if (ovt->data_pclk_edge == OMAPDSS_DRIVE_SIG_RISING_EDGE)
vm->flags |= DISPLAY_FLAGS_PIXDATA_POSEDGE;
else
vm->flags |= DISPLAY_FLAGS_PIXDATA_NEGEDGE;
} }
EXPORT_SYMBOL(omap_video_timings_to_videomode); EXPORT_SYMBOL(omap_video_timings_to_videomode);
...@@ -4127,7 +4127,8 @@ static int dsi_display_init_dispc(struct platform_device *dsidev, ...@@ -4127,7 +4127,8 @@ static int dsi_display_init_dispc(struct platform_device *dsidev,
dsi->timings.flags |= DISPLAY_FLAGS_HSYNC_HIGH; dsi->timings.flags |= DISPLAY_FLAGS_HSYNC_HIGH;
dsi->timings.flags &= ~DISPLAY_FLAGS_VSYNC_LOW; dsi->timings.flags &= ~DISPLAY_FLAGS_VSYNC_LOW;
dsi->timings.flags |= DISPLAY_FLAGS_VSYNC_HIGH; dsi->timings.flags |= DISPLAY_FLAGS_VSYNC_HIGH;
dsi->timings.data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE; dsi->timings.flags &= ~DISPLAY_FLAGS_PIXDATA_NEGEDGE;
dsi->timings.flags |= DISPLAY_FLAGS_PIXDATA_POSEDGE;
dsi->timings.flags &= ~DISPLAY_FLAGS_DE_LOW; dsi->timings.flags &= ~DISPLAY_FLAGS_DE_LOW;
dsi->timings.flags |= DISPLAY_FLAGS_DE_HIGH; dsi->timings.flags |= DISPLAY_FLAGS_DE_HIGH;
dsi->timings.sync_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE; dsi->timings.sync_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE;
......
...@@ -319,8 +319,6 @@ struct omap_video_timings { ...@@ -319,8 +319,6 @@ struct omap_video_timings {
/* Unit: line clocks */ /* Unit: line clocks */
u16 vback_porch; /* Vertical back porch */ u16 vback_porch; /* Vertical back porch */
/* Pixel clock edge to drive LCD data */
enum omap_dss_signal_edge data_pclk_edge;
/* Pixel clock edges to drive HSYNC and VSYNC signals */ /* Pixel clock edges to drive HSYNC and VSYNC signals */
enum omap_dss_signal_edge sync_pclk_edge; enum omap_dss_signal_edge sync_pclk_edge;
......
...@@ -870,7 +870,8 @@ static void rfbi_config_lcd_manager(struct omap_dss_device *dssdev) ...@@ -870,7 +870,8 @@ static void rfbi_config_lcd_manager(struct omap_dss_device *dssdev)
rfbi.timings.flags |= DISPLAY_FLAGS_HSYNC_HIGH; rfbi.timings.flags |= DISPLAY_FLAGS_HSYNC_HIGH;
rfbi.timings.flags &= ~DISPLAY_FLAGS_VSYNC_LOW; rfbi.timings.flags &= ~DISPLAY_FLAGS_VSYNC_LOW;
rfbi.timings.flags |= DISPLAY_FLAGS_VSYNC_HIGH; rfbi.timings.flags |= DISPLAY_FLAGS_VSYNC_HIGH;
rfbi.timings.data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE; rfbi.timings.flags &= ~DISPLAY_FLAGS_PIXDATA_NEGEDGE;
rfbi.timings.flags |= DISPLAY_FLAGS_PIXDATA_POSEDGE;
rfbi.timings.flags &= ~DISPLAY_FLAGS_DE_LOW; rfbi.timings.flags &= ~DISPLAY_FLAGS_DE_LOW;
rfbi.timings.flags |= DISPLAY_FLAGS_DE_HIGH; rfbi.timings.flags |= DISPLAY_FLAGS_DE_HIGH;
rfbi.timings.sync_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE; rfbi.timings.sync_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE;
......
...@@ -151,7 +151,7 @@ static int sdi_display_enable(struct omap_dss_device *dssdev) ...@@ -151,7 +151,7 @@ static int sdi_display_enable(struct omap_dss_device *dssdev)
goto err_get_dispc; goto err_get_dispc;
/* 15.5.9.1.2 */ /* 15.5.9.1.2 */
t->data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE; t->flags |= DISPLAY_FLAGS_PIXDATA_POSEDGE;
t->sync_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE; t->sync_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE;
r = sdi_calc_clock_div(t->pixelclock, &fck, &dispc_cinfo); r = sdi_calc_clock_div(t->pixelclock, &fck, &dispc_cinfo);
......
...@@ -273,11 +273,11 @@ const struct omap_video_timings omap_dss_pal_timings = { ...@@ -273,11 +273,11 @@ const struct omap_video_timings omap_dss_pal_timings = {
.vfront_porch = 5, .vfront_porch = 5,
.vback_porch = 41, .vback_porch = 41,
.data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
.sync_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE, .sync_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE,
.flags = DISPLAY_FLAGS_INTERLACED | DISPLAY_FLAGS_HSYNC_LOW | .flags = DISPLAY_FLAGS_INTERLACED | DISPLAY_FLAGS_HSYNC_LOW |
DISPLAY_FLAGS_VSYNC_LOW | DISPLAY_FLAGS_DE_HIGH, DISPLAY_FLAGS_VSYNC_LOW | DISPLAY_FLAGS_DE_HIGH |
DISPLAY_FLAGS_PIXDATA_POSEDGE,
}; };
EXPORT_SYMBOL(omap_dss_pal_timings); EXPORT_SYMBOL(omap_dss_pal_timings);
...@@ -292,11 +292,11 @@ const struct omap_video_timings omap_dss_ntsc_timings = { ...@@ -292,11 +292,11 @@ const struct omap_video_timings omap_dss_ntsc_timings = {
.vfront_porch = 6, .vfront_porch = 6,
.vback_porch = 31, .vback_porch = 31,
.data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
.sync_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE, .sync_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE,
.flags = DISPLAY_FLAGS_INTERLACED | DISPLAY_FLAGS_HSYNC_LOW | .flags = DISPLAY_FLAGS_INTERLACED | DISPLAY_FLAGS_HSYNC_LOW |
DISPLAY_FLAGS_VSYNC_LOW | DISPLAY_FLAGS_DE_HIGH, DISPLAY_FLAGS_VSYNC_LOW | DISPLAY_FLAGS_DE_HIGH |
DISPLAY_FLAGS_PIXDATA_POSEDGE,
}; };
EXPORT_SYMBOL(omap_dss_ntsc_timings); EXPORT_SYMBOL(omap_dss_ntsc_timings);
......
...@@ -107,8 +107,7 @@ void copy_timings_drm_to_omap(struct omap_video_timings *timings, ...@@ -107,8 +107,7 @@ void copy_timings_drm_to_omap(struct omap_video_timings *timings,
else else
timings->flags |= DISPLAY_FLAGS_VSYNC_LOW; timings->flags |= DISPLAY_FLAGS_VSYNC_LOW;
timings->data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE; timings->flags |= DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE;
timings->flags |= DISPLAY_FLAGS_DE_HIGH;
timings->sync_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE; timings->sync_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment