From 543c554ed6dbfc189a3fb30be1f6367a9f4a65ec Mon Sep 17 00:00:00 2001 From: Felix DeGrood Date: Mon, 24 Apr 2023 21:02:09 +0000 Subject: [PATCH] iris: Enable INTEL_DEBUG_BATCH_FRAME_START/_STOP Reviewed-by: Lionel Landwerlin Part-of: --- src/gallium/drivers/iris/i915/iris_kmd_backend.c | 8 ++++++-- src/gallium/drivers/iris/xe/iris_kmd_backend.c | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/gallium/drivers/iris/i915/iris_kmd_backend.c b/src/gallium/drivers/iris/i915/iris_kmd_backend.c index 193f371..b56cd36 100644 --- a/src/gallium/drivers/iris/i915/iris_kmd_backend.c +++ b/src/gallium/drivers/iris/i915/iris_kmd_backend.c @@ -31,6 +31,7 @@ #include "iris/iris_bufmgr.h" #include "iris/iris_batch.h" +#include "iris/iris_context.h" #define FILE_DEBUG_FLAG DEBUG_BUFMGR @@ -286,14 +287,17 @@ i915_batch_submit(struct iris_batch *batch) * in theory try to grab bo_deps_lock. Let's keep it safe and decode * outside the lock. */ - if (INTEL_DEBUG(DEBUG_BATCH)) + if (INTEL_DEBUG(DEBUG_BATCH) && + intel_debug_batch_in_range(batch->ice->frame)) iris_batch_decode_batch(batch); simple_mtx_lock(bo_deps_lock); iris_batch_update_syncobjs(batch); - if (INTEL_DEBUG(DEBUG_BATCH | DEBUG_SUBMIT)) { + if ((INTEL_DEBUG(DEBUG_BATCH) && + intel_debug_batch_in_range(batch->ice->frame)) || + INTEL_DEBUG(DEBUG_SUBMIT)) { iris_dump_fence_list(batch); iris_dump_bo_list(batch); } diff --git a/src/gallium/drivers/iris/xe/iris_kmd_backend.c b/src/gallium/drivers/iris/xe/iris_kmd_backend.c index cb8c4d1..ae0f006 100644 --- a/src/gallium/drivers/iris/xe/iris_kmd_backend.c +++ b/src/gallium/drivers/iris/xe/iris_kmd_backend.c @@ -28,6 +28,7 @@ #include "dev/intel_debug.h" #include "iris/iris_bufmgr.h" #include "iris/iris_batch.h" +#include "iris/iris_context.h" #include "drm-uapi/xe_drm.h" @@ -213,7 +214,8 @@ xe_batch_submit(struct iris_batch *batch) * in theory try to grab bo_deps_lock. Let's keep it safe and decode * outside the lock. */ - if (INTEL_DEBUG(DEBUG_BATCH)) + if (INTEL_DEBUG(DEBUG_BATCH) && + intel_debug_batch_in_range(batch->ice->frame)) iris_batch_decode_batch(batch); simple_mtx_lock(bo_deps_lock); @@ -243,7 +245,9 @@ xe_batch_submit(struct iris_batch *batch) } } - if (INTEL_DEBUG(DEBUG_BATCH | DEBUG_SUBMIT)) { + if ((INTEL_DEBUG(DEBUG_BATCH) && + intel_debug_batch_in_range(batch->ice->frame)) || + INTEL_DEBUG(DEBUG_SUBMIT)) { iris_dump_fence_list(batch); iris_dump_bo_list(batch); } -- 2.7.4