aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_gem_execbuffer.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-01-04 12:34:02 -0500
committerChris Wilson <chris@chris-wilson.co.uk>2011-01-11 15:43:55 -0500
commitb72f3acb71646de073abdc070fe1108866c96634 (patch)
treeb98b4a5a158c000965ecda31257ecca973946a6b /drivers/gpu/drm/i915/i915_gem_execbuffer.c
parent63256ec5347fb2344a42adbae732b90603c92f35 (diff)
drm/i915: Handle ringbuffer stalls when flushing
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem_execbuffer.c')
-rw-r--r--drivers/gpu/drm/i915/i915_gem_execbuffer.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
index 0d42de42868c..1b78b66dd77e 100644
--- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
+++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
@@ -924,7 +924,7 @@ i915_gem_execbuffer_retire_commands(struct drm_device *dev,
924 struct intel_ring_buffer *ring) 924 struct intel_ring_buffer *ring)
925{ 925{
926 struct drm_i915_gem_request *request; 926 struct drm_i915_gem_request *request;
927 u32 flush_domains; 927 u32 invalidate;
928 928
929 /* 929 /*
930 * Ensure that the commands in the batch buffer are 930 * Ensure that the commands in the batch buffer are
@@ -932,11 +932,13 @@ i915_gem_execbuffer_retire_commands(struct drm_device *dev,
932 * 932 *
933 * The sampler always gets flushed on i965 (sigh). 933 * The sampler always gets flushed on i965 (sigh).
934 */ 934 */
935 flush_domains = 0; 935 invalidate = I915_GEM_DOMAIN_COMMAND;
936 if (INTEL_INFO(dev)->gen >= 4) 936 if (INTEL_INFO(dev)->gen >= 4)
937 flush_domains |= I915_GEM_DOMAIN_SAMPLER; 937 invalidate |= I915_GEM_DOMAIN_SAMPLER;
938 938 if (ring->flush(ring, invalidate, 0)) {
939 ring->flush(ring, I915_GEM_DOMAIN_COMMAND, flush_domains); 939 i915_gem_next_request_seqno(dev, ring);
940 return;
941 }
940 942
941 /* Add a breadcrumb for the completion of the batch buffer */ 943 /* Add a breadcrumb for the completion of the batch buffer */
942 request = kzalloc(sizeof(*request), GFP_KERNEL); 944 request = kzalloc(sizeof(*request), GFP_KERNEL);