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>
This commit is contained in:
Sonny Jiang 2023-03-28 13:19:11 -04:00 committed by Alex Deucher
parent 55ff23d9eb
commit 96e693ad78
1 changed files with 5 additions and 0 deletions

View File

@ -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);