public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: deepak.s@intel.com
To: intel-gfx@lists.freedesktop.org
Cc: Deepak S <deepak.s@intel.com>
Subject: [PATCH v2] drm/i915/vlv: Update Wait for FIFO and wait for 20 free entries. v2
Date: Fri, 29 Nov 2013 15:44:31 +0530	[thread overview]
Message-ID: <1385720071-19587-1-git-send-email-deepak.s@intel.com> (raw)

From: Deepak S <deepak.s@intel.com>

On VLV, FIFO will be shared by both SW and HW. So, we read the
free entries through register and update dev_priv variable
and wait for only 20 entries to be free

v2: Apply mask when we read the number of free FIFO entries (Ville).

Signed-off-by: Deepak S <deepak.s@intel.com>
---
 drivers/gpu/drm/i915/intel_uncore.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c
index 0db5472..adf2b64 100644
--- a/drivers/gpu/drm/i915/intel_uncore.c
+++ b/drivers/gpu/drm/i915/intel_uncore.c
@@ -150,6 +150,13 @@ static int __gen6_gt_wait_for_fifo(struct drm_i915_private *dev_priv)
 {
 	int ret = 0;
 
+	/* On VLV, FIFO will be shared by both SW and HW.
+	 * So, we need to read the FREE_ENTRIES everytime */
+	if (IS_VALLEYVIEW(dev_priv->dev))
+		dev_priv->uncore.fifo_count =
+			__raw_i915_read32(dev_priv, GTFIFOCTL &
+						GT_FIFO_FREE_ENTRIES_MASK);
+
 	if (dev_priv->uncore.fifo_count < GT_FIFO_NUM_RESERVED_ENTRIES) {
 		int loop = 500;
 		u32 fifo = __raw_i915_read32(dev_priv, GTFIFOCTL) & GT_FIFO_FREE_ENTRIES_MASK;
-- 
1.8.4.2

             reply	other threads:[~2013-11-29 10:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-29 10:14 deepak.s [this message]
2013-11-29 10:38 ` [PATCH v2] drm/i915/vlv: Update Wait for FIFO and wait for 20 free entries. v2 Chris Wilson
2013-11-29 11:22   ` S, Deepak
2013-11-29 11:36     ` Chris Wilson
2013-11-29 11:53       ` S, Deepak
2013-11-29 14:02         ` Daniel Vetter
     [not found]           ` <F359EE24E0B97E4A9739736D2C188EF3FB329A@BGSMSX102.gar.corp.intel.com>
2013-12-04  8:39             ` Daniel Vetter
2013-12-04  9:11               ` S, Deepak
     [not found]             ` <20131204093352.GB9481@nuc-i3427.alporthouse.com>
     [not found]               ` <F359EE24E0B97E4A9739736D2C188EF3FB3616@BGSMSX102.gar.corp.intel.com>
2013-12-04 11:07                 ` Daniel Vetter
2013-12-04 11:22                   ` S, Deepak

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=1385720071-19587-1-git-send-email-deepak.s@intel.com \
    --to=deepak.s@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox