Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] drm/xe/xe_sync: Add debug printing to check_ufence
@ 2024-12-06 18:11 Jonathan Cavitt
  2024-12-06 18:46 ` ✓ CI.Patch_applied: success for drm/xe/xe_sync: Add debug printing to check_ufence (rev2) Patchwork
                   ` (8 more replies)
  0 siblings, 9 replies; 12+ messages in thread
From: Jonathan Cavitt @ 2024-12-06 18:11 UTC (permalink / raw)
  To: intel-xe; +Cc: jonathan.cavitt, saurabhg.gupta, alex.zuo, rodrigo.vivi

The xe_sync helper function check_ufence can occasionally report EBUSY
if the ufence has not been signalled yet.  EBUSY is a non-fatal error
value for the function, so it is not desireable to warn in cases where
EBUSY is reported because it is up to the user to decide if EBUSY is a
fatal error in their use cases.  However, we can and should report EBUSY
to the debug logs for diagnostic purposes.

v2: Use vm_dbg instead of XE_IOCTL_DBG (Rodrigo)

Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
CC: Rodrigo Vivi <rodrigo.vivi@intel.com>
---
 drivers/gpu/drm/xe/xe_vm.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c
index 74d684708b00..8c770d1b916c 100644
--- a/drivers/gpu/drm/xe/xe_vm.c
+++ b/drivers/gpu/drm/xe/xe_vm.c
@@ -2402,8 +2402,11 @@ static int op_lock_and_prep(struct drm_exec *exec, struct xe_vm *vm,
 		break;
 	case DRM_GPUVA_OP_REMAP:
 		err = check_ufence(gpuva_to_vma(op->base.remap.unmap->va));
-		if (err)
+		if (err) {
+			vm_dbg(&vm->xe->drm,
+			       "REMAP: vma check ufence status = %i\n", err);
 			break;
+		}
 
 		err = vma_lock_and_validate(exec,
 					    gpuva_to_vma(op->base.remap.unmap->va),
@@ -2415,8 +2418,11 @@ static int op_lock_and_prep(struct drm_exec *exec, struct xe_vm *vm,
 		break;
 	case DRM_GPUVA_OP_UNMAP:
 		err = check_ufence(gpuva_to_vma(op->base.unmap.va));
-		if (err)
+		if (err) {
+			vm_dbg(&vm->xe->drm,
+			       "UNMAP: vma check ufence status = %i\n", err);
 			break;
+		}
 
 		err = vma_lock_and_validate(exec,
 					    gpuva_to_vma(op->base.unmap.va),
-- 
2.43.0


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

end of thread, other threads:[~2024-12-12 17:31 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-06 18:11 [PATCH v2] drm/xe/xe_sync: Add debug printing to check_ufence Jonathan Cavitt
2024-12-06 18:46 ` ✓ CI.Patch_applied: success for drm/xe/xe_sync: Add debug printing to check_ufence (rev2) Patchwork
2024-12-06 18:46 ` ✓ CI.checkpatch: " Patchwork
2024-12-06 18:47 ` ✓ CI.KUnit: " Patchwork
2024-12-06 19:05 ` ✓ CI.Build: " Patchwork
2024-12-06 19:07 ` ✓ CI.Hooks: " Patchwork
2024-12-06 19:09 ` ✓ CI.checksparse: " Patchwork
2024-12-06 19:30 ` ✓ Xe.CI.BAT: " Patchwork
2024-12-06 22:34 ` ✗ Xe.CI.Full: failure " Patchwork
2024-12-07  7:27 ` [PATCH v2] drm/xe/xe_sync: Add debug printing to check_ufence Nirmoy Das
2024-12-11 15:24   ` Cavitt, Jonathan
2024-12-12 17:30     ` Nirmoy Das

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