drm/amdgpu: move amdgpu_gmc_tmz_set after ip_version populated
Subsystems (2)
PATCH 1/3 drm/amdgpu: move amdgpu_gmc_tmz_set after ip_version populated
To enable TMZ feature based on IP version needs adev->ip_version populated but its empty. Move amdgpu_gmc_tmz_set to a place where ip_version is populated.
Signed-off-by Sunil Khatri <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +3 -3
@@ -1556,9 +1556,6 @@ static int amdgpu_device_check_arguments(struct amdgpu_device *adev) adev->firmware.load_type =amdgpu_ucode_get_load_type (adev, amdgpu_fw_load_type); -amdgpu_gmc_tmz_set (adev); - -return 0 ; }
@@ -3700,6 +3697,9 @@ int amdgpu_device_init(struct amdgpu_device *adev,if (r)return r; +/* Enable TMZ based on IP_VERSION */ +amdgpu_gmc_tmz_set (adev); +amdgpu_gmc_noretry_set (adev);/* Need to get xgmi info early to decide the reset behavior*/ if (adev->gmc.xgmi.supported) {
Signature · 1 line
2.25.1
PATCH 2/3 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 Sunil Khatri <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 27 ++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c +18 -9
@@ -512,9 +512,12 @@ int amdgpu_gmc_allocate_vm_inv_eng(struct amdgpu_device *adev)*/ void amdgpu_gmc_tmz_set (struct amdgpu_device *adev) { -switch (adev->asic_type) { -case CHIP_RAVEN : -case CHIP_RENOIR : +switch (adev->ip_versions[GC_HWIP ][0 ]) { +/* RAVEN */ +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 ) { adev->gmc.tmz_enabled = false; dev_info(adev->dev,
@@ -525,12 +528,18 @@ void amdgpu_gmc_tmz_set(struct amdgpu_device *adev) "Trusted Memory Zone (TMZ) feature enabled\n"); }break ; -case CHIP_NAVI10 : -case CHIP_NAVI14 : -case CHIP_NAVI12 : -case CHIP_VANGOGH : -case CHIP_YELLOW_CARP : -case CHIP_IP_DISCOVERY : +case IP_VERSION (10 ,1 ,10 ): +case IP_VERSION (10 ,1 ,1 ): +case IP_VERSION (10 ,1 ,2 ): +case IP_VERSION (10 ,1 ,3 ): +case IP_VERSION (10 ,3 ,0 ): +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. */ if (amdgpu_tmz <1 ) {
Signature · 1 line
2.25.1
PATCH 3/3 dmr/amdgpu: add support of tmz for GC 10.3.7
In reply to Sunil KhatriAdd support of IP GC 10.3.7 in amdgpu_gmc_tmz_set.
Signed-off-by Sunil Khatri <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c +2 -0
@@ -540,6 +540,8 @@ void amdgpu_gmc_tmz_set(struct amdgpu_device *adev)case IP_VERSION (10 ,3 ,1 ):/* YELLOW_CARP*/ case IP_VERSION (10 ,3 ,3 ): +/* GC 10.3.7 */ +case IP_VERSION (10 ,3 ,7 ):/* Don't enable it by default yet. */ if (amdgpu_tmz <1 ) {
Signature · 1 line
2.25.1
Re: [PATCH 3/3] dmr/amdgpu: add support of tmz for GC 10.3.7
Series is:
Reviewed-by Alex Deucher <[email protected]>
Quoted 24 lines · Sunil Khatri
Add support of IP GC 10.3.7 in
amdgpu_gmc_tmz_set.Signed-off-by Sunil Khatri <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 2 ++ 1 file changed, 2 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c +2
-1@@ -540,6 +540,8 @@ void amdgpu_gmc_tmz_set(struct amdgpu_device *adev)case IP_VERSION (10 ,3 ,1 ):/* YELLOW_CARP*/ case IP_VERSION (10 ,3 ,3 ): +/* GC 10.3.7 */ +case IP_VERSION (10 ,3 ,7 ):/* Don't enable it by default yet. */ if (amdgpu_tmz <1 ) { --2.25.1