This is needed to allocate occlusion counters across
both gfx pipes. GFX 12 only has one gfx pipe, so no functional
change since the default value is 1.

Signed-off-by: Alex Deucher <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c 
b/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c
index a2f0960b23fae..9ae9b1e4d291e 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c
@@ -1826,6 +1826,9 @@ static void gfx_v12_0_constants_init(struct amdgpu_device 
*adev)
        gfx_v12_0_get_cu_info(adev, &adev->gfx.cu_info);
        gfx_v12_0_get_tcc_info(adev);
        adev->gfx.config.pa_sc_tile_steering_override = 0;
+       /* program DB_RING_CONTROL for multiple GFX pipes */
+       WREG32_FIELD15_PREREG(GC, 0, DB_RING_CONTROL, COUNTER_CONTROL,
+                             (adev->gfx.me.num_pipe_per_me > 1) ? 0 : 1);
 
        /* XXX SH_MEM regs */
        /* where to put LDS, scratch, GPUVM in FSA64 space */
-- 
2.54.0

Reply via email to