[Intel-gfx] [PATCH] drm/i915: Mark pinned objects as busy.

Chris Wilson chris at chris-wilson.co.uk
Fri Feb 20 17:33:38 CET 2009


A pinned object, such as a scan-out buffer, needs to be marked as busy,
to prevent reuse via the bo cache within libdrm.

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

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index a1c0950..094a823 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3019,7 +3019,8 @@ i915_gem_busy_ioctl(struct drm_device *dev, void *data,
 	 * consumer of this interface, OpenGL's occlusion queries, also specs
 	 * that the objects get unbusy "eventually" without any interference.
 	 */
-	args->busy = obj_priv->active && obj_priv->last_rendering_seqno != 0;
+	args->busy = obj_priv->pin_count != 0 ||
+	             (obj_priv->active && obj_priv->last_rendering_seqno != 0);
 
 	drm_gem_object_unreference(obj);
 	mutex_unlock(&dev->struct_mutex);
-- 
1.6.0.4




More information about the Intel-gfx mailing list