drm/exynos/dsi: propagate info about command mode from panel
authorAndrzej Hajda <a.hajda@samsung.com>
Thu, 24 Aug 2017 13:33:53 +0000 (15:33 +0200)
committerInki Dae <inki.dae@samsung.com>
Fri, 25 Aug 2017 02:26:15 +0000 (11:26 +0900)
mipi_dsi framework provides information about panel's mode of work.
This info should be propagated upstream to configure all elements of
the pipeline. As CRTC is the common denominator of the pipeline we can
put such info into its structures.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
drivers/gpu/drm/exynos/exynos_drm_drv.h
drivers/gpu/drm/exynos/exynos_drm_dsi.c

index a93de321706bac0f9cbcb80e087120a4eed99d23..9e77809135f076e48b4db2303a24702ae13d41b9 100644 (file)
@@ -162,6 +162,7 @@ struct exynos_drm_crtc {
        const struct exynos_drm_crtc_ops        *ops;
        void                            *ctx;
        struct exynos_drm_clk           *pipe_clk;
+       bool                            i80_mode : 1;
 };
 
 static inline void exynos_drm_pipe_clk_enable(struct exynos_drm_crtc *crtc,
index 843961b0a6e8ae167a82acaed01f2dfc7b5d8214..7904ffa9abfb95ca17bf3f938b83e19c67a0c897 100644 (file)
@@ -1543,6 +1543,8 @@ static int exynos_dsi_host_attach(struct mipi_dsi_host *host,
                drm_panel_attach(dsi->panel, &dsi->connector);
                dsi->connector.status = connector_status_connected;
        }
+       exynos_drm_crtc_get_by_type(drm, EXYNOS_DISPLAY_TYPE_LCD)->i80_mode =
+                       !(dsi->mode_flags & MIPI_DSI_MODE_VIDEO);
 
        mutex_unlock(&drm->mode_config.mutex);