All of lore.kernel.org
 help / color / mirror / Atom feed
From: Deepak M <m.deepak@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Deepak M <m.deepak@intel.com>, Gaurav K Singh <gaurav.k.singh@intel.com>
Subject: [PATCH] drm/i915: Add DPI FIFO empty status check
Date: Fri,  4 Dec 2015 21:41:17 +0530	[thread overview]
Message-ID: <1449245477-16401-1-git-send-email-m.deepak@intel.com> (raw)
In-Reply-To: <20151204094948.GN4437@intel.com>

From: Gaurav K Singh <gaurav.k.singh@intel.com>

Before sending TURN ON packet,check the DPI
FIFO empty status.

v2: Change in commit message
    Checking for FIFO empty  only during TURN ON packet.

Signed-off-by: Gaurav K Singh <gaurav.k.singh@intel.com>
Signed-off-by: Deepak M <m.deepak@intel.com>
---
Got to know about the patch where they are removing this
DPI FIFO empty check while sending the SHUTDOWN packet.

http://lists.freedesktop.org/archives/intel-gfx/2014-July/048401.html

According added the check and waiting for DPI FIFIO empty
only when TURN_ON packet is sent.

 drivers/gpu/drm/i915/intel_dsi.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_dsi.c b/drivers/gpu/drm/i915/intel_dsi.c
index 170ae6f..495056f 100644
--- a/drivers/gpu/drm/i915/intel_dsi.c
+++ b/drivers/gpu/drm/i915/intel_dsi.c
@@ -222,6 +222,12 @@ static int dpi_send_cmd(struct intel_dsi *intel_dsi, u32 cmd, bool hs,
 	else
 		cmd |= DPI_LP_MODE;
 
+	mask = DPI_FIFO_EMPTY;
+
+	if ((cmd & TURN_ON) && wait_for((I915_READ(MIPI_GEN_FIFO_STAT(port)) &
+			mask) == mask, 50))
+		DRM_ERROR("Timeout waiting for DPI FIFO empty\n");
+
 	/* clear bit */
 	I915_WRITE(MIPI_INTR_STAT(port), SPL_PKT_SENT_INTERRUPT);
 
-- 
1.9.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2015-12-04 10:37 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-04 14:17 [PATCH 1/3] drm/i915: Add DPI FIFO empty status check Deepak M
2015-12-04  9:49 ` Ville Syrjälä
2015-12-04  9:55   ` Deepak, M
2015-12-04 16:11   ` Deepak M [this message]
2015-12-04 11:26     ` [PATCH] " Ville Syrjälä
2015-12-09 11:35       ` Deepak M
2015-12-09 14:34         ` Ville Syrjälä
2015-12-10  9:08           ` Daniel Vetter
2016-01-22  8:31           ` Jani Nikula
2015-12-04 14:17 ` [PATCH 2/3] drm/i915: Correct the Ref clock value for BXT Deepak M
2015-12-04  9:55   ` Ville Syrjälä
2015-12-04 16:22     ` Daniel Vetter
2015-12-04 16:25       ` Deepak, M
2015-12-04 17:20         ` Ville Syrjälä
2015-12-04 14:17 ` [PATCH 3/3] drm/i915: Use the ceil value for the additional clk divider Deepak M
2015-12-04 11:51   ` Ville Syrjälä
2015-12-04 16:59     ` Deepak, M
2016-01-20 11:06 ` [PATCH 1/3] drm/i915: Add DPI FIFO empty status check Mika Kahola

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=1449245477-16401-1-git-send-email-m.deepak@intel.com \
    --to=m.deepak@intel.com \
    --cc=gaurav.k.singh@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /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.