Commit c21d446b authored by James Zhu's avatar James Zhu Committed by Alex Deucher

drm/amdgpu/vcn: enable vcn doorbell for vcn4.0.3

Enable vcn doorbell for vcn4.0.3.
Signed-off-by: default avatarJames Zhu <James.Zhu@amd.com>
Reviewed-by: default avatarLeo Liu <leo.liu@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent d7fd2a9e
......@@ -109,7 +109,8 @@ static int vcn_v4_0_3_sw_init(void *handle)
return r;
ring = &adev->vcn.inst->ring_dec;
ring->use_doorbell = false;
ring->use_doorbell = true;
ring->doorbell_index = (adev->doorbell_index.vcn.vcn_ring0_1 << 1) + 5;
ring->vm_hub = AMDGPU_MMHUB0(0);
sprintf(ring->name, "vcn_dec");
r = amdgpu_ring_init(adev, ring, 512, &adev->vcn.inst->irq, 0,
......@@ -174,6 +175,13 @@ static int vcn_v4_0_3_hw_init(void *handle)
struct amdgpu_ring *ring = &adev->vcn.inst->ring_dec;
int r;
adev->nbio.funcs->vcn_doorbell_range(adev, ring->use_doorbell,
ring->doorbell_index, ring->me);
if (ring->use_doorbell)
WREG32_SOC15(VCN, ring->me, regVCN_RB4_DB_CTRL,
ring->doorbell_index << VCN_RB4_DB_CTRL__OFFSET__SHIFT |
VCN_RB4_DB_CTRL__EN_MASK);
r = amdgpu_ring_test_helper(ring);
if (!r)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment