Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] lib/intel_bufops: Set NEEDS_VISIBLE_VRAM for each buf by default
@ 2024-12-05 10:41 Dominik Grzegorzek
  2024-12-06  1:31 ` ✗ Xe.CI.BAT: failure for " Patchwork
                   ` (7 more replies)
  0 siblings, 8 replies; 11+ messages in thread
From: Dominik Grzegorzek @ 2024-12-05 10:41 UTC (permalink / raw)
  To: igt-dev; +Cc: Dominik Grzegorzek, Zbigniew Kempczyński

Some tests (i.e. xe_eudebug_online, xe_exec_sip) are mapping intel_buf.
If the backing storage is nvram, any access to mmaped buffer may
cause segmentation fault. Set DRM_XE_GEM_CREATE_FLAG_NEEDS_VISIBLE_VRAM
by default as intel_bufs might be mapped and this is not harmful.

Signed-off-by: Dominik Grzegorzek <dominik.grzegorzek@intel.com>
---
Cc: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>

 lib/intel_bufops.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/intel_bufops.c b/lib/intel_bufops.c
index 619222019..49b91a171 100644
--- a/lib/intel_bufops.c
+++ b/lib/intel_bufops.c
@@ -1021,7 +1021,8 @@ static void __intel_buf_init(struct buf_ops *bops,
 				cpu_caching = DRM_XE_GEM_CPU_CACHING_WC;
 
 			bo_size = ALIGN(bo_size, xe_get_default_alignment(bops->fd));
-			buf->handle = xe_bo_create_caching(bops->fd, 0, bo_size, region, 0,
+			buf->handle = xe_bo_create_caching(bops->fd, 0, bo_size, region,
+							   DRM_XE_GEM_CREATE_FLAG_NEEDS_VISIBLE_VRAM,
 							   cpu_caching);
 		}
 	}
-- 
2.34.1


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

end of thread, other threads:[~2024-12-11  9:26 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-05 10:41 [PATCH i-g-t] lib/intel_bufops: Set NEEDS_VISIBLE_VRAM for each buf by default Dominik Grzegorzek
2024-12-06  1:31 ` ✗ Xe.CI.BAT: failure for " Patchwork
2024-12-06  1:44 ` ✓ i915.CI.BAT: success " Patchwork
2024-12-06  3:06 ` ✗ i915.CI.Full: failure " Patchwork
2024-12-06  4:06 ` ✗ Xe.CI.Full: " Patchwork
2024-12-06 12:15 ` [PATCH i-g-t] " Matthew Auld
2024-12-10 18:23 ` ✗ i915.CI.BAT: failure for lib/intel_bufops: Set NEEDS_VISIBLE_VRAM for each buf by default (rev2) Patchwork
2024-12-11  9:24   ` Grzegorzek, Dominik
2024-12-10 20:12 ` ✓ Xe.CI.BAT: success " Patchwork
2024-12-10 22:22 ` ✗ Xe.CI.Full: failure " Patchwork
2024-12-11  9:26   ` Grzegorzek, Dominik

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