aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorJohn Harrison <John.C.Harrison@Intel.com>2014-12-05 13:49:33 +0000
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-12-06 01:46:26 +0100
commit146d84f0f2707bfe2c67114eeefac30da8584b3b (patch)
treea8d9403d05c55b340a7085317acab1898998f252 /drivers/gpu
parentdrm/i915: Make all plane disables use 'update_plane' (v5) (diff)
drm/i915: Fix up seqno -> request merge issues
The display related patches earlier in this series were edited during merge to improve the request unreferencing. Specifically, the need for de-referencing at interrupt time was removed. However, the resulting code did a 'deref(req) ; req = NULL' sequence rather than using the 'req_assign(req, NULL)' wrapper. The two are functionally equivalent, but using the wrapper is more consistent with all the other places where requests are assigned. Note that the whole point of the wrapper is that using it everywhere that request pointers are assigned means that the reference counting is done automatically and can't be accidentally forgotten about. Plus it allows simpler future maintainance if the reference counting mechanisms ever need to change. For: VIZ-4377 Signed-off-by: John Harrison <John.C.Harrison@Intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/i915/intel_display.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index c17419bb8bc0..42e661e05a32 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -8953,8 +8953,7 @@ static void intel_unpin_work_fn(struct work_struct *__work)
intel_update_fbc(dev);
if (work->flip_queued_req)
- i915_gem_request_unreference(work->flip_queued_req);
- work->flip_queued_req = NULL;
+ i915_gem_request_assign(&work->flip_queued_req, NULL);
mutex_unlock(&dev->struct_mutex);
intel_frontbuffer_flip_complete(dev, INTEL_FRONTBUFFER_PRIMARY(pipe));
@@ -9452,10 +9451,9 @@ static void intel_mmio_flip_work_func(struct work_struct *work)
intel_do_mmio_flip(crtc);
if (mmio_flip->req) {
mutex_lock(&crtc->base.dev->struct_mutex);
- i915_gem_request_unreference(mmio_flip->req);
+ i915_gem_request_assign(&mmio_flip->req, NULL);
mutex_unlock(&crtc->base.dev->struct_mutex);
}
- mmio_flip->req = NULL;
}
static int intel_queue_mmio_flip(struct drm_device *dev,