All of lore.kernel.org
 help / color / mirror / Atom feed
From: YoungJun Cho <yj44.cho@samsung.com>
To: airlied@linux.ie, dri-devel@lists.freedesktop.org
Cc: devicetree@vger.kernel.org, robh+dt@kernel.org,
	pawel.moll@arm.com, mark.rutland@arm.com,
	ijc+devicetree@hellion.org.uk, galak@codeaurora.org,
	linux-samsung-soc@vger.kernel.org, thierry.reding@gmail.com,
	kyungmin.park@samsung.com, inki.dae@samsung.com,
	kgene.kim@samsung.com, jy0922.shim@samsung.com,
	sw0312.kim@samsung.com, a.hajda@samsung.com
Subject: [PATCH v4 04/14] drm/exynos: add TE handler to support LCD I80 interface
Date: Thu, 05 Jun 2014 15:19:44 +0900	[thread overview]
Message-ID: <1401949194-20092-5-git-send-email-yj44.cho@samsung.com> (raw)
In-Reply-To: <1401949194-20092-1-git-send-email-yj44.cho@samsung.com>

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.

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>
---
 drivers/gpu/drm/exynos/exynos_drm_crtc.c |   11 +++++++++++
 drivers/gpu/drm/exynos/exynos_drm_crtc.h |    7 +++++++
 drivers/gpu/drm/exynos/exynos_drm_drv.h  |    3 +++
 include/drm/drm_mipi_dsi.h               |    8 ++++++++
 4 files changed, 29 insertions(+)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
index 3bf091d..504e023 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
@@ -511,3 +511,14 @@ int exynos_drm_crtc_get_pipe_from_type(struct drm_device *drm_dev,
 
 	return -EPERM;
 }
+
+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;
+}
diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.h b/drivers/gpu/drm/exynos/exynos_drm_crtc.h
index 9f74b10..875d93d 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_crtc.h
+++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.h
@@ -36,4 +36,11 @@ void exynos_drm_crtc_plane_disable(struct drm_crtc *crtc, int zpos);
 int exynos_drm_crtc_get_pipe_from_type(struct drm_device *drm_dev,
 					unsigned int out_type);
 
+/*
+ * 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
diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.h b/drivers/gpu/drm/exynos/exynos_drm_drv.h
index 36535f3..ab3a88d 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_drv.h
+++ b/drivers/gpu/drm/exynos/exynos_drm_drv.h
@@ -188,6 +188,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 {
@@ -206,6 +208,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);
 };
 
 /*
diff --git a/include/drm/drm_mipi_dsi.h b/include/drm/drm_mipi_dsi.h
index 7209df1..f6d4c85 100644
--- a/include/drm/drm_mipi_dsi.h
+++ b/include/drm/drm_mipi_dsi.h
@@ -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);
 };
 
 /**
-- 
1.7.9.5

  parent reply	other threads:[~2014-06-05  6:19 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-05  6:19 [PATCH v4 00/14] drm/exynos: support LCD I80 interface display YoungJun Cho
2014-06-05  6:19 ` [PATCH v4 01/14] drm/exynos: dsi: move the EoT packets configuration point YoungJun Cho
2014-06-05  6:19 ` [PATCH v4 02/14] drm/exynos: use wait_event_timeout() for safety usage YoungJun Cho
2014-06-05  6:19 ` [PATCH v4 03/14] ARM: dts: samsung-fimd: add LCD I80 interface specific properties YoungJun Cho
2014-06-05  6:19 ` YoungJun Cho [this message]
2014-06-05  6:19 ` [PATCH v4 05/14] drm/exynos: dsi: add TE handler to support LCD I80 interface YoungJun Cho
2014-06-05  6:19 ` [PATCH v4 06/14] drm/exynos: fimd: " YoungJun Cho
2014-06-05  6:19 ` [PATCH v4 07/14] ARM: dts: exynos_dsim: add exynos5420 compatible to DT bindings YoungJun Cho
2014-06-05  6:19 ` [PATCH v4 08/14] drm/exynos: dsi: add driver data to support Exynos5420 YoungJun Cho
2014-06-05  6:19 ` [PATCH v4 09/14] ARM: dts: s6e3fa0: add DT bindings YoungJun Cho
2014-06-05  6:19 ` [PATCH v4 10/14] drm/panel: add S6E3FA0 driver YoungJun Cho
2014-06-05  6:19 ` [PATCH v4 11/14] ARM: dts: exynos4: add system register property YoungJun Cho
2014-06-05  6:19 ` [PATCH v4 12/14] ARM: dts: exynos5: " YoungJun Cho
2014-06-05  6:19 ` [PATCH v4 13/14] ARM: dts: exynos5420: add mipi-phy node YoungJun Cho
2014-06-05  6:19 ` [PATCH v4 14/14] ARM: dts: exynos5420: add dsi node YoungJun Cho
2014-06-05  8:14 ` [PATCH v4 00/14] drm/exynos: support LCD I80 interface display Inki Dae
2014-06-05  8:20   ` Thierry Reding
2014-06-05  8:43     ` Inki Dae
2014-06-05  8:51       ` Thierry Reding

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1401949194-20092-5-git-send-email-yj44.cho@samsung.com \
    --to=yj44.cho@samsung.com \
    --cc=a.hajda@samsung.com \
    --cc=airlied@linux.ie \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=galak@codeaurora.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=inki.dae@samsung.com \
    --cc=jy0922.shim@samsung.com \
    --cc=kgene.kim@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=sw0312.kim@samsung.com \
    --cc=thierry.reding@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.