Commit b71a564e authored by Luben Tuikov's avatar Luben Tuikov Committed by Alex Deucher

drm/amdgpu: Fine-grained TMZ support

Add fine-grained per-ASIC TMZ support.

At the moment TMZ support is experimental for all
ASICs which support it.
Signed-off-by: default avatarLuben Tuikov <luben.tuikov@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 218c0b7f
...@@ -383,18 +383,28 @@ int amdgpu_gmc_allocate_vm_inv_eng(struct amdgpu_device *adev) ...@@ -383,18 +383,28 @@ 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)
{ {
if (!amdgpu_tmz) switch (adev->asic_type) {
return; case CHIP_RAVEN:
case CHIP_RENOIR:
if (adev->asic_type < CHIP_RAVEN || case CHIP_NAVI10:
adev->asic_type == CHIP_ARCTURUS) { case CHIP_NAVI14:
case CHIP_NAVI12:
/* Don't enable it by default yet.
*/
if (amdgpu_tmz < 1) {
adev->gmc.tmz_enabled = false; adev->gmc.tmz_enabled = false;
dev_warn(adev->dev, dev_info(adev->dev,
"Trusted Memory Zone (TMZ) feature not supported\n"); "Trusted Memory Zone (TMZ) feature disabled as experimental (default)\n");
} else { } else {
adev->gmc.tmz_enabled = true; adev->gmc.tmz_enabled = true;
dev_info(adev->dev, dev_info(adev->dev,
"Trusted Memory Zone (TMZ) feature supported and enabled\n"); "Trusted Memory Zone (TMZ) feature enabled as experimental (cmd line)\n");
}
break;
default:
adev->gmc.tmz_enabled = false;
dev_warn(adev->dev,
"Trusted Memory Zone (TMZ) feature not supported\n");
break;
} }
} }
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