<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p><br>
</p>
<div class="moz-cite-prefix">On 12/6/2024 7:11 PM, Jonathan Cavitt
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:20241206181155.87070-1-jonathan.cavitt@intel.com">
<pre wrap="" class="moz-quote-pre">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 <a class="moz-txt-link-rfc2396E" href="mailto:jonathan.cavitt@intel.com"><jonathan.cavitt@intel.com></a>
CC: Rodrigo Vivi <a class="moz-txt-link-rfc2396E" href="mailto:rodrigo.vivi@intel.com"><rodrigo.vivi@intel.com></a>
---
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);</pre>
</blockquote>
<p>Move that to <span
style="padding: 0px; tab-size: 8; white-space: pre-wrap;"
class="hljs diff colorediffs language-diff">check_ufence() instead so there there is only one copy of logging ?
</span></p>
<p><span style="padding: 0px; tab-size: 8; white-space: pre-wrap;"
class="hljs diff colorediffs language-diff">Regards,</span></p>
<p><span style="padding: 0px; tab-size: 8; white-space: pre-wrap;"
class="hljs diff colorediffs language-diff">Nirmoy
</span></p>
<br>
<blockquote type="cite"
cite="mid:20241206181155.87070-1-jonathan.cavitt@intel.com">
<pre wrap="" class="moz-quote-pre">
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),
</pre>
</blockquote>
</body>
</html>