Skip to contentSkip to conversation

drm/amdgpu: enable TMZ by default on Raven asics

PATCH In review Alex Deucher 3 participants 3 messages Feb 25, 2021 – Mar 4, 2021

Subsystems (2)
lore
Share & tools
lore

Alex Deucher

author maintainer
#0 lore raw

PATCH 1/1 drm/amdgpu: enable TMZ by default on Raven asics

This has been stable for a while.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c |  4 ++--
 drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 10 ++++++++++
 2 files changed, 12 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +2 -2
index 2f71d36d2856..21504ea9085f 100644
@@ -164,7 +164,7 @@ int amdgpu_discovery = -1;
 int amdgpu_mes;
 int amdgpu_noretry = -1;
 int amdgpu_force_asic_type = -1;
-int amdgpu_tmz;
+int amdgpu_tmz = -1; /* auto */
 int amdgpu_reset_method = -1; /* auto */
 int amdgpu_num_kcq = -1;
 
@@ -790,7 +790,7 @@ module_param_named(abmlevel, amdgpu_dm_abm_level, uint, 0444);
  *
  * The default value: 0 (off).  TODO: change to auto till it is completed.
  */
-MODULE_PARM_DESC(tmz, "Enable TMZ feature (-1 = auto, 0 = off (default), 1 = on)");
+MODULE_PARM_DESC(tmz, "Enable TMZ feature (-1 = auto (default), 0 = off, 1 = on)");
 module_param_named(tmz, amdgpu_tmz, int, 0444);
 
 /**
drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c +10 -0
index fe1a39ffda72..1a892526d020 100644
@@ -384,6 +384,16 @@ void amdgpu_gmc_tmz_set(struct amdgpu_device *adev)
 {
 	switch (adev->asic_type) {
 	case CHIP_RAVEN:
+		if (amdgpu_tmz == 0) {
+			adev->gmc.tmz_enabled = false;
+			dev_info(adev->dev,
+				 "Trusted Memory Zone (TMZ) feature disabled (cmd line)\n");
+		} else {
+			adev->gmc.tmz_enabled = true;
+			dev_info(adev->dev,
+				 "Trusted Memory Zone (TMZ) feature enabled\n");
+		}
+		break;
 	case CHIP_RENOIR:
 	case CHIP_NAVI10:
 	case CHIP_NAVI14:
Signature · 6 lines
2.29.2

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#1 lore raw

Ping?

Alex

Quoted 55 lines · Alex Deucher

This has been stable for a while.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c |  4 ++--
 drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 10 ++++++++++
 2 files changed, 12 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +2 -2
index 2f71d36d2856..21504ea9085f 100644
@@ -164,7 +164,7 @@ int amdgpu_discovery = -1;
 int amdgpu_mes;
 int amdgpu_noretry = -1;
 int amdgpu_force_asic_type = -1;
-int amdgpu_tmz;
+int amdgpu_tmz = -1; /* auto */
 int amdgpu_reset_method = -1; /* auto */
 int amdgpu_num_kcq = -1;
 
@@ -790,7 +790,7 @@ module_param_named(abmlevel, amdgpu_dm_abm_level, uint, 0444);
  *
  * The default value: 0 (off).  TODO: change to auto till it is completed.
  */
-MODULE_PARM_DESC(tmz, "Enable TMZ feature (-1 = auto, 0 = off (default), 1 = on)");
+MODULE_PARM_DESC(tmz, "Enable TMZ feature (-1 = auto (default), 0 = off, 1 = on)");
 module_param_named(tmz, amdgpu_tmz, int, 0444);
 
 /**
drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c +10 -1
index fe1a39ffda72..1a892526d020 100644
@@ -384,6 +384,16 @@ void amdgpu_gmc_tmz_set(struct amdgpu_device *adev)
 {
        switch (adev->asic_type) {
        case CHIP_RAVEN:
+               if (amdgpu_tmz == 0) {
+                       adev->gmc.tmz_enabled = false;
+                       dev_info(adev->dev,
+                                "Trusted Memory Zone (TMZ) feature disabled (cmd line)\n");
+               } else {
+                       adev->gmc.tmz_enabled = true;
+                       dev_info(adev->dev,
+                                "Trusted Memory Zone (TMZ) feature enabled\n");
+               }
+               break;
        case CHIP_RENOIR:
        case CHIP_NAVI10:
        case CHIP_NAVI14:
--

2.29.2

Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reviewed-by on v1 1/1
#2 lore raw
In reply to Alex Deucher

Am 25.02.21 um 17:44 schrieb Alex Deucher:

Quoted 3 lines

This has been stable for a while.

Quoted 38 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c |  4 ++--
  drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 10 ++++++++++
  2 files changed, 12 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +2 -2
index 2f71d36d2856..21504ea9085f 100644
@@ -164,7 +164,7 @@ int amdgpu_discovery = -1;
  int amdgpu_mes;
  int amdgpu_noretry = -1;
  int amdgpu_force_asic_type = -1;
-int amdgpu_tmz;
+int amdgpu_tmz = -1; /* auto */
  int amdgpu_reset_method = -1; /* auto */
  int amdgpu_num_kcq = -1;
 
@@ -790,7 +790,7 @@ module_param_named(abmlevel, amdgpu_dm_abm_level, uint, 0444);
   *
   * The default value: 0 (off).  TODO: change to auto till it is completed.
   */
-MODULE_PARM_DESC(tmz, "Enable TMZ feature (-1 = auto, 0 = off (default), 1 = on)");
+MODULE_PARM_DESC(tmz, "Enable TMZ feature (-1 = auto (default), 0 = off, 1 = on)");
  module_param_named(tmz, amdgpu_tmz, int, 0444);
 
  /**
drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c +3 -0
index fe1a39ffda72..1a892526d020 100644
@@ -384,6 +384,16 @@ void amdgpu_gmc_tmz_set(struct amdgpu_device *adev)
  {
  	switch (adev->asic_type) {
  	case CHIP_RAVEN:
+		if (amdgpu_tmz == 0) {
+			adev->gmc.tmz_enabled = false;
+			dev_info(adev->dev,

drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c void amdgpu_gmc_tmz_set(struct amdgpu_device *adev) · line 399

Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c +7 -0
+				 "Trusted Memory Zone (TMZ) feature disabled (cmd line)\n");
+		} else {
+			adev->gmc.tmz_enabled = true;
+			dev_info(adev->dev,
+				 "Trusted Memory Zone (TMZ) feature enabled\n");
+		}
+		break;
  	case CHIP_RENOIR:
  	case CHIP_NAVI10:
  	case CHIP_NAVI14:

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx