aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorSonny Jiang <sonny.jiang@amd.com>2023-03-28 13:19:11 -0400
committerAlex Deucher <alexander.deucher@amd.com>2023-06-09 09:56:26 -0400
commit96e693ad78a0778efb5256684a2f3712298f3e18 (patch)
tree2746a664fdd98ae7563153fd7bf49e03cc2a7a98
parentdrm/amdgpu: fixes a JPEG get write/read pointer bug (diff)
downloadwireguard-linux-96e693ad78a0778efb5256684a2f3712298f3e18.tar.xz
wireguard-linux-96e693ad78a0778efb5256684a2f3712298f3e18.zip
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>
-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);