Commit 93db1cb4 authored by Chris Wilson's avatar Chris Wilson
Browse files

drm/i915: Early return for no-op i915_vma_pin_fence()



If we have no fence and desire no fence on the vma, return before we try
and take the vm->mutex.

Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: default avatarMika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200108153550.3803446-1-chris@chris-wilson.co.uk
parent 6e8b0f53
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -412,6 +412,9 @@ int i915_vma_pin_fence(struct i915_vma *vma)
{
	int err;

	if (!vma->fence && !i915_gem_object_is_tiled(vma->obj))
		return 0;

	/*
	 * Note that we revoke fences on runtime suspend. Therefore the user
	 * must keep the device awake whilst using the fence.