aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/vi.c
diff options
context:
space:
mode:
authorOak Zeng <ozeng@amd.com>2018-11-19 10:51:20 -0500
committerAlex Deucher <alexander.deucher@amd.com>2018-11-28 15:55:32 -0500
commit4e2c1ac2027d1ad99109b676450db8759779222c (patch)
treea1758f7aaf041e03154c5fb06ac04749e4c34893 /drivers/gpu/drm/amd/amdgpu/vi.c
parent062f380725376efab279956b5441071684c2a7ff (diff)
drm/amdgpu: Doorbell index initialization for ASICs before vega10
Initialize doorbell index for asics vi and cik v2: Use enum definition instead of hardcoded number Signed-off-by: Oak Zeng <ozeng@amd.com> Suggested-by: Felix Kuehling <Felix.Kuehling@amd.com> Suggested-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/vi.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/vi.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c
index 07880d35e9de..ff2906c215fa 100644
--- a/drivers/gpu/drm/amd/amdgpu/vi.c
+++ b/drivers/gpu/drm/amd/amdgpu/vi.c
@@ -955,6 +955,7 @@ static const struct amdgpu_asic_funcs vi_asic_funcs =
955 .flush_hdp = &vi_flush_hdp, 955 .flush_hdp = &vi_flush_hdp,
956 .invalidate_hdp = &vi_invalidate_hdp, 956 .invalidate_hdp = &vi_invalidate_hdp,
957 .need_full_reset = &vi_need_full_reset, 957 .need_full_reset = &vi_need_full_reset,
958 .init_doorbell_index = &legacy_doorbell_index_init,
958}; 959};
959 960
960#define CZ_REV_BRISTOL(rev) \ 961#define CZ_REV_BRISTOL(rev) \
@@ -1712,3 +1713,21 @@ int vi_set_ip_blocks(struct amdgpu_device *adev)
1712 1713
1713 return 0; 1714 return 0;
1714} 1715}
1716
1717void legacy_doorbell_index_init(struct amdgpu_device *adev)
1718{
1719 adev->doorbell_index.kiq = AMDGPU_DOORBELL_KIQ;
1720 adev->doorbell_index.mec_ring0 = AMDGPU_DOORBELL_MEC_RING0;
1721 adev->doorbell_index.mec_ring1 = AMDGPU_DOORBELL_MEC_RING1;
1722 adev->doorbell_index.mec_ring2 = AMDGPU_DOORBELL_MEC_RING2;
1723 adev->doorbell_index.mec_ring3 = AMDGPU_DOORBELL_MEC_RING3;
1724 adev->doorbell_index.mec_ring4 = AMDGPU_DOORBELL_MEC_RING4;
1725 adev->doorbell_index.mec_ring5 = AMDGPU_DOORBELL_MEC_RING5;
1726 adev->doorbell_index.mec_ring6 = AMDGPU_DOORBELL_MEC_RING6;
1727 adev->doorbell_index.mec_ring7 = AMDGPU_DOORBELL_MEC_RING7;
1728 adev->doorbell_index.gfx_ring0 = AMDGPU_DOORBELL_GFX_RING0;
1729 adev->doorbell_index.sdma_engine0 = AMDGPU_DOORBELL_sDMA_ENGINE0;
1730 adev->doorbell_index.sdma_engine1 = AMDGPU_DOORBELL_sDMA_ENGINE1;
1731 adev->doorbell_index.ih = AMDGPU_DOORBELL_IH;
1732 adev->doorbell_index.max_assignment = AMDGPU_DOORBELL_MAX_ASSIGNMENT;
1733}