Module: Mesa
Branch: main
Commit: 543c554ed6dbfc189a3fb30be1f6367a9f4a65ec
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=543c554ed6dbfc189a3fb30be1f6367a9f4a65ec

Author: Felix DeGrood <[email protected]>
Date:   Mon Apr 24 21:02:09 2023 +0000

iris: Enable INTEL_DEBUG_BATCH_FRAME_START/_STOP

Reviewed-by: Lionel Landwerlin <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22564>

---

 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 193f371908a..b56cd364225 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 cb8c4d10f5c..ae0f00641ef 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);
    }

Reply via email to