Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 1/4] drm/xe: Add uapi for dumpable bos
@ 2024-02-02 22:40 Maarten Lankhorst
  2024-02-02 22:40 ` [PATCH v3 2/4] drm/xe: Annotate each dumpable vma as such Maarten Lankhorst
                   ` (17 more replies)
  0 siblings, 18 replies; 27+ messages in thread
From: Maarten Lankhorst @ 2024-02-02 22:40 UTC (permalink / raw)
  To: intel-xe; +Cc: Maarten Lankhorst

Add the flag XE_VM_BIND_FLAG_DUMPABLE to notify devcoredump that this
mapping should be dumped.

This is not hooked up, but the uapi should be ready before merging.

It's likely easier to dump the contents of the bo's at devcoredump
readout time, so it's better if the bos will stay unmodified after
a hang. The NEEDS_CPU_MAPPING flag is removed as requirement.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
 drivers/gpu/drm/xe/xe_vm.c | 8 +++-----
 include/uapi/drm/xe_drm.h  | 1 +
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c
index 9c1c68a2fff73..c521bca9105e1 100644
--- a/drivers/gpu/drm/xe/xe_vm.c
+++ b/drivers/gpu/drm/xe/xe_vm.c
@@ -2717,12 +2717,13 @@ static int vm_bind_ioctl_ops_execute(struct xe_vm *vm,
 #ifdef TEST_VM_ASYNC_OPS_ERROR
 #define SUPPORTED_FLAGS	\
 	(FORCE_ASYNC_OP_ERROR | DRM_XE_VM_BIND_FLAG_READONLY | \
-	 DRM_XE_VM_BIND_FLAG_IMMEDIATE | DRM_XE_VM_BIND_FLAG_NULL | 0xffff)
+	 DRM_XE_VM_BIND_FLAG_IMMEDIATE | DRM_XE_VM_BIND_FLAG_NULL | \
+	 DRM_XE_VM_BIND_FLAG_DUMPABLE | 0xffff)
 #else
 #define SUPPORTED_FLAGS	\
 	(DRM_XE_VM_BIND_FLAG_READONLY | \
 	 DRM_XE_VM_BIND_FLAG_IMMEDIATE | DRM_XE_VM_BIND_FLAG_NULL | \
-	 0xffff)
+	 DRM_XE_VM_BIND_FLAG_DUMPABLE | 0xffff)
 #endif
 #define XE_64K_PAGE_MASK 0xffffull
 #define ALL_DRM_XE_SYNCS_FLAGS (DRM_XE_SYNCS_FLAG_WAIT_FOR_OP)
@@ -2949,9 +2950,6 @@ int xe_vm_bind_ioctl(struct drm_device *dev, void *data, struct drm_file *file)
 		u16 pat_index = bind_ops[i].pat_index;
 		u16 coh_mode;
 
-		if (!obj)
-			continue;
-
 		gem_obj = drm_gem_object_lookup(file, obj);
 		if (XE_IOCTL_DBG(xe, !gem_obj)) {
 			err = -ENOENT;
diff --git a/include/uapi/drm/xe_drm.h b/include/uapi/drm/xe_drm.h
index 50bbea0992d9c..0f975f57f3e59 100644
--- a/include/uapi/drm/xe_drm.h
+++ b/include/uapi/drm/xe_drm.h
@@ -930,6 +930,7 @@ struct drm_xe_vm_bind_op {
 #define DRM_XE_VM_BIND_FLAG_READONLY	(1 << 0)
 #define DRM_XE_VM_BIND_FLAG_IMMEDIATE	(1 << 1)
 #define DRM_XE_VM_BIND_FLAG_NULL	(1 << 2)
+#define DRM_XE_VM_BIND_FLAG_DUMPABLE	(1 << 3)
 	/** @flags: Bind flags */
 	__u32 flags;
 
-- 
2.43.0


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

end of thread, other threads:[~2024-02-13 14:42 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-02 22:40 [PATCH v3 1/4] drm/xe: Add uapi for dumpable bos Maarten Lankhorst
2024-02-02 22:40 ` [PATCH v3 2/4] drm/xe: Annotate each dumpable vma as such Maarten Lankhorst
2024-02-02 22:40 ` [PATCH v3 3/4] drm/xe: Add vm snapshot mutex for easily taking a vm snapshot during devcoredump Maarten Lankhorst
2024-02-02 22:40 ` [PATCH v3 4/4] drm/xe: Implement VM snapshot support for BO's and userptr Maarten Lankhorst
2024-02-02 22:45   ` [PATCH v3.1] " Maarten Lankhorst
2024-02-05 16:32     ` Souza, Jose
2024-02-05 20:35       ` Souza, Jose
2024-02-06 20:08         ` Souza, Jose
2024-02-13 14:41           ` Maarten Lankhorst
2024-02-05 16:47     ` Souza, Jose
2024-02-13 14:28       ` Maarten Lankhorst
2024-02-05 20:36   ` [PATCH v3 4/4] " Souza, Jose
2024-02-02 23:55 ` ✓ CI.Patch_applied: success for series starting with [v3,1/4] drm/xe: Add uapi for dumpable bos (rev2) Patchwork
2024-02-02 23:55 ` ✗ CI.checkpatch: warning " Patchwork
2024-02-02 23:56 ` ✓ CI.KUnit: success " Patchwork
2024-02-03  0:03 ` ✓ CI.Build: " Patchwork
2024-02-03  0:03 ` ✓ CI.Hooks: " Patchwork
2024-02-03  0:05 ` ✓ CI.checksparse: " Patchwork
2024-02-03  0:30 ` ✗ CI.BAT: failure " Patchwork
2024-02-05 10:00 ` [PATCH] drm/xe: Add uapi for dumpable bos Maarten Lankhorst
2024-02-05 10:03 ` ✓ CI.Patch_applied: success for series starting with drm/xe: Add uapi for dumpable bos (rev3) Patchwork
2024-02-05 10:04 ` ✗ CI.checkpatch: warning " Patchwork
2024-02-05 10:05 ` ✓ CI.KUnit: success " Patchwork
2024-02-05 10:12 ` ✓ CI.Build: " Patchwork
2024-02-05 10:12 ` ✓ CI.Hooks: " Patchwork
2024-02-05 10:14 ` ✓ CI.checksparse: " Patchwork
2024-02-05 10:37 ` ✓ CI.BAT: " Patchwork

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