From 648cc22afb6855bf68c83912502454c23adad951 Mon Sep 17 00:00:00 2001 From: Connor Abbott Date: Tue, 17 Dec 2019 13:02:56 +0100 Subject: [PATCH] freedreno: Fix CP_MEM_TO_REG flag definitions These actually mean something completely different, at least on A5xx and A6xx. The only other usage of the old flags on something older than A6xx was a typo, so I don't know if it was always this way, but at the same time it means that we don't have to worry too much about that. Reviewed-by: Eric Anholt Tested-by: Marge Bot Part-of: --- src/freedreno/registers/adreno_pm4.xml | 6 ++++-- src/gallium/drivers/freedreno/a2xx/fd2_query.c | 4 ++-- src/gallium/drivers/freedreno/a6xx/fd6_emit.c | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/freedreno/registers/adreno_pm4.xml b/src/freedreno/registers/adreno_pm4.xml index 533dcf0fb38..643d2b01b4c 100644 --- a/src/freedreno/registers/adreno_pm4.xml +++ b/src/freedreno/registers/adreno_pm4.xml @@ -966,8 +966,10 @@ opcode: CP_LOAD_STATE4 (30) (4 dwords) - - + + + + diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_query.c b/src/gallium/drivers/freedreno/a2xx/fd2_query.c index b80096c2c81..dc6f88ba788 100644 --- a/src/gallium/drivers/freedreno/a2xx/fd2_query.c +++ b/src/gallium/drivers/freedreno/a2xx/fd2_query.c @@ -106,7 +106,7 @@ perfcntr_resume(struct fd_acc_query *aq, struct fd_batch *batch) const struct fd_perfcntr_counter *counter = &g->counters[counter_idx]; OUT_PKT3(ring, CP_REG_TO_MEM, 2); - OUT_RING(ring, counter->counter_reg_lo | CP_MEM_TO_REG_0_ACCUMULATE); + OUT_RING(ring, counter->counter_reg_lo | CP_REG_TO_MEM_0_ACCUMULATE); OUT_RELOCW(ring, query_sample_idx(aq, i, start)); } } @@ -133,7 +133,7 @@ perfcntr_pause(struct fd_acc_query *aq, struct fd_batch *batch) const struct fd_perfcntr_counter *counter = &g->counters[counter_idx]; OUT_PKT3(ring, CP_REG_TO_MEM, 2); - OUT_RING(ring, counter->counter_reg_lo | CP_MEM_TO_REG_0_ACCUMULATE); + OUT_RING(ring, counter->counter_reg_lo | CP_REG_TO_MEM_0_ACCUMULATE); OUT_RELOCW(ring, query_sample_idx(aq, i, stop)); } } diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_emit.c b/src/gallium/drivers/freedreno/a6xx/fd6_emit.c index 9b7c67f0fd3..d323ae49942 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_emit.c +++ b/src/gallium/drivers/freedreno/a6xx/fd6_emit.c @@ -753,7 +753,7 @@ fd6_emit_streamout(struct fd_ringbuffer *ring, struct fd6_emit *emit, struct ir3 } else { OUT_PKT7(ring, CP_MEM_TO_REG, 3); OUT_RING(ring, CP_MEM_TO_REG_0_REG(REG_A6XX_VPC_SO_BUFFER_OFFSET(i)) | - CP_MEM_TO_REG_0_64B | CP_MEM_TO_REG_0_ACCUMULATE | + CP_MEM_TO_REG_0_SHIFT_BY_2 | CP_MEM_TO_REG_0_UNK31 | CP_MEM_TO_REG_0_CNT(0)); OUT_RELOC(ring, control_ptr(fd6_context(ctx), flush_base[i].offset)); } -- 2.30.2