summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_vma.c
diff options
context:
space:
mode:
authorChris Wilson2017-10-09 10:43:56 +0200
committerChris Wilson2017-10-09 18:07:29 +0200
commit3bd4073524fa1586435725ad45ff971a6c2b2537 (patch)
tree16bdf72a39478129fd482dba9e1be02902fe0f12 /drivers/gpu/drm/i915/i915_vma.c
parentdrm/i915: Pin fence for iomap (diff)
downloadkernel-qcow2-linux-3bd4073524fa1586435725ad45ff971a6c2b2537.tar.gz
kernel-qcow2-linux-3bd4073524fa1586435725ad45ff971a6c2b2537.tar.xz
kernel-qcow2-linux-3bd4073524fa1586435725ad45ff971a6c2b2537.zip
drm/i915: Consolidate get_fence with pin_fence
Following the pattern now used for obj->mm.pages, use just pin_fence and unpin_fence to control access to the fence registers. I.e. instead of calling get_fence(); pin_fence(), we now just need to call pin_fence(). This will make it easier to reduce the locking requirements around fence registers. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Link: https://patchwork.freedesktop.org/patch/msgid/20171009084401.29090-2-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_vma.c')
-rw-r--r--drivers/gpu/drm/i915/i915_vma.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/i915_vma.c b/drivers/gpu/drm/i915/i915_vma.c
index 595209a2f159..2b0083c34914 100644
--- a/drivers/gpu/drm/i915/i915_vma.c
+++ b/drivers/gpu/drm/i915/i915_vma.c
@@ -309,12 +309,10 @@ void __iomem *i915_vma_pin_iomap(struct i915_vma *vma)
__i915_vma_pin(vma);
- err = i915_vma_get_fence(vma);
+ err = i915_vma_pin_fence(vma);
if (err)
goto err_unpin;
- i915_vma_pin_fence(vma);
-
return ptr;
err_unpin: