Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1b683729 authored by Tvrtko Ursulin's avatar Tvrtko Ursulin Committed by Jani Nikula
Browse files

drm/i915: Remove redundant check in i915_gem_obj_to_vma



No need to verify VMA belongs to GGTT since:

1. The function must return a normal VMA belonging to passed in VM.
2. There can only be one normal VMA for any VM.

Signed-off-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by Chris Wilson <chris@chris-wilson.co.uk>
Link: http://patchwork.freedesktop.org/patch/msgid/1447329595-17495-1-git-send-email-tvrtko.ursulin@linux.intel.com


Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
parent af9b9c19
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -4484,10 +4484,8 @@ struct i915_vma *i915_gem_obj_to_vma(struct drm_i915_gem_object *obj,
{
	struct i915_vma *vma;
	list_for_each_entry(vma, &obj->vma_list, vma_link) {
		if (i915_is_ggtt(vma->vm) &&
		    vma->ggtt_view.type != I915_GGTT_VIEW_NORMAL)
			continue;
		if (vma->vm == vm)
		if (vma->ggtt_view.type == I915_GGTT_VIEW_NORMAL &&
		    vma->vm == vm)
			return vma;
	}
	return NULL;