public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH v2 1/4] drm/i915: Also check view->type for a normal GGTT view
@ 2018-02-20 13:42 Chris Wilson
  2018-02-20 13:42 ` [PATCH v2 2/4] drm/i915: Move the policy for placement of the GGTT vma into the caller Chris Wilson
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Chris Wilson @ 2018-02-20 13:42 UTC (permalink / raw)
  To: intel-gfx

We cannot simply use !view as shorthand for all normal GGTT views as a
few callers will always populate a i915_ggtt_view struct and set the
type to NORMAL instead. So check for (!view || view->type == NORMAL)
inside i915_gem_object_ggtt_pin().

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/i915_gem.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 631a2db2bb6e..1854a69bc354 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -4282,7 +4282,8 @@ i915_gem_object_ggtt_pin(struct drm_i915_gem_object *obj,
 
 	lockdep_assert_held(&obj->base.dev->struct_mutex);
 
-	if (!view && flags & PIN_MAPPABLE) {
+	if ((!view || view->type == I915_GGTT_VIEW_NORMAL) &&
+	    flags & PIN_MAPPABLE) {
 		/* If the required space is larger than the available
 		 * aperture, we will not able to find a slot for the
 		 * object and unbinding the object now will be in
-- 
2.16.1

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

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2018-02-20 20:39 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-20 13:42 [PATCH v2 1/4] drm/i915: Also check view->type for a normal GGTT view Chris Wilson
2018-02-20 13:42 ` [PATCH v2 2/4] drm/i915: Move the policy for placement of the GGTT vma into the caller Chris Wilson
2018-02-20 13:42 ` [PATCH v2 3/4] drm/i915/fbdev: Use the PLANE_HAS_FENCE flags from the time of pinning Chris Wilson
2018-02-20 13:56   ` Ville Syrjälä
2018-02-20 13:42 ` [PATCH v2 4/4] drm/i915/fbc: Use PLANE_HAS_FENCE to determine if the plane is fenced Chris Wilson
2018-02-20 13:59   ` Ville Syrjälä
2018-02-20 14:02     ` Chris Wilson
2018-02-20 14:49 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [v2,1/4] drm/i915: Also check view->type for a normal GGTT view Patchwork
2018-02-20 15:04 ` ✓ Fi.CI.BAT: success " Patchwork
2018-02-20 20:36 ` ✗ Fi.CI.IGT: failure " Patchwork
2018-02-20 20:39   ` Chris Wilson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox