drm/omap: omap_display_timings: Use display_flags for sync edge
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Thu, 22 Sep 2016 11:07:01 +0000 (14:07 +0300)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Wed, 2 Nov 2016 08:48:18 +0000 (10:48 +0200)
In preparation to move the stack to use the generic videmode struct for
display timing information use display_flags for sync edge.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
16 files changed:
drivers/gpu/drm/omapdrm/displays/connector-dvi.c
drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c
drivers/gpu/drm/omapdrm/displays/panel-lgphilips-lb035q02.c
drivers/gpu/drm/omapdrm/displays/panel-nec-nl8048hl11.c
drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c
drivers/gpu/drm/omapdrm/displays/panel-sony-acx565akm.c
drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c
drivers/gpu/drm/omapdrm/displays/panel-tpo-td043mtea1.c
drivers/gpu/drm/omapdrm/dss/dispc.c
drivers/gpu/drm/omapdrm/dss/display.c
drivers/gpu/drm/omapdrm/dss/dsi.c
drivers/gpu/drm/omapdrm/dss/omapdss.h
drivers/gpu/drm/omapdrm/dss/rfbi.c
drivers/gpu/drm/omapdrm/dss/sdi.c
drivers/gpu/drm/omapdrm/dss/venc.c
drivers/gpu/drm/omapdrm/omap_connector.c

