drm/omap: omap_display_timings: Use display_flags for DE level
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Thu, 22 Sep 2016 11:06:58 +0000 (14:06 +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 DE level.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
15 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/venc.c
drivers/gpu/drm/omapdrm/omap_connector.c

index b81c366ba63a67ab93ef4db9a3d89c5c0c5d845c..b94bfca0ecaed39602d69540c77bba92e391a0cd 100644 (file)
@@ -34,10 +34,10 @@ static const struct omap_video_timings dvic_default_timings = {
        .vback_porch    = 7,
 
        .data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
-       .de_level       = OMAPDSS_SIG_ACTIVE_HIGH,
        .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,
 };
 
 struct panel_drv_data {
index d768217cefe04dd62a65feffe14f5a863a328ece..e3b8dddc90bd07a7ec6d3ef18ea125557ace2ee2 100644 (file)
@@ -117,7 +117,7 @@ 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->de_level = OMAPDSS_SIG_ACTIVE_HIGH;
+       timings->flags |= DISPLAY_FLAGS_DE_HIGH;
 }
 
 static void tfp410_set_timings(struct omap_dss_device *dssdev,
index 999dec6c2cffbb8c1d901929617b6b89609ebaae..7d4c59bf1950264b249b48f01ffc1f34bb235b55 100644 (file)
@@ -34,10 +34,10 @@ static struct omap_video_timings lb035q02_timings = {
        .vback_porch    = 18,
 
        .data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
-       .de_level       = OMAPDSS_SIG_ACTIVE_HIGH,
        .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,
 };
 
 struct panel_drv_data {
index c45eb3520346ca52254a7777b96c87d6e532fae8..6f7bc89ff9eec4a91f2479f3346cdc5f01768962 100644 (file)
@@ -77,10 +77,10 @@ static const struct omap_video_timings nec_8048_panel_timings = {
        .vback_porch    = 4,
 
        .data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
-       .de_level       = OMAPDSS_SIG_ACTIVE_HIGH,
        .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,
 };
 
 #define to_panel_data(p) container_of(p, struct panel_drv_data, dssdev)
index a83e6a1b894bdedda0879e64332c81f10deffef9..a18dd7160df0c4196b4797eb8c4d700168758417 100644 (file)
@@ -50,10 +50,10 @@ static const struct omap_video_timings sharp_ls_timings = {
        .vback_porch    = 1,
 
        .data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
-       .de_level       = OMAPDSS_SIG_ACTIVE_HIGH,
        .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,
 };
 
 #define to_panel_data(p) container_of(p, struct panel_drv_data, dssdev)
index 40c882599c96970f40e2885f0f9db4d93cd9d11a..6aecc24d20bc078815a0ca1f150118e2fbcd6b35 100644 (file)
@@ -104,10 +104,10 @@ static const struct omap_video_timings acx565akm_panel_timings = {
        .vback_porch    = 4,
 
        .data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
-       .de_level       = OMAPDSS_SIG_ACTIVE_HIGH,
        .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,
 };
 
 #define to_panel_data(p) container_of(p, struct panel_drv_data, dssdev)
index d98a16e8ce4a7ac20b41604a912a765bf60ed835..8570ad5aeb55b45a4bc9331432914131c00ce94d 100644 (file)
@@ -54,10 +54,10 @@ static struct omap_video_timings td028ttec1_panel_timings = {
        .vback_porch    = 2,
 
        .data_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE,
-       .de_level       = OMAPDSS_SIG_ACTIVE_HIGH,
        .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,
 };
 
 #define JBT_COMMAND    0x000
index 65eeda51dbef4be4d847d69b09d8b77fdde3064a..03497708c4c95766130db8e21804d5405258197c 100644 (file)
@@ -87,10 +87,10 @@ static const struct omap_video_timings tpo_td043_timings = {
        .vback_porch    = 34,
 
        .data_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE,
-       .de_level       = OMAPDSS_SIG_ACTIVE_HIGH,
        .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,
 };
 
 #define to_panel_data(p) container_of(p, struct panel_drv_data, dssdev)
index 6acdd21941227632c3c19b3024c51e71bee5bd6a..5f88b7848415cdd223cc306b96010d02626cc05a 100644 (file)
@@ -3167,16 +3167,10 @@ static void _dispc_mgr_set_lcd_timings(enum omap_channel channel,
        else
                hs = true;
 
-       switch (ovt->de_level) {
-       case OMAPDSS_SIG_ACTIVE_LOW:
-               de = true;
-               break;
-       case OMAPDSS_SIG_ACTIVE_HIGH:
+       if (ovt->flags & DISPLAY_FLAGS_DE_HIGH)
                de = false;
-               break;
-       default:
-               BUG();
-       }
+       else
+               de = true;
 
        switch (ovt->data_pclk_edge) {
        case OMAPDSS_DRIVE_SIG_RISING_EDGE:
@@ -3267,7 +3261,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.de_level, t.sync_pclk_edge);
+                       t.data_pclk_edge, !!(t.flags & DISPLAY_FLAGS_DE_HIGH),
+                       t.sync_pclk_edge);
 
                DSSDBG("hsync %luHz, vsync %luHz\n", ht, vt);
        } else {
@@ -4210,11 +4205,11 @@ static const struct dispc_errata_i734_data {
                .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,
-               .de_level = OMAPDSS_SIG_ACTIVE_HIGH,
                .sync_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
                .double_pixel = false,
 
-               .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW,
+               .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW |
+                        DISPLAY_FLAGS_DE_HIGH,
        },
        .ovli = {
                .screen_width = 1,
index ddb5bbd41dfbf7deb189c0a11743da6ac60b6865..8d2fcb705ae82def416e28e3fc85ecf9b0e35010 100644 (file)
@@ -234,9 +234,6 @@ void videomode_to_omap_video_timings(const struct videomode *vm,
        ovt->vsync_len = vm->vsync_len;
        ovt->flags = vm->flags;
 
-       ovt->de_level = vm->flags & DISPLAY_FLAGS_DE_HIGH ?
-               OMAPDSS_SIG_ACTIVE_HIGH :
-               OMAPDSS_SIG_ACTIVE_LOW;
        ovt->data_pclk_edge = vm->flags & DISPLAY_FLAGS_PIXDATA_POSEDGE ?
                OMAPDSS_DRIVE_SIG_RISING_EDGE :
                OMAPDSS_DRIVE_SIG_FALLING_EDGE;
@@ -262,11 +259,6 @@ void omap_video_timings_to_videomode(const struct omap_video_timings *ovt,
        vm->vsync_len = ovt->vsync_len;
        vm->flags = ovt->flags;
 
-       if (ovt->de_level == OMAPDSS_SIG_ACTIVE_HIGH)
-               vm->flags |= DISPLAY_FLAGS_DE_HIGH;
-       else
-               vm->flags |= DISPLAY_FLAGS_DE_LOW;
-
        if (ovt->data_pclk_edge == OMAPDSS_DRIVE_SIG_RISING_EDGE)
                vm->flags |= DISPLAY_FLAGS_PIXDATA_POSEDGE;
        else
index fb47e82e4e98e72b31d4f22f66b16e72aa1f6e38..e0532c75acdc84c938cdfe1b382e0ae8dbf22302 100644 (file)
@@ -4128,7 +4128,8 @@ static int dsi_display_init_dispc(struct platform_device *dsidev,
        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.de_level = OMAPDSS_SIG_ACTIVE_HIGH;
+       dsi->timings.flags &= ~DISPLAY_FLAGS_DE_LOW;
+       dsi->timings.flags |= DISPLAY_FLAGS_DE_HIGH;
        dsi->timings.sync_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE;
 
        dss_mgr_set_timings(channel, &dsi->timings);
index 23ab45447b0daf4c745c9d432fc03a50e544fa14..b1934d55acb19209a20e6c0f4e345c585f755345 100644 (file)
@@ -321,8 +321,6 @@ struct omap_video_timings {
 
        /* Pixel clock edge to drive LCD data */
        enum omap_dss_signal_edge data_pclk_edge;
-       /* Data enable logic level */
-       enum omap_dss_signal_level de_level;
        /* Pixel clock edges to drive HSYNC and VSYNC signals */
        enum omap_dss_signal_edge sync_pclk_edge;
 
index 62f037ebfe6d83b8caa8a3ac928d4b6d69357004..449d6aafb71f33b0cce18011f4029e7bc566e205 100644 (file)
@@ -871,7 +871,8 @@ static void rfbi_config_lcd_manager(struct omap_dss_device *dssdev)
        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.de_level = OMAPDSS_SIG_ACTIVE_HIGH;
+       rfbi.timings.flags &= ~DISPLAY_FLAGS_DE_LOW;
+       rfbi.timings.flags |= DISPLAY_FLAGS_DE_HIGH;
        rfbi.timings.sync_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE;
 
        dss_mgr_set_timings(mgr, &rfbi.timings);
index e80ec809f0c7778362e76271614cf932aeae3d7c..8657e3c09e32a7c54ca991927217ed4977e01a4f 100644 (file)
@@ -274,11 +274,10 @@ const struct omap_video_timings omap_dss_pal_timings = {
        .vback_porch    = 41,
 
        .data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
-       .de_level = OMAPDSS_SIG_ACTIVE_HIGH,
        .sync_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE,
 
        .flags          = DISPLAY_FLAGS_INTERLACED | DISPLAY_FLAGS_HSYNC_LOW |
-                         DISPLAY_FLAGS_VSYNC_LOW,
+                         DISPLAY_FLAGS_VSYNC_LOW | DISPLAY_FLAGS_DE_HIGH,
 };
 EXPORT_SYMBOL(omap_dss_pal_timings);
 
@@ -294,11 +293,10 @@ const struct omap_video_timings omap_dss_ntsc_timings = {
        .vback_porch    = 31,
 
        .data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
-       .de_level = OMAPDSS_SIG_ACTIVE_HIGH,
        .sync_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE,
 
        .flags          = DISPLAY_FLAGS_INTERLACED | DISPLAY_FLAGS_HSYNC_LOW |
-                         DISPLAY_FLAGS_VSYNC_LOW,
+                         DISPLAY_FLAGS_VSYNC_LOW | DISPLAY_FLAGS_DE_HIGH,
 };
 EXPORT_SYMBOL(omap_dss_ntsc_timings);
 
index 695386256d18745e02a82cc1ac29c9d105be6553..8817e38761ae8df9a18991deba687369b6be6af3 100644 (file)
@@ -107,7 +107,7 @@ void copy_timings_drm_to_omap(struct omap_video_timings *timings,
                timings->flags |= DISPLAY_FLAGS_VSYNC_LOW;
 
        timings->data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE;
-       timings->de_level = OMAPDSS_SIG_ACTIVE_HIGH;
+       timings->flags |= DISPLAY_FLAGS_DE_HIGH;
        timings->sync_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE;
 }