Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] drm/i915/gem: Execbuffer objects must have struct pages.
@ 2024-03-12 14:55 Jonathan Cavitt
  2024-03-12 19:06 ` ✗ Fi.CI.BAT: failure for drm/i915/gem: Execbuffer objects must have struct pages. (rev2) Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jonathan Cavitt @ 2024-03-12 14:55 UTC (permalink / raw)
  To: intel-gfx
  Cc: saurabhg.gupta, jonathan.cavitt, matthew.d.roper,
	lionel.g.landwerlin, chris.p.wilson, brian.welty

We cannot write requests to objects without struct pages, so escape
early if the requests are bound to objects that lack them.

Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
---

v2: s/vma-obj/vma->obj

 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
index d3a771afb083e..adb4f9e78cb49 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
@@ -3313,6 +3313,13 @@ eb_requests_create(struct i915_execbuffer *eb, struct dma_fence *in_fence,
 	unsigned int i;
 
 	for_each_batch_create_order(eb, i) {
+		/* Do not write requests to objects without struct pages. */
+		if (eb->batches[i]->vma &&
+		    !i915_gem_object_has_struct_page(eb->batches[i]->vma->obj)) {
+			out_fence = ERR_PTR(-EINVAL);
+			return out_fence;
+		}
+
 		/* Allocate a request for this batch buffer nice and early. */
 		eb->requests[i] = i915_request_create(eb_find_context(eb, i));
 		if (IS_ERR(eb->requests[i])) {
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-03-14 16:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-12 14:55 [PATCH v2] drm/i915/gem: Execbuffer objects must have struct pages Jonathan Cavitt
2024-03-12 19:06 ` ✗ Fi.CI.BAT: failure for drm/i915/gem: Execbuffer objects must have struct pages. (rev2) Patchwork
2024-03-14 13:51 ` [PATCH v2] drm/i915/gem: Execbuffer objects must have struct pages Andi Shyti
2024-03-14 16:41 ` Nirmoy Das

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox