[Intel-gfx] [PATCH] drm/i915: Don't return busy for buffers left on the flushing list.
Keith Packard
keithp at keithp.com
Mon Dec 15 19:43:19 CET 2008
On Sun, 2008-12-14 at 19:12 -0800, Eric Anholt wrote:
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index ad672d8..24fe8c1 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -2309,7 +2309,14 @@ i915_gem_busy_ioctl(struct drm_device *dev, void *data,
> }
>
> obj_priv = obj->driver_private;
> - args->busy = obj_priv->active;
> + /* Don't count being on the flushing list against the object being
> + * done. Otherwise, a buffer left on the flushing list but not getting
> + * flushed (because nobody's flushing that domain) won't ever return
> + * unbusy and get reused by libdrm's bo cache. The other expected
> + * 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;
Yes, this looks correct to me (I reviewed when 'active' was set, it's
set for flushing and active objects. A better name seems indicated
here).
--
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20081215/3b8135b3/attachment.sig>
More information about the Intel-gfx
mailing list