drm/omap: omap_display_timings: Use display_flags for pixel data edge
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Thu, 22 Sep 2016 11:07:00 +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 pixel data 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 b94bfca0ecaed39602d69540c77bba92e391a0cd..6f130862db8af70ce625c46ec20cbe95b047c9bd 100644 (file)
@@ -33,11 +33,10 @@ static const struct omap_video_timings dvic_default_timings = {
        .vsync_len      = 4,
        .vback_porch    = 7,
 
-       .data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
        .sync_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE,
 
        .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 {
index e3b8dddc90bd07a7ec6d3ef18ea125557ace2ee2..eec079e017f0258d035476b7bb2ebaf0ad9504df 100644 (file)
@@ -115,9 +115,8 @@ static void tfp410_disable(struct omap_dss_device *dssdev)
 
 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->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,
index 7d4c59bf1950264b249b48f01ffc1f34bb235b55..33cdc107ed2116370f9e3a7ba6546a959e88ae81 100644 (file)
@@ -33,11 +33,10 @@ static struct omap_video_timings lb035q02_timings = {
        .vfront_porch   = 4,
        .vback_porch    = 18,
 
-       .data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
        .sync_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE,
 
        .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 {
index 6f7bc89ff9eec4a91f2479f3346cdc5f01768962..64f6f42dbe92e78132e64fb7615bf509d67c84c3 100644 (file)
@@ -76,11 +76,10 @@ static const struct omap_video_timings nec_8048_panel_timings = {
        .vsync_len      = 1,
        .vback_porch    = 4,
 
-       .data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
        .sync_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
 
        .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)
index a18dd7160df0c4196b4797eb8c4d700168758417..fb7e032209bd49d1a930548ca9a4e8b670411462 100644 (file)
@@ -49,11 +49,10 @@ static const struct omap_video_timings sharp_ls_timings = {
        .vfront_porch   = 1,
        .vback_porch    = 1,
 
-       .data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
        .sync_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE,
 
        .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)
index 6aecc24d20bc078815a0ca1f150118e2fbcd6b35..599908958066f997a3b328370573f918280442f6 100644 (file)
@@ -103,11 +103,10 @@ static const struct omap_video_timings acx565akm_panel_timings = {
        .vsync_len      = 3,
        .vback_porch    = 4,
 
-       .data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
        .sync_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE,
 
        .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)
index 8570ad5aeb55b45a4bc9331432914131c00ce94d..717b4577ac49c66c7c863c9a69c7a98c3fe6e9e4 100644 (file)
@@ -53,11 +53,10 @@ static struct omap_video_timings td028ttec1_panel_timings = {
        .vsync_len      = 2,
        .vback_porch    = 2,
 
-       .data_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE,
        .sync_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
 
        .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
index 03497708c4c95766130db8e21804d5405258197c..71fa7aabd062a412d85ad095210bfb2c3525bcf4 100644 (file)
@@ -86,11 +86,10 @@ static const struct omap_video_timings tpo_td043_timings = {
        .vfront_porch   = 39,
        .vback_porch    = 34,
 
-       .data_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE,
        .sync_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
 
        .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)
index cedec84429f566f06275f578d91b3988b6e8dd93..6b017e1f9245f27a88ecc4fed5f54f0d37216627 100644 (file)
@@ -3172,16 +3172,10 @@ static void _dispc_mgr_set_lcd_timings(enum omap_channel channel,
        else
                de = true;
 
-       switch (ovt->data_pclk_edge) {
-       case OMAPDSS_DRIVE_SIG_RISING_EDGE:
+       if (ovt->flags & DISPLAY_FLAGS_PIXDATA_POSEDGE)
                ipc = false;
-               break;
-       case OMAPDSS_DRIVE_SIG_FALLING_EDGE:
+       else
                ipc = true;
-               break;
-       default:
-               BUG();
-       }
 
        /* always use the 'rf' setting */
        onoff = true;
@@ -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",
                        !!(t.flags & DISPLAY_FLAGS_VSYNC_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);
 
                DSSDBG("hsync %luHz, vsync %luHz\n", ht, vt);
@@ -4205,11 +4200,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,
-               .data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
                .sync_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
 
                .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW |
-                        DISPLAY_FLAGS_DE_HIGH,
+                        DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE,
        },
        .ovli = {
                .screen_width = 1,
index 8d2fcb705ae82def416e28e3fc85ecf9b0e35010..1cd503cc95fe4186636de1aff322c3d6ff1ce726 100644 (file)
@@ -234,11 +234,9 @@ void videomode_to_omap_video_timings(const struct videomode *vm,
        ovt->vsync_len = vm->vsync_len;
        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_FALLING_EDGE;
-
-       ovt->sync_pclk_edge = ovt->data_pclk_edge;
 }
 EXPORT_SYMBOL(videomode_to_omap_video_timings);
 
@@ -258,10 +256,5 @@ void omap_video_timings_to_videomode(const struct omap_video_timings *ovt,
        vm->vfront_porch = ovt->vfront_porch;
        vm->vsync_len = ovt->vsync_len;
        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);
index e0532c75acdc84c938cdfe1b382e0ae8dbf22302..ba3a2da7c80d501abc21bfed1a129c4d4a6bdc76 100644 (file)
@@ -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_VSYNC_LOW;
        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_HIGH;
        dsi->timings.sync_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE;
index 342993154d6da3d8f6e06093978b9c03da440fe3..1bc18611010620f3a1a618d3e8a018b2b9cb7b99 100644 (file)
@@ -319,8 +319,6 @@ struct omap_video_timings {
        /* Unit: line clocks */
        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 */
        enum omap_dss_signal_edge sync_pclk_edge;
 
index 449d6aafb71f33b0cce18011f4029e7bc566e205..7a9598e93bc938d5d604014a334f0318153dc417 100644 (file)
@@ -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_VSYNC_LOW;
        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_HIGH;
        rfbi.timings.sync_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE;
index 0a96c321ce6268dffef06920eea8b11ddb9d828a..a886f9051b331377884b6c0760a79ac4957813c8 100644 (file)
@@ -151,7 +151,7 @@ static int sdi_display_enable(struct omap_dss_device *dssdev)
                goto err_get_dispc;
 
        /* 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;
 
        r = sdi_calc_clock_div(t->pixelclock, &fck, &dispc_cinfo);
index 8657e3c09e32a7c54ca991927217ed4977e01a4f..82d0cda9a4993b80074977c75a84c705a83a96b1 100644 (file)
@@ -273,11 +273,11 @@ const struct omap_video_timings omap_dss_pal_timings = {
        .vfront_porch   = 5,
        .vback_porch    = 41,
 
-       .data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
        .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_VSYNC_LOW | DISPLAY_FLAGS_DE_HIGH |
+                         DISPLAY_FLAGS_PIXDATA_POSEDGE,
 };
 EXPORT_SYMBOL(omap_dss_pal_timings);
 
@@ -292,11 +292,11 @@ const struct omap_video_timings omap_dss_ntsc_timings = {
        .vfront_porch   = 6,
        .vback_porch    = 31,
 
-       .data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
        .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_VSYNC_LOW | DISPLAY_FLAGS_DE_HIGH |
+                         DISPLAY_FLAGS_PIXDATA_POSEDGE,
 };
 EXPORT_SYMBOL(omap_dss_ntsc_timings);
 
index f3e9bcf1f784ba7abd70d4963c7b35776d909c40..5fa15da78a8c4dd5d721170374664c39c92c4b03 100644 (file)
@@ -107,8 +107,7 @@ void copy_timings_drm_to_omap(struct omap_video_timings *timings,
        else
                timings->flags |= DISPLAY_FLAGS_VSYNC_LOW;
 
-       timings->data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE;
-       timings->flags |= DISPLAY_FLAGS_DE_HIGH;
+       timings->flags |= DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE;
        timings->sync_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE;
 }