Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/gem: Execbuffer objects must have struct pages.
@ 2024-03-11 20:37 Jonathan Cavitt
  2024-03-12  2:55 ` ✗ Fi.CI.BUILD: failure for " Patchwork
  0 siblings, 1 reply; 2+ messages in thread
From: Jonathan Cavitt @ 2024-03-11 20:37 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>
---
 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..e680f78ce34d1 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] 2+ messages in thread

* ✗ Fi.CI.BUILD: failure for drm/i915/gem: Execbuffer objects must have struct pages.
  2024-03-11 20:37 [PATCH] drm/i915/gem: Execbuffer objects must have struct pages Jonathan Cavitt
@ 2024-03-12  2:55 ` Patchwork
  0 siblings, 0 replies; 2+ messages in thread
From: Patchwork @ 2024-03-12  2:55 UTC (permalink / raw)
  To: Jonathan Cavitt; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/gem: Execbuffer objects must have struct pages.
URL   : https://patchwork.freedesktop.org/series/131000/
State : failure

== Summary ==

Error: make failed
  CALL    scripts/checksyscalls.sh
  DESCEND objtool
  INSTALL libsubcmd_headers
  CC [M]  drivers/gpu/drm/i915/gem/i915_gem_execbuffer.o
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c: In function ‘eb_requests_create’:
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c:3318:60: error: ‘obj’ undeclared (first use in this function)
 3318 |       !i915_gem_object_has_struct_page(eb->batches[i]->vma-obj)) {
      |                                                            ^~~
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c:3318:60: note: each undeclared identifier is reported only once for each function it appears in
make[6]: *** [scripts/Makefile.build:243: drivers/gpu/drm/i915/gem/i915_gem_execbuffer.o] Error 1
make[5]: *** [scripts/Makefile.build:481: drivers/gpu/drm/i915] Error 2
make[4]: *** [scripts/Makefile.build:481: drivers/gpu/drm] Error 2
make[3]: *** [scripts/Makefile.build:481: drivers/gpu] Error 2
make[2]: *** [scripts/Makefile.build:481: drivers] Error 2
make[1]: *** [/home/kbuild/kernel/Makefile:1921: .] Error 2
make: *** [Makefile:240: __sub-make] Error 2
Build failed, no error log produced



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

end of thread, other threads:[~2024-03-12  2:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-11 20:37 [PATCH] drm/i915/gem: Execbuffer objects must have struct pages Jonathan Cavitt
2024-03-12  2:55 ` ✗ Fi.CI.BUILD: failure for " Patchwork

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