diff mbox series

[11/12] drm/i915/icl: Send frame to DSI panel

Message ID 1533730559-461-12-git-send-email-madhav.chauhan@intel.com (mailing list archive)
State New, archived
Headers show
Series ICL DSI CMD MODE | expand

Commit Message

Chauhan, Madhav Aug. 8, 2018, 12:15 p.m. UTC
In DSI command mode, for sending the frame to panel
DSI controller need to issue the command unlike in
DSI video mode. This patch does the same.

Signed-off-by: Madhav Chauhan <madhav.chauhan@intel.com>
---
 drivers/gpu/drm/i915/icl_dsi.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/icl_dsi.c b/drivers/gpu/drm/i915/icl_dsi.c
index bd3cdde..af72b57 100644
--- a/drivers/gpu/drm/i915/icl_dsi.c
+++ b/drivers/gpu/drm/i915/icl_dsi.c
@@ -117,6 +117,23 @@  static void gen11_dsi_clear_te_interrupt(struct intel_encoder *encoder)
 
 }
 
+static void gen11_dsi_initiate_frame_req(struct intel_encoder *encoder)
+{
+	struct drm_i915_private *dev_priv = encoder->base.dev->dev_private;
+	struct intel_dsi *intel_dsi = enc_to_intel_dsi(&encoder->base);
+	u32 tmp;
+	enum port port;
+	enum transcoder dsi_trans;
+
+	for_each_dsi_port(port, intel_dsi->ports) {
+		dsi_trans = dsi_port_to_transcoder(port);
+		tmp = I915_READ(DSI_CMD_FRMCTL(dsi_trans));
+		tmp |= PERIODIC_FRAME_UPDATE_ENABLE;
+		I915_WRITE(DSI_CMD_FRMCTL(dsi_trans), tmp);
+	}
+
+}
+
 static void wait_for_cmds_dispatched_to_panel(struct intel_encoder *encoder)
 {
 	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
@@ -900,6 +917,9 @@  static void gen11_dsi_enable_transcoder(struct intel_encoder *encoder)
 					    I965_PIPECONF_ACTIVE, 10))
 			DRM_ERROR("DSI transcoder not enabled\n");
 	}
+
+	/* For command mode, send a frame to panel */
+	gen11_dsi_initiate_frame_req(encoder);
 }
 
 static void gen11_dsi_setup_timeouts(struct intel_encoder *encoder)