index 6f130862db8af70ce625c46ec20cbe95b047c9bd..53967a4a96a762590e585cff3c02fa4cf7a68b4a 100644 (file)
@@ -33,10 +33,9 @@ static const struct omap_video_timings dvic_default_timings = {
        .vsync_len      = 4,
        .vback_porch    = 7,
 
-       .sync_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE,
-
        .flags          = DISPLAY_FLAGS_HSYNC_HIGH | DISPLAY_FLAGS_VSYNC_HIGH |
-                         DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE,
+                         DISPLAY_FLAGS_SYNC_NEGEDGE | DISPLAY_FLAGS_DE_HIGH |
+                         DISPLAY_FLAGS_PIXDATA_POSEDGE,
 };
 
 struct panel_drv_data {
index eec079e017f0258d035476b7bb2ebaf0ad9504df..69b4feab964cc22e73402d77c4e5ce4faee3480d 100644 (file)
@@ -115,8 +115,9 @@ static void tfp410_disable(struct omap_dss_device *dssdev)
 
 static void tfp410_fix_timings(struct omap_video_timings *timings)
 {
-       timings->sync_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE;
-       timings->flags |= DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE;
+       timings->flags |= DISPLAY_FLAGS_DE_HIGH |
+                         DISPLAY_FLAGS_PIXDATA_POSEDGE |
+                         DISPLAY_FLAGS_SYNC_POSEDGE;
 }
 
 static void tfp410_set_timings(struct omap_dss_device *dssdev,
index 33cdc107ed2116370f9e3a7ba6546a959e88ae81..4328d6781228d13a4663c54581a0d03d015d42e9 100644 (file)
@@ -33,10 +33,9 @@ static struct omap_video_timings lb035q02_timings = {
        .vfront_porch   = 4,
        .vback_porch    = 18,
 
-       .sync_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE,
-
        .flags          = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW |
-                         DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE,
+                         DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_SYNC_NEGEDGE |
+                         DISPLAY_FLAGS_PIXDATA_POSEDGE,
 };
 
 struct panel_drv_data {
index 64f6f42dbe92e78132e64fb7615bf509d67c84c3..58f39f588c62c09c74398bcc136615fbaacdd5f5 100644 (file)
@@ -76,10 +76,9 @@ static const struct omap_video_timings nec_8048_panel_timings = {
        .vsync_len      = 1,
        .vback_porch    = 4,
 
-       .sync_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
-
        .flags          = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW |
-                         DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE,
+                         DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_SYNC_POSEDGE |
+                         DISPLAY_FLAGS_PIXDATA_POSEDGE,
 };
 
 #define to_panel_data(p) container_of(p, struct panel_drv_data, dssdev)
index fb7e032209bd49d1a930548ca9a4e8b670411462..d41ba3152859346dd3df85b9d8c76fe1ba1b89ac 100644 (file)
@@ -49,10 +49,9 @@ static const struct omap_video_timings sharp_ls_timings = {
        .vfront_porch   = 1,
        .vback_porch    = 1,
 
-       .sync_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE,
-
        .flags          = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW |
-                         DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE,
+                         DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_SYNC_NEGEDGE |
+                         DISPLAY_FLAGS_PIXDATA_POSEDGE,
 };
 
 #define to_panel_data(p) container_of(p, struct panel_drv_data, dssdev)
index 599908958066f997a3b328370573f918280442f6..1e09806351136503e8194cecbab9cfecd6faab7d 100644 (file)
@@ -103,10 +103,9 @@ static const struct omap_video_timings acx565akm_panel_timings = {
        .vsync_len      = 3,
        .vback_porch    = 4,
 
-       .sync_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE,
-
        .flags          = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW |
-                         DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE,
+                         DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_SYNC_NEGEDGE |
+                         DISPLAY_FLAGS_PIXDATA_POSEDGE,
 };
 
 #define to_panel_data(p) container_of(p, struct panel_drv_data, dssdev)
index 717b4577ac49c66c7c863c9a69c7a98c3fe6e9e4..9711ec469f39e6e9f3c8a57816b6d6d173168828 100644 (file)
@@ -53,10 +53,9 @@ static struct omap_video_timings td028ttec1_panel_timings = {
        .vsync_len      = 2,
        .vback_porch    = 2,
 
-       .sync_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
-
        .flags          = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW |
-                         DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_NEGEDGE,
+                         DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_SYNC_POSEDGE |
+                         DISPLAY_FLAGS_PIXDATA_NEGEDGE,
 };
 
 #define JBT_COMMAND    0x000
index 71fa7aabd062a412d85ad095210bfb2c3525bcf4..3f701686f992e89b6d9faeb806bbbad0cad05744 100644 (file)
@@ -86,10 +86,9 @@ static const struct omap_video_timings tpo_td043_timings = {
        .vfront_porch   = 39,
        .vback_porch    = 34,
 
-       .sync_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
-
        .flags          = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW |
-                         DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_NEGEDGE,
+                         DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_SYNC_POSEDGE |
+                         DISPLAY_FLAGS_PIXDATA_NEGEDGE,
 };
 
 #define to_panel_data(p) container_of(p, struct panel_drv_data, dssdev)
index 6b017e1f9245f27a88ecc4fed5f54f0d37216627..83b7a7a2a9e71a020cd2a060875d612a69548316 100644 (file)
@@ -3180,16 +3180,10 @@ static void _dispc_mgr_set_lcd_timings(enum omap_channel channel,
        /* always use the 'rf' setting */
        onoff = true;
 
-       switch (ovt->sync_pclk_edge) {
-       case OMAPDSS_DRIVE_SIG_FALLING_EDGE:
-               rf = false;
-               break;
-       case OMAPDSS_DRIVE_SIG_RISING_EDGE:
+       if (ovt->flags & DISPLAY_FLAGS_SYNC_POSEDGE)
                rf = true;
-               break;
-       default:
-               BUG();
-       }
+       else
+               rf = false;
 
        l = FLD_VAL(onoff, 17, 17) |
                FLD_VAL(rf, 16, 16) |
@@ -3257,7 +3251,7 @@ void dispc_mgr_set_timings(enum omap_channel channel,
                        !!(t.flags & DISPLAY_FLAGS_HSYNC_HIGH),
                        !!(t.flags & DISPLAY_FLAGS_PIXDATA_POSEDGE),
                        !!(t.flags & DISPLAY_FLAGS_DE_HIGH),
-                       t.sync_pclk_edge);
+                       !!(t.flags & DISPLAY_FLAGS_SYNC_POSEDGE));
 
                DSSDBG("hsync %luHz, vsync %luHz\n", ht, vt);
        } else {
@@ -4200,10 +4194,10 @@ static const struct dispc_errata_i734_data {
                .pixelclock = 16000000,
                .hsync_len = 8, .hfront_porch = 4, .hback_porch = 4,
                .vsync_len = 1, .vfront_porch = 1, .vback_porch = 1,
-               .sync_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
 
                .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW |
-                        DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE,
+                        DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_SYNC_POSEDGE |
+                        DISPLAY_FLAGS_PIXDATA_POSEDGE,
        },
        .ovli = {
                .screen_width = 1,
index 1cd503cc95fe4186636de1aff322c3d6ff1ce726..1e19a2c00f8fb7bcf37486d1a8735e83f08de157 100644 (file)
@@ -233,10 +233,6 @@ void videomode_to_omap_video_timings(const struct videomode *vm,
        ovt->vfront_porch = vm->vfront_porch;
        ovt->vsync_len = vm->vsync_len;
        ovt->flags = vm->flags;
-
-       ovt->sync_pclk_edge = ovt->flags & DISPLAY_FLAGS_PIXDATA_POSEDGE ?
-               OMAPDSS_DRIVE_SIG_RISING_EDGE :
-               OMAPDSS_DRIVE_SIG_FALLING_EDGE;
 }
 EXPORT_SYMBOL(videomode_to_omap_video_timings);
 
index ba3a2da7c80d501abc21bfed1a129c4d4a6bdc76..1dec7dd380295aaba0ab5e6cced9bc0131141b3e 100644 (file)
@@ -4131,7 +4131,8 @@ static int dsi_display_init_dispc(struct platform_device *dsidev,
        dsi->timings.flags |= DISPLAY_FLAGS_PIXDATA_POSEDGE;
        dsi->timings.flags &= ~DISPLAY_FLAGS_DE_LOW;
        dsi->timings.flags |= DISPLAY_FLAGS_DE_HIGH;
-       dsi->timings.sync_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE;
+       dsi->timings.flags &= ~DISPLAY_FLAGS_SYNC_POSEDGE;
+       dsi->timings.flags |= DISPLAY_FLAGS_SYNC_NEGEDGE;
 
        dss_mgr_set_timings(channel, &dsi->timings);
 
index 1bc18611010620f3a1a618d3e8a018b2b9cb7b99..84d34242d5a481a4a7804641bc547845e7481c9f 100644 (file)
@@ -319,9 +319,6 @@ struct omap_video_timings {
        /* Unit: line clocks */
        u16 vback_porch;        /* Vertical back porch */
 
-       /* Pixel clock edges to drive HSYNC and VSYNC signals */
-       enum omap_dss_signal_edge sync_pclk_edge;
-
        enum display_flags flags;
 };
 
index 7a9598e93bc938d5d604014a334f0318153dc417..ce431817e781b6b7ca85627689bc1061ca22b3b2 100644 (file)
@@ -874,7 +874,8 @@ static void rfbi_config_lcd_manager(struct omap_dss_device *dssdev)
        rfbi.timings.flags |= DISPLAY_FLAGS_PIXDATA_POSEDGE;
        rfbi.timings.flags &= ~DISPLAY_FLAGS_DE_LOW;
        rfbi.timings.flags |= DISPLAY_FLAGS_DE_HIGH;
-       rfbi.timings.sync_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE;
+       rfbi.timings.flags &= ~DISPLAY_FLAGS_SYNC_POSEDGE;
+       rfbi.timings.flags |= DISPLAY_FLAGS_SYNC_NEGEDGE;
 
        dss_mgr_set_timings(mgr, &rfbi.timings);
 }
index a886f9051b331377884b6c0760a79ac4957813c8..3b076329a3acb60313af93d8b789c5457659f24b 100644 (file)
@@ -151,8 +151,7 @@ static int sdi_display_enable(struct omap_dss_device *dssdev)
                goto err_get_dispc;
 
        /* 15.5.9.1.2 */
-       t->flags |= DISPLAY_FLAGS_PIXDATA_POSEDGE;
-       t->sync_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE;
+       t->flags |= DISPLAY_FLAGS_PIXDATA_POSEDGE | DISPLAY_FLAGS_SYNC_POSEDGE;
 
        r = sdi_calc_clock_div(t->pixelclock, &fck, &dispc_cinfo);
        if (r)
index 82d0cda9a4993b80074977c75a84c705a83a96b1..43f98547e9fcb357b7feffcdfcdbc8edaa76520e 100644 (file)
@@ -273,11 +273,10 @@ const struct omap_video_timings omap_dss_pal_timings = {
        .vfront_porch   = 5,
        .vback_porch    = 41,
 
-       .sync_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE,
-
        .flags          = DISPLAY_FLAGS_INTERLACED | DISPLAY_FLAGS_HSYNC_LOW |
                          DISPLAY_FLAGS_VSYNC_LOW | DISPLAY_FLAGS_DE_HIGH |
-                         DISPLAY_FLAGS_PIXDATA_POSEDGE,
+                         DISPLAY_FLAGS_PIXDATA_POSEDGE |
+                         DISPLAY_FLAGS_SYNC_NEGEDGE,
 };
 EXPORT_SYMBOL(omap_dss_pal_timings);
 
@@ -292,11 +291,10 @@ const struct omap_video_timings omap_dss_ntsc_timings = {
        .vfront_porch   = 6,
        .vback_porch    = 31,
 
-       .sync_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE,
-
        .flags          = DISPLAY_FLAGS_INTERLACED | DISPLAY_FLAGS_HSYNC_LOW |
                          DISPLAY_FLAGS_VSYNC_LOW | DISPLAY_FLAGS_DE_HIGH |
-                         DISPLAY_FLAGS_PIXDATA_POSEDGE,
+                         DISPLAY_FLAGS_PIXDATA_POSEDGE |
+                         DISPLAY_FLAGS_SYNC_NEGEDGE,
 };
 EXPORT_SYMBOL(omap_dss_ntsc_timings);
 
index 5fa15da78a8c4dd5d721170374664c39c92c4b03..562a04d49939afdcf3428df4f68eb414e4c95540 100644 (file)
@@ -107,8 +107,9 @@ void copy_timings_drm_to_omap(struct omap_video_timings *timings,
        else
                timings->flags |= DISPLAY_FLAGS_VSYNC_LOW;
 
-       timings->flags |= DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE;
-       timings->sync_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE;
+       timings->flags |= DISPLAY_FLAGS_DE_HIGH |
+                         DISPLAY_FLAGS_PIXDATA_POSEDGE |
+                         DISPLAY_FLAGS_SYNC_NEGEDGE;
 }
 
 static enum drm_connector_status omap_connector_detect(