Commit 0ef3dc7e authored by Sunil Khatri's avatar Sunil Khatri Committed by Alex Deucher

drm/amdgpu: change code name to ip version for tmz set

Use IP version rather then code name of IPs for
tmz set.
Signed-off-by: default avatarSunil Khatri <sunil.khatri@amd.com>
Reviewed-by: default avatarAlexander Deucher <Alexander.Deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 4d33e704
...@@ -512,9 +512,12 @@ int amdgpu_gmc_allocate_vm_inv_eng(struct amdgpu_device *adev) ...@@ -512,9 +512,12 @@ int amdgpu_gmc_allocate_vm_inv_eng(struct amdgpu_device *adev)
*/ */
void amdgpu_gmc_tmz_set(struct amdgpu_device *adev) void amdgpu_gmc_tmz_set(struct amdgpu_device *adev)
{ {
switch (adev->asic_type) { switch (adev->ip_versions[GC_HWIP][0]) {
case CHIP_RAVEN: /* RAVEN */
case CHIP_RENOIR: case IP_VERSION(9, 2, 2):
case IP_VERSION(9, 1, 0):
/* RENOIR looks like RAVEN */
case IP_VERSION(9, 3, 0):
if (amdgpu_tmz == 0) { if (amdgpu_tmz == 0) {
adev->gmc.tmz_enabled = false; adev->gmc.tmz_enabled = false;
dev_info(adev->dev, dev_info(adev->dev,
...@@ -525,12 +528,18 @@ void amdgpu_gmc_tmz_set(struct amdgpu_device *adev) ...@@ -525,12 +528,18 @@ void amdgpu_gmc_tmz_set(struct amdgpu_device *adev)
"Trusted Memory Zone (TMZ) feature enabled\n"); "Trusted Memory Zone (TMZ) feature enabled\n");
} }
break; break;
case CHIP_NAVI10: case IP_VERSION(10, 1, 10):
case CHIP_NAVI14: case IP_VERSION(10, 1, 1):
case CHIP_NAVI12: case IP_VERSION(10, 1, 2):
case CHIP_VANGOGH: case IP_VERSION(10, 1, 3):
case CHIP_YELLOW_CARP: case IP_VERSION(10, 3, 0):
case CHIP_IP_DISCOVERY: case IP_VERSION(10, 3, 2):
case IP_VERSION(10, 3, 4):
case IP_VERSION(10, 3, 5):
/* VANGOGH */
case IP_VERSION(10, 3, 1):
/* YELLOW_CARP*/
case IP_VERSION(10, 3, 3):
/* Don't enable it by default yet. /* Don't enable it by default yet.
*/ */
if (amdgpu_tmz < 1) { if (amdgpu_tmz < 1) {
......
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