diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-10-27 11:11:02 -0400 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-10-27 18:31:03 -0400 |
commit | 3cce469cab880ef8990d2d16d745bf85443fc998 (patch) | |
tree | 929b8ae6f2a693d2a793e8ddd82d5c0957b2414d /drivers/gpu/drm/i915/intel_overlay.c | |
parent | b2223497b44a4701d1be873d1e9453d7f720043b (diff) |
drm/i915: Propagate error from failing to queue a request
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_overlay.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_overlay.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/drivers/gpu/drm/i915/intel_overlay.c b/drivers/gpu/drm/i915/intel_overlay.c index 78fa6a249964..2d4a6968cd76 100644 --- a/drivers/gpu/drm/i915/intel_overlay.c +++ b/drivers/gpu/drm/i915/intel_overlay.c | |||
@@ -221,11 +221,12 @@ static int intel_overlay_do_wait_request(struct intel_overlay *overlay, | |||
221 | int ret; | 221 | int ret; |
222 | 222 | ||
223 | BUG_ON(overlay->last_flip_req); | 223 | BUG_ON(overlay->last_flip_req); |
224 | overlay->last_flip_req = | 224 | ret = i915_add_request(dev, NULL, request, &dev_priv->render_ring); |
225 | i915_add_request(dev, NULL, request, &dev_priv->render_ring); | 225 | if (ret) { |
226 | if (overlay->last_flip_req == 0) | 226 | kfree(request); |
227 | return -ENOMEM; | 227 | return ret; |
228 | 228 | } | |
229 | overlay->last_flip_req = request->seqno; | ||
229 | overlay->flip_tail = tail; | 230 | overlay->flip_tail = tail; |
230 | ret = i915_do_wait_request(dev, | 231 | ret = i915_do_wait_request(dev, |
231 | overlay->last_flip_req, true, | 232 | overlay->last_flip_req, true, |
@@ -363,8 +364,13 @@ static int intel_overlay_continue(struct intel_overlay *overlay, | |||
363 | OUT_RING(flip_addr); | 364 | OUT_RING(flip_addr); |
364 | ADVANCE_LP_RING(); | 365 | ADVANCE_LP_RING(); |
365 | 366 | ||
366 | overlay->last_flip_req = | 367 | ret = i915_add_request(dev, NULL, request, &dev_priv->render_ring); |
367 | i915_add_request(dev, NULL, request, &dev_priv->render_ring); | 368 | if (ret) { |
369 | kfree(request); | ||
370 | return ret; | ||
371 | } | ||
372 | |||
373 | overlay->last_flip_req = request->seqno; | ||
368 | return 0; | 374 | return 0; |
369 | } | 375 | } |
370 | 376 | ||