summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c
diff options
context:
space:
mode:
authorSonny Jiang <sonny.jiang@amd.com>2023-03-28 20:19:11 +0300
committerAlex Deucher <alexander.deucher@amd.com>2023-06-09 16:56:26 +0300
commit96e693ad78a0778efb5256684a2f3712298f3e18 (patch)
tree2746a664fdd98ae7563153fd7bf49e03cc2a7a98 /drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c
parent55ff23d9eb814dce8393a4c471259ded5a85d461 (diff)
downloadlinux-96e693ad78a0778efb5256684a2f3712298f3e18.tar.xz
drm/amdgpu: Add a read after write DB_CTRL for vcn_v4_0_3
To make sure VCN DB_CTRL is delivered before doorbell write. Signed-off-by: Sonny Jiang <sonny.jiang@amd.com> Reviewed-by: Lijo Lazar <lijo.lazar@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c
index b0e28d611f2d..9d0c3dc76547 100644
--- a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c
+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c
@@ -195,6 +195,11 @@ static int vcn_v4_0_3_hw_init(void *handle)
ring->doorbell_index
<< VCN_RB1_DB_CTRL__OFFSET__SHIFT |
VCN_RB1_DB_CTRL__EN_MASK);
+
+ /* Read DB_CTRL to flush the write DB_CTRL command. */
+ RREG32_SOC15(
+ VCN, GET_INST(VCN, ring->me),
+ regVCN_RB1_DB_CTRL);
}
r = amdgpu_ring_test_helper(ring);