aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_ringbuffer.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-10-27 07:45:26 -0400
committerChris Wilson <chris@chris-wilson.co.uk>2010-10-27 18:26:34 -0400
commite1f99ce6cac3b6a95551642be5ddb5d9c46bea76 (patch)
treefb5152a582fc5b6c190287d9c90d57ca415d6f9d /drivers/gpu/drm/i915/intel_ringbuffer.h
parent78501eac34f372bfbeb4e1d9de688c13efa916f6 (diff)
drm/i915: Propagate errors from writing to ringbuffer
Preparing the ringbuffer for adding new commands can fail (a timeout whilst waiting for the GPU to catch up and free some space). So check for any potential error before overwriting HEAD with new commands, and propagate that error back to the user where possible. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_ringbuffer.h')
-rw-r--r--drivers/gpu/drm/i915/intel_ringbuffer.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.h b/drivers/gpu/drm/i915/intel_ringbuffer.h
index ba4a393e6d16..35ece2b87b02 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.h
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.h
@@ -100,8 +100,8 @@ intel_read_status_page(struct intel_ring_buffer *ring,
100} 100}
101 101
102void intel_cleanup_ring_buffer(struct intel_ring_buffer *ring); 102void intel_cleanup_ring_buffer(struct intel_ring_buffer *ring);
103int intel_wait_ring_buffer(struct intel_ring_buffer *ring, int n); 103int __must_check intel_wait_ring_buffer(struct intel_ring_buffer *ring, int n);
104void intel_ring_begin(struct intel_ring_buffer *ring, int n); 104int __must_check intel_ring_begin(struct intel_ring_buffer *ring, int n);
105 105
106static inline void intel_ring_emit(struct intel_ring_buffer *ring, 106static inline void intel_ring_emit(struct intel_ring_buffer *ring,
107 u32 data) 107 u32 data)