drm/exynos: fimd: get signal polarities from device tree
authorAndrzej Hajda <a.hajda@samsung.com>
Wed, 21 Aug 2013 14:22:02 +0000 (16:22 +0200)
committerInki Dae <inki.dae@samsung.com>
Thu, 5 Sep 2013 04:43:44 +0000 (13:43 +0900)
The patch adds code to get signal polarization setting
from device tree display-timings node.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
drivers/gpu/drm/exynos/exynos_drm_fimd.c

index a183ea7dbd555e8e01b1e5f65cc77e757b1c4b30..6afcaf1645490c2d0abec5a7b079e3137f1b717f 100644 (file)
@@ -915,6 +915,15 @@ static int fimd_probe(struct platform_device *pdev)
                        DRM_ERROR("failed: of_get_videomode() : %d\n", ret);
                        return ret;
                }
+
+               if (vm->flags & DISPLAY_FLAGS_VSYNC_LOW)
+                       pdata->vidcon1 |= VIDCON1_INV_VSYNC;
+               if (vm->flags & DISPLAY_FLAGS_HSYNC_LOW)
+                       pdata->vidcon1 |= VIDCON1_INV_HSYNC;
+               if (vm->flags & DISPLAY_FLAGS_DE_LOW)
+                       pdata->vidcon1 |= VIDCON1_INV_VDEN;
+               if (vm->flags & DISPLAY_FLAGS_PIXDATA_NEGEDGE)
+                       pdata->vidcon1 |= VIDCON1_INV_VCLK;
        } else {
                pdata = dev->platform_data;
                if (!pdata) {