Commit ab1a157e authored by Hawking Zhang's avatar Hawking Zhang Committed by Alex Deucher

drm/amdgpu: add gmc ip block support for GC 9.4.3

Initialize various gmc sw/hw settings/configurations
for GC 9.4.3.
Signed-off-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: default avatarLe Ma <Le.Ma@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent b11e1930
...@@ -657,6 +657,7 @@ static int gmc_v9_0_process_interrupt(struct amdgpu_device *adev, ...@@ -657,6 +657,7 @@ static int gmc_v9_0_process_interrupt(struct amdgpu_device *adev,
case IP_VERSION(2, 4, 0): case IP_VERSION(2, 4, 0):
mmhub_cid = mmhub_client_ids_renoir[cid][rw]; mmhub_cid = mmhub_client_ids_renoir[cid][rw];
break; break;
case IP_VERSION(1, 8, 0):
case IP_VERSION(9, 4, 2): case IP_VERSION(9, 4, 2):
mmhub_cid = mmhub_client_ids_aldebaran[cid][rw]; mmhub_cid = mmhub_client_ids_aldebaran[cid][rw];
break; break;
...@@ -735,7 +736,8 @@ static uint32_t gmc_v9_0_get_invalidate_req(unsigned int vmid, ...@@ -735,7 +736,8 @@ static uint32_t gmc_v9_0_get_invalidate_req(unsigned int vmid,
static bool gmc_v9_0_use_invalidate_semaphore(struct amdgpu_device *adev, static bool gmc_v9_0_use_invalidate_semaphore(struct amdgpu_device *adev,
uint32_t vmhub) uint32_t vmhub)
{ {
if (adev->ip_versions[GC_HWIP][0] == IP_VERSION(9, 4, 2)) if (adev->ip_versions[GC_HWIP][0] == IP_VERSION(9, 4, 2) ||
adev->ip_versions[GC_HWIP][0] == IP_VERSION(9, 4, 3))
return false; return false;
return ((vmhub == AMDGPU_MMHUB_0 || return ((vmhub == AMDGPU_MMHUB_0 ||
...@@ -1144,6 +1146,7 @@ static void gmc_v9_0_get_coherence_flags(struct amdgpu_device *adev, ...@@ -1144,6 +1146,7 @@ static void gmc_v9_0_get_coherence_flags(struct amdgpu_device *adev,
switch (adev->ip_versions[GC_HWIP][0]) { switch (adev->ip_versions[GC_HWIP][0]) {
case IP_VERSION(9, 4, 1): case IP_VERSION(9, 4, 1):
case IP_VERSION(9, 4, 2): case IP_VERSION(9, 4, 2):
case IP_VERSION(9, 4, 3):
if (is_vram) { if (is_vram) {
if (bo_adev == adev) { if (bo_adev == adev) {
if (uncached) if (uncached)
...@@ -1155,8 +1158,8 @@ static void gmc_v9_0_get_coherence_flags(struct amdgpu_device *adev, ...@@ -1155,8 +1158,8 @@ static void gmc_v9_0_get_coherence_flags(struct amdgpu_device *adev,
/* FIXME: is this still needed? Or does /* FIXME: is this still needed? Or does
* amdgpu_ttm_tt_pde_flags already handle this? * amdgpu_ttm_tt_pde_flags already handle this?
*/ */
if (adev->ip_versions[GC_HWIP][0] == if ((adev->ip_versions[GC_HWIP][0] == IP_VERSION(9, 4, 2) ||
IP_VERSION(9, 4, 2) && adev->ip_versions[GC_HWIP][0] == IP_VERSION(9, 4, 3)) &&
adev->gmc.xgmi.connected_to_cpu) adev->gmc.xgmi.connected_to_cpu)
snoop = true; snoop = true;
} else { } else {
...@@ -1544,6 +1547,7 @@ static int gmc_v9_0_mc_init(struct amdgpu_device *adev) ...@@ -1544,6 +1547,7 @@ static int gmc_v9_0_mc_init(struct amdgpu_device *adev)
case IP_VERSION(9, 4, 0): case IP_VERSION(9, 4, 0):
case IP_VERSION(9, 4, 1): case IP_VERSION(9, 4, 1):
case IP_VERSION(9, 4, 2): case IP_VERSION(9, 4, 2):
case IP_VERSION(9, 4, 3):
default: default:
adev->gmc.gart_size = 512ULL << 20; adev->gmc.gart_size = 512ULL << 20;
break; break;
...@@ -1673,6 +1677,7 @@ static int gmc_v9_0_sw_init(void *handle) ...@@ -1673,6 +1677,7 @@ static int gmc_v9_0_sw_init(void *handle)
case IP_VERSION(9, 4, 0): case IP_VERSION(9, 4, 0):
case IP_VERSION(9, 3, 0): case IP_VERSION(9, 3, 0):
case IP_VERSION(9, 4, 2): case IP_VERSION(9, 4, 2):
case IP_VERSION(9, 4, 3):
adev->num_vmhubs = 2; adev->num_vmhubs = 2;
...@@ -1769,7 +1774,8 @@ static int gmc_v9_0_sw_init(void *handle) ...@@ -1769,7 +1774,8 @@ static int gmc_v9_0_sw_init(void *handle)
*/ */
adev->vm_manager.first_kfd_vmid = adev->vm_manager.first_kfd_vmid =
(adev->ip_versions[GC_HWIP][0] == IP_VERSION(9, 4, 1) || (adev->ip_versions[GC_HWIP][0] == IP_VERSION(9, 4, 1) ||
adev->ip_versions[GC_HWIP][0] == IP_VERSION(9, 4, 2)) ? 3 : 8; adev->ip_versions[GC_HWIP][0] == IP_VERSION(9, 4, 2) ||
adev->ip_versions[GC_HWIP][0] == IP_VERSION(9, 4, 3)) ? 3 : 8;
amdgpu_vm_manager_init(adev); amdgpu_vm_manager_init(adev);
......
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