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>
This commit is contained in:
@@ -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:
|
||||
|
Reference in New Issue
Block a user