tu: Disable preemption for counters on gen8

Extend the CP_SCOPE_CNTL to gen8 and newer.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
This commit is contained in:
Rob Clark 2026-05-04 06:59:08 -07:00
parent e9e83b48f8
commit 31a99b2226

View file

@ -1240,7 +1240,7 @@ emit_begin_perf_query_raw(struct tu_cmd_buffer *cmdbuf,
* changes in perfcounter values should only apply to work done during
* this query.
*/
if (CHIP == A7XX) {
if (CHIP >= A7XX) {
tu_cs_emit_pkt7(cs, CP_SCOPE_CNTL, 1);
tu_cs_emit(cs, CP_SCOPE_CNTL_0(.disable_preemption = true,
.scope = INTERRUPTS).value);
@ -1303,7 +1303,7 @@ emit_begin_perf_query_derived(struct tu_cmd_buffer *cmdbuf,
* changes in perfcounter values should only apply to work done during
* this query.
*/
if (CHIP == A7XX) {
if (CHIP >= A7XX) {
tu_cs_emit_pkt7(cs, CP_SCOPE_CNTL, 1);
tu_cs_emit(cs, CP_SCOPE_CNTL_0(.disable_preemption = true,
.scope = INTERRUPTS).value);
@ -1773,7 +1773,7 @@ emit_end_perf_query_raw(struct tu_cmd_buffer *cmdbuf,
/* This reverts the preemption disablement done at the start
* of the query.
*/
if (CHIP == A7XX) {
if (CHIP >= A7XX) {
tu_cs_emit_pkt7(cs, CP_SCOPE_CNTL, 1);
tu_cs_emit(cs, CP_SCOPE_CNTL_0(.disable_preemption = false,
.scope = INTERRUPTS).value);
@ -1850,7 +1850,7 @@ emit_end_perf_query_derived(struct tu_cmd_buffer *cmdbuf,
/* This reverts the preemption disablement done at the start
* of the query.
*/
if (CHIP == A7XX) {
if (CHIP >= A7XX) {
tu_cs_emit_pkt7(cs, CP_SCOPE_CNTL, 1);
tu_cs_emit(cs, CP_SCOPE_CNTL_0(.disable_preemption = false,
.scope = INTERRUPTS).value);