[Intel-gfx] [PATCH 02/16] drm/i915: Only remove objects pinned to the display from the available aperture

Chris Wilson chris at chris-wilson.co.uk
Mon Apr 27 05:41:13 PDT 2015


With the removal of the pin_ioctl, we need only consider
obj->pin_display when looking at available aperture space.

Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_gem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index afdb604e4005..ec9e36e9ec78 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -157,7 +157,7 @@ i915_gem_get_aperture_ioctl(struct drm_device *dev, void *data,
 	pinned = 0;
 	mutex_lock(&dev->struct_mutex);
 	list_for_each_entry(obj, &dev_priv->mm.bound_list, global_list)
-		if (i915_gem_obj_is_pinned(obj))
+		if (obj->pin_display)
 			pinned += i915_gem_obj_ggtt_size(obj);
 	mutex_unlock(&dev->struct_mutex);
 
-- 
2.1.4



More information about the Intel-gfx mailing list