drm/exynos: add TE handler to support LCD I80 interface
authorYoungJun Cho <yj44.cho@samsung.com>
Wed, 18 Jun 2014 09:15:41 +0000 (18:15 +0900)
committerChanho Park <chanho61.park@samsung.com>
Tue, 18 Nov 2014 02:59:56 +0000 (11:59 +0900)
To support LCD I80 interface, the panel should generates
Tearing Effect synchronization signal between MCU and FB
to display video images.
And the display controller should trigger to transfer
video image at this signal.
So the panel receives the TE IRQ, then calls this handler
chains to notify it to the display controller.

Change-Id: Ie60112b9b135bb8a1b05a01fedcd62bd65fc59cd
Signed-off-by: YoungJun Cho <yj44.cho@samsung.com>
Acked-by: Inki Dae <inki.dae@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
drivers/gpu/drm/exynos/exynos_drm_crtc.c
drivers/gpu/drm/exynos/exynos_drm_crtc.h
drivers/gpu/drm/exynos/exynos_drm_drv.h
include/drm/drm_mipi_dsi.h

index 1c7dd47..22a8d1b 100644 (file)
@@ -614,3 +614,14 @@ void exynos_drm_crtc_complete_scanout(struct drm_framebuffer *fb)
                        manager->ops->wait_for_vblank(manager);
        }
 }
+
+int exynos_drm_crtc_te_handler(struct drm_crtc *crtc)
+{
+       struct exynos_drm_manager *manager = to_exynos_crtc(crtc)->manager;
+       int ret = 0;
+
+       if (manager->ops->te_handler)
+               ret = manager->ops->te_handler(manager);
+
+       return ret;
+}
index c27b66c..eb78c16 100644 (file)
@@ -32,4 +32,11 @@ void exynos_drm_crtc_plane_commit(struct drm_crtc *crtc, int zpos);
 void exynos_drm_crtc_plane_enable(struct drm_crtc *crtc, int zpos);
 void exynos_drm_crtc_plane_disable(struct drm_crtc *crtc, int zpos);
 
+/*
+ * This function calls the crtc device(manager)'s te_handler() callback
+ * to trigger to transfer video image at the tearing effect synchronization
+ * signal.
+ */
+int exynos_drm_crtc_te_handler(struct drm_crtc *crtc);
+
 #endif
index a8002cc..c37055c 100644 (file)
@@ -186,6 +186,8 @@ struct exynos_drm_display {
  * @win_commit: apply hardware specific overlay data to registers.
  * @win_enable: enable hardware specific overlay.
  * @win_disable: disable hardware specific overlay.
+ * @te_handler: trigger to transfer video image at the tearing effect
+ *     synchronization signal if there is a page flip request.
  */
 struct exynos_drm_manager;
 struct exynos_drm_manager_ops {
@@ -207,6 +209,7 @@ struct exynos_drm_manager_ops {
        void (*win_commit)(struct exynos_drm_manager *mgr, int zpos);
        void (*win_enable)(struct exynos_drm_manager *mgr, int zpos);
        void (*win_disable)(struct exynos_drm_manager *mgr, int zpos);
+       int (*te_handler)(struct exynos_drm_manager *mgr);
 };
 
 /*
index 7209df1..f6d4c85 100644 (file)
@@ -49,6 +49,13 @@ struct mipi_dsi_msg {
  * @detach: detach DSI device from DSI host
  * @transfer: send and/or receive DSI packet, return number of received bytes,
  *           or error
+ * @te_handler: call the crtc te_handler() callback from DSI host.
+ *             The panel generates tearing effect synchronization signal
+ *             between MCU and FB to display video images.
+ *             And the display controller should trigger to transfer video
+ *             image at this signal.
+ *             So the panel receives the TE IRQ, then calls this handler
+ *             to notify it to the display controller.
  */
 struct mipi_dsi_host_ops {
        int (*attach)(struct mipi_dsi_host *host,
@@ -57,6 +64,7 @@ struct mipi_dsi_host_ops {
                      struct mipi_dsi_device *dsi);
        ssize_t (*transfer)(struct mipi_dsi_host *host,
                            struct mipi_dsi_msg *msg);
+       int (*te_handler)(struct mipi_dsi_host *host);
 };
 
 /**