drm/i915: Only change the context object's domain when binding
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 15 Aug 2016 09:48:55 +0000 (10:48 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 15 Aug 2016 10:01:03 +0000 (11:01 +0100)
commit7abc98fadfdd060e54fdb7172e2753a2f9808366
tree42be80bf58372137b8ec14b395a81783716c4ab7
parentbf3783e52a8929c738c5c8c5fa1df7e267b5271d
drm/i915: Only change the context object's domain when binding

We know that the only access to the context object is via the GPU, and
the only time when it can be out of the GPU domain is when it is swapped
out and unbound. Therefore we only need to clflush the object when
binding, thus avoiding any potential stall on touching the domain on an
active context.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1471254551-25805-16-git-send-email-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem_context.c
drivers/gpu/drm/i915/intel_ringbuffer.c