Re: [PATCH] drm/i915: Infrastructure for supporting different GGTT views per object

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 12/01/2014 11:32 AM, Tvrtko Ursulin wrote:
@@ -5430,9 +5434,12 @@ struct i915_vma *i915_gem_obj_to_ggtt(struct
drm_i915_gem_object *obj)
  {
      struct i915_vma *vma;

-    vma = list_first_entry(&obj->vma_list, typeof(*vma), vma_link);
-    if (vma->vm != i915_obj_to_ggtt(obj))
-        return NULL;
+    list_for_each_entry(vma, &obj->vma_list, vma_link) {
+        if (vma->vm != i915_obj_to_ggtt(obj))
+            continue;
+        if (vma->ggtt_view.type == I915_GGTT_VIEW_NORMAL)
+            return vma;
+    }

We fairly put the ggtt vma into the head of the list. Imo better to keep
the head slot reserved for the ggtt normal view, might be some random
code
relying upon this.

Ok.

Although on a second thought - I am not sure this makes sense since alternative views can exist without the normal one. Thoughts?

Regards,

Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux