mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-04 02:34:10 -04:00
drm/amdgpu/vcn: enable vcn doorbell for vcn4.0.3
Enable vcn doorbell for vcn4.0.3. Signed-off-by: James Zhu <James.Zhu@amd.com> Reviewed-by: Leo Liu <leo.liu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user