diff options
author | Luben Tuikov <luben.tuikov@amd.com> | 2020-02-26 15:30:36 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2020-04-28 16:20:30 -0400 |
commit | b71a564e2509e1000044a9873cbee6d6a6a5ab90 (patch) | |
tree | b6d2f97eceb46ec0802c909019ec4e3d499080d5 /drivers/gpu/drm | |
parent | 218c0b7f183a88b3b2678fbca885a750dda2bff3 (diff) |
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: Luben Tuikov <luben.tuikov@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c index ce13c3758460..acabb57aa8af 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c @@ -383,18 +383,28 @@ int amdgpu_gmc_allocate_vm_inv_eng(struct amdgpu_device *adev) */ void amdgpu_gmc_tmz_set(struct amdgpu_device *adev) { - if (!amdgpu_tmz) - return; - - if (adev->asic_type < CHIP_RAVEN || - adev->asic_type == CHIP_ARCTURUS) { + switch (adev->asic_type) { + case CHIP_RAVEN: + case CHIP_RENOIR: + case CHIP_NAVI10: + case CHIP_NAVI14: + case CHIP_NAVI12: + /* Don't enable it by default yet. + */ + if (amdgpu_tmz < 1) { + adev->gmc.tmz_enabled = false; + dev_info(adev->dev, + "Trusted Memory Zone (TMZ) feature disabled as experimental (default)\n"); + } else { + adev->gmc.tmz_enabled = true; + dev_info(adev->dev, + "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"); - } else { - - adev->gmc.tmz_enabled = true; - dev_info(adev->dev, - "Trusted Memory Zone (TMZ) feature supported and enabled\n"); + break; } } |