Re: [RFC 5/7] drm/i915: Use i915_sg_create for dmabuf

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

 




On 13/10/2016 10:15, Chris Wilson wrote:
On Thu, Oct 13, 2016 at 10:04:02AM +0100, Tvrtko Ursulin wrote:
-	src = obj->pages->sgl;
-	dst = st->sgl;
-	for (i = 0; i < obj->pages->nents; i++) {
-		sg_set_page(dst, sg_page(src), src->length, 0);
-		dst = sg_next(dst);
-		src = sg_next(src);
-	}
+	for_each_sgt_page(page, sgt_iter, obj->pages)
+		i915_sg_add_page(state, page);
This (and partial_pages) can just copy the existing compact obj->pages.
The previous code should already be as compact as its input. And that is
not a simpler loop!

Ah yes, you are right. A bit too mindless "search and replace" on my part.

Regards,

Tvrtko

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://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