Skip to content

Commit a31c114

Browse files
Samir Dhumealexdeucher
authored andcommitted
drm/amdgpu/vcn: mmsch_v4_0_3 requires doorbell on 32 byte boundary
Align on 32 byte boundary. Signed-off-by: Samir Dhume <samir.dhume@amd.com> Acked-by: Leo Liu <leo.liu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 275e372 commit a31c114

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,16 @@ static int vcn_v4_0_3_sw_init(void *handle)
111111

112112
ring = &adev->vcn.inst[i].ring_enc[0];
113113
ring->use_doorbell = true;
114-
ring->doorbell_index =
115-
(adev->doorbell_index.vcn.vcn_ring0_1 << 1) +
116-
9 * vcn_inst;
114+
115+
if (!amdgpu_sriov_vf(adev))
116+
ring->doorbell_index =
117+
(adev->doorbell_index.vcn.vcn_ring0_1 << 1) +
118+
9 * vcn_inst;
119+
else
120+
ring->doorbell_index =
121+
(adev->doorbell_index.vcn.vcn_ring0_1 << 1) +
122+
32 * vcn_inst;
123+
117124
ring->vm_hub = AMDGPU_MMHUB0(adev->vcn.inst[i].aid_id);
118125
sprintf(ring->name, "vcn_unified_%d", adev->vcn.inst[i].aid_id);
119126
r = amdgpu_ring_init(adev, ring, 512, &adev->vcn.inst->irq, 0,

0 commit comments

Comments
 (0)