public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 2/2] drm/i915: Bump pin_count to UINT_MAX.
Date: Mon, 23 May 2016 15:37:41 +0200	[thread overview]
Message-ID: <1464010661-32674-3-git-send-email-maarten.lankhorst@linux.intel.com> (raw)
In-Reply-To: <1464010661-32674-1-git-send-email-maarten.lankhorst@linux.intel.com>

With nonblocking unpin there can be many cursor pins before they're
cleared by the next page flip.

Fix this by extending pin_count to the full 32-bit to prevent a
WARN_ON(vma->pin_count == DRM_I915_GEM_OBJECT_MAX_PIN_COUNT)

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reported-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Fixes: a6747b7304a9 ("drm/i915: Make unpin async.")
---
 drivers/gpu/drm/i915/i915_gem_gtt.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.h b/drivers/gpu/drm/i915/i915_gem_gtt.h
index 62be77cac5cd..1d43cc290f71 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.h
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.h
@@ -218,8 +218,8 @@ struct i915_vma {
 	 *
 	 * In the worst case this is 1 + 1 + 1 + 2*2 = 7. That would fit into 3
 	 * bits with absolutely no headroom. So use 4 bits. */
-	unsigned int pin_count:4;
-#define DRM_I915_GEM_OBJECT_MAX_PIN_COUNT 0xf
+	unsigned int pin_count;
+#define DRM_I915_GEM_OBJECT_MAX_PIN_COUNT UINT_MAX
 };
 
 struct i915_page_dma {
-- 
2.5.5

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

  parent reply	other threads:[~2016-05-23 13:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-23 13:37 [PATCH 0/2] drm/i915: Fix warnings from atomic nonblocking unpin Maarten Lankhorst
2016-05-23 13:37 ` [PATCH] drm/i915: Wait for flips to complete before returning Maarten Lankhorst
2016-05-23 13:37 ` Maarten Lankhorst [this message]
2016-05-23 14:25   ` [PATCH 2/2] drm/i915: Bump pin_count to UINT_MAX Chris Wilson
2016-05-23 15:09     ` Maarten Lankhorst
2016-05-23 15:43       ` Chris Wilson
2016-05-23 16:09         ` Maarten Lankhorst
2016-05-23 21:30           ` Chris Wilson
2016-05-24  8:22   ` Daniel Vetter
2016-05-23 13:43 ` [PATCH 1/2] drm/i915: Wait for flips to complete before returning Maarten Lankhorst
2016-05-23 14:08 ` [PATCH 3/2] Revert "drm/i915: Allow nonblocking update of pageflips." Maarten Lankhorst
2016-05-23 14:53 ` ✗ Ro.CI.BAT: warning for drm/i915: Wait for flips to complete before returning Patchwork
2016-05-23 15:16 ` ✗ Ro.CI.BAT: failure " Patchwork

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=1464010661-32674-3-git-send-email-maarten.lankhorst@linux.intel.com \
    --to=maarten.lankhorst@linux.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