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

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

 




On 12/04/2014 09:53 AM, Chris Wilson wrote:
On Wed, Dec 03, 2014 at 02:59:25PM +0000, Tvrtko Ursulin wrote:
+void i915_vma_bind(struct i915_vma *vma, enum i915_cache_level cache_level,
+		   u32 flags)
+{
+	struct sg_table *pages = i915_ggtt_view_pages(vma);
+
+	if (pages && !IS_ERR(pages)) {
+		vma->bind_vma(vma, pages, cache_level, flags);
+
+		if (vma->ggtt_view.type != I915_GGTT_VIEW_NORMAL) {
+			sg_free_table(pages);
+			kfree(pages);
+		}
+	}
+}

Stop. Even if the failure path is impossible with the present
implementation, here you are masking the error only to go and pretend
the binding succeeded.

Don't be lazy, this is a very nasty bug that should be hit during igt -
or else you are not testing well enough.

Fair comment, even if a bit too assuming. I actually had this as TODO but somehow lost it.

I don't have any ideas on how to provoke this to fail from an IGT? Even with future implementations it boils down to a couple of small allocations which would have to fail reliably.

But will add the error path for it.

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