[Intel-gfx] [PATCH xf86-video-intel 2/3] sna: Dump fences also on -ENOBUFS

Ville Syrjala ville.syrjala at linux.intel.com
Thu Apr 21 12:46:39 UTC 2022


From: Ville Syrjälä <ville.syrjala at linux.intel.com>

Since kernel commit 78d2ad7eb4e1 ("drm/i915/gt: Fix
-EDEADLK handling regression") running out of fences
will result in -ENOBUFS instead of -EDEADLK (the latter
having been stolen by ww mutextes for their internal use).
Adjust the fence dumping to expect either errno value.

Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
 src/sna/kgem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 7b645da8da5f..ac0b61d54ec8 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -4263,7 +4263,7 @@ void _kgem_submit(struct kgem *kgem)
 
 		if (ret == -ENOSPC)
 			dump_gtt_info(kgem);
-		if (ret == -EDEADLK)
+		if (ret == -EDEADLK || ret == -ENOBUFS)
 			dump_fence_regs(kgem);
 
 		if (DEBUG_SYNC) {
-- 
2.35.1



More information about the Intel-gfx mailing list