From: Boyuan Zhang <[email protected]>

To workaround an issue in DPG

V2: update description.

Signed-off-by: Boyuan Zhang <[email protected]>
Reviewed-by: James Zhu <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c 
b/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c
index c9b5d5a3e239..98ba6ddde823 100644
--- a/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c
@@ -1340,6 +1340,10 @@ static void vcn_v3_0_dec_ring_set_wptr(struct 
amdgpu_ring *ring)
 {
        struct amdgpu_device *adev = ring->adev;
 
+       if (adev->pg_flags & AMD_PG_SUPPORT_VCN_DPG)
+               WREG32_SOC15(VCN, ring->me, mmUVD_SCRATCH2,
+                       lower_32_bits(ring->wptr) | 0x80000000);
+
        if (ring->use_doorbell) {
                adev->wb.wb[ring->wptr_offs] = lower_32_bits(ring->wptr);
                WDOORBELL32(ring->doorbell_index, lower_32_bits(ring->wptr));
-- 
2.25.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to