drm/i915: track gpu fence usage more precisely
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 11 Feb 2010 17:11:25 +0000 (18:11 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 2 Mar 2010 22:52:53 +0000 (23:52 +0100)
commit791c7dfd38d53718b9c1ddcc51160bcc6fe454bc
treef633da231594bd4c06cf9c8e76f5a87309ef7183
parentbecf0e4a9f826bc21c1906d6071ff661dc665085
drm/i915: track gpu fence usage more precisely

With execbuf2, not every buffer on the active list that has a
fence reg allocated necessarily needs it. Track this usage more
precisely.

Instead of wasting another 30 bits in struct drm_i915_gem_object,
I've decided to put all flags and small integer fields together
and convert them into C bitfields.

v2: Fixes and small cleanups for the fence state tracking.
v3: Add current_execbuffer_needs_fencing to correctly recover
from errors in i915_gem_do_execbuffer. Also clarify the usage
of fenced_gpu_access.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem.c