Skip to contentSkip to conversation

drm/amdgpu/smu11: fix firmware version check for vangogh

PATCH In review Alex Deucher 3 participants 10 messages Oct 12, 2021 – Oct 14, 2021

Subsystems (3)
lore
Share & tools
lore

Alex Deucher

author maintainer
#0 lore raw

PATCH 1/3 drm/amdgpu/smu11: fix firmware version check for vangogh

Was missed in the conversion to IP version checking.

Fixes af3b89d3a639d5 ("drm/amdgpu/smu11.0: convert to IP version checking")
---
 drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c +1 -1
index 3470c33ee09d..6d008e9c2f65 100644
@@ -255,7 +255,7 @@ int smu_v11_0_check_fw_version(struct smu_context *smu)
 	case IP_VERSION(11, 0, 11):
 		smu->smc_driver_if_version = SMU11_DRIVER_IF_VERSION_Navy_Flounder;
 		break;
-	case CHIP_VANGOGH:
+	case IP_VERSION(11, 5, 0):
 		smu->smc_driver_if_version = SMU11_DRIVER_IF_VERSION_VANGOGH;
 		break;
 	case IP_VERSION(11, 0, 12):
Signature · 1 line
2.31.1
author maintainer
#1 lore raw

PATCH 2/3 drm/amdgpu/swsmu: fix is_support_sw_smu() for VEGA20

VEGA20 is 11.0.2, but it's handled by powerplay, not swsmu.

Fixes a8967967f6a554 ("drm/amdgpu/amdgpu_smu: convert to IP version checking")
---
 drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +4 -0
index 4ea7e90ef60d..f5bf3ab0ebad 100644
@@ -455,6 +455,10 @@ static int smu_get_power_num_states(void *handle,
 
 bool is_support_sw_smu(struct amdgpu_device *adev)
 {
+	/* vega20 is 11.0.2, but it's supported via the powerplay code */
+	if (adev->asic_type == CHIP_VEGA20)
+		return false;
+
 	if (adev->ip_versions[MP1_HWIP][0] >= IP_VERSION(11, 0, 0))
 		return true;
 
Signature · 1 line
2.31.1
#2 lore raw

Re: [PATCH 2/3] drm/amdgpu/swsmu: fix is_support_sw_smu() for VEGA20

Ping on this series.

Quoted 28 lines · Alex Deucher

VEGA20 is 11.0.2, but it's handled by powerplay, not swsmu.

Fixes a8967967f6a554 ("drm/amdgpu/amdgpu_smu: convert to IP version checking")
---
 drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +4 -1
index 4ea7e90ef60d..f5bf3ab0ebad 100644
@@ -455,6 +455,10 @@ static int smu_get_power_num_states(void *handle,
 
 bool is_support_sw_smu(struct amdgpu_device *adev)
 {
+       /* vega20 is 11.0.2, but it's supported via the powerplay code */
+       if (adev->asic_type == CHIP_VEGA20)
+               return false;
+
        if (adev->ip_versions[MP1_HWIP][0] >= IP_VERSION(11, 0, 0))
                return true;
 
--

2.31.1

author maintainer
#3 lore raw

PATCH 3/3 drm/amdgpu/psp: add some missing cases to psp_check_pmfw_centralized_cstate_management

In reply to Alex Deucher

Missed a few asics.

Fixes 82d05736c47b19 ("drm/amdgpu/amdgpu_psp: convert to IP version checking")
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +2 -0
index 6b39e6c02dd8..51620f2fc43a 100644
@@ -77,7 +77,9 @@ static void psp_check_pmfw_centralized_cstate_management(struct psp_context *psp
 	}
 
 	switch (adev->ip_versions[MP0_HWIP][0]) {
+	case IP_VERSION(11, 0, 0):
 	case IP_VERSION(11, 0, 4):
+	case IP_VERSION(11, 0, 5):
 	case IP_VERSION(11, 0, 7):
 	case IP_VERSION(11, 0, 9):
 	case IP_VERSION(11, 0, 11):
Signature · 1 line
2.31.1
#4 lore raw

RE: [PATCH 3/3] drm/amdgpu/psp: add some missing cases to psp_check_pmfw_centralized_cstate_management

[AMD Official Use Only]

I assume IP_VERSION(11, 0, 0) and IP_VERSION(11, 0, 5) are for Navi10 and Navi14 respectively.
Then according to the code comment that " pmfw_centralized_cstate_management support is available for Navi12 and onwards only", I think they should be handled by "default" branch. That means this patch seems unnecessary.

Patch1 and 2 are reviewed-by: Evan Quan <[email protected]>

Quoted 37 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Tuesday, October 12, 2021 11:53 PM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH 3/3] drm/amdgpu/psp: add some missing cases to psp_check_pmfw_centralized_cstate_management

Missed a few asics.

Fixes 82d05736c47b19 ("drm/amdgpu/amdgpu_psp: convert to IP version

checking")

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +0 -0
index 6b39e6c02dd8..51620f2fc43a 100644
@@ -77,7 +77,9 @@ static void

psp_check_pmfw_centralized_cstate_management(struct psp_context *psp

drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +2 -1
 	}
 
 	switch (adev->ip_versions[MP0_HWIP][0]) {
+	case IP_VERSION(11, 0, 0):
 	case IP_VERSION(11, 0, 4):
+	case IP_VERSION(11, 0, 5):
 	case IP_VERSION(11, 0, 7):
 	case IP_VERSION(11, 0, 9):
 	case IP_VERSION(11, 0, 11):
--

2.31.1

#5 lore raw

Re: [PATCH 3/3] drm/amdgpu/psp: add some missing cases to psp_check_pmfw_centralized_cstate_management

Quoted 6 lines · Evan

[AMD Official Use Only]

I assume IP_VERSION(11, 0, 0) and IP_VERSION(11, 0, 5) are for Navi10 and Navi14 respectively.
Then according to the code comment that " pmfw_centralized_cstate_management support is available for Navi12 and onwards only", I think they should be handled by "default" branch. That means this patch seems unnecessary.

The original code was this:

       if ((adev->asic_type >= CHIP_ARCTURUS) ||
           (adev->asic_type >= CHIP_NAVI12))
                psp->pmfw_centralized_cstate_management = true;

So navi10 and 14 were included. Not sure whether they should have been or not.

Alex

Quoted 39 lines

Patch1 and 2 are reviewed-by: Evan Quan <[email protected]>

Quoted 37 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Tuesday, October 12, 2021 11:53 PM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH 3/3] drm/amdgpu/psp: add some missing cases to psp_check_pmfw_centralized_cstate_management

Missed a few asics.

Fixes 82d05736c47b19 ("drm/amdgpu/amdgpu_psp: convert to IP version

checking")

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +0 -0
index 6b39e6c02dd8..51620f2fc43a 100644
@@ -77,7 +77,9 @@ static void

psp_check_pmfw_centralized_cstate_management(struct psp_context *psp

      }

      switch (adev->ip_versions[MP0_HWIP][0]) {
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +2 -1
+     case IP_VERSION(11, 0, 0):
      case IP_VERSION(11, 0, 4):
+     case IP_VERSION(11, 0, 5):
      case IP_VERSION(11, 0, 7):
      case IP_VERSION(11, 0, 9):
      case IP_VERSION(11, 0, 11):
--

2.31.1

#6 lore raw

RE: [PATCH 3/3] drm/amdgpu/psp: add some missing cases to psp_check_pmfw_centralized_cstate_management

[AMD Official Use Only]

Quoted 21 lines

-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Thursday, October 14, 2021 10:00 AM
To: Quan, Evan <[email protected]>
Cc: Deucher, Alexander <[email protected]>; amd- [email protected]
Subject: Re: [PATCH 3/3] drm/amdgpu/psp: add some missing cases to psp_check_pmfw_centralized_cstate_management

Quoted 4 lines · Evan

[AMD Official Use Only]

I assume IP_VERSION(11, 0, 0) and IP_VERSION(11, 0, 5) are for Navi10 and

Navi14 respectively.

Quoted 1 line

Then according to the code comment that "

pmfw_centralized_cstate_management support is available for Navi12 and onwards only", I think they should be handled by "default" branch. That means this patch seems unnecessary.

Quoted 1 line
Quoted 5 lines

The original code was this:

       if ((adev->asic_type >= CHIP_ARCTURUS) ||
           (adev->asic_type >= CHIP_NAVI12))
                psp->pmfw_centralized_cstate_management = true; So navi10 and

14 were included. Not sure whether they should have been or not.

[Quan, Evan] OK. That will make sense. Series is reviewed-by: Evan Quan <[email protected]>
Dig a little more about the history.
It seems at first the centralized_cstate_management was limited to ARCTURUS or >= CHIP_NAIV12. Then it was expanded to all ASICs >= CHIP_ ARCTURUS. But the code comment was left outdated. Can you get that updated on code submit?
@@ -65,7 +65,6 @@ static int psp_securedisplay_terminate(struct psp_context *psp);
*
* This new sequence is required for
* - Arcturus and onwards
- * - Navi12 and onwards
*/

BR
Evan

Quoted 44 lines

Alex

Quoted 14 lines

Patch1 and 2 are reviewed-by: Evan Quan <[email protected]>

Quoted 12 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Tuesday, October 12, 2021 11:53 PM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH 3/3] drm/amdgpu/psp: add some missing cases to psp_check_pmfw_centralized_cstate_management

Missed a few asics.

Fixes 82d05736c47b19 ("drm/amdgpu/amdgpu_psp: convert to IP

version

Quoted 6 lines
Quoted 6 lines

checking")

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 2 ++
 1 file changed, 2 insertions(+)
Quoted 7 lines
Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +0 -0
index 6b39e6c02dd8..51620f2fc43a 100644
@@ -77,7 +77,9 @@ static void

psp_check_pmfw_centralized_cstate_management(struct psp_context

*psp

Quoted 11 lines
Quoted 11 lines
      }

      switch (adev->ip_versions[MP0_HWIP][0]) {
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +2 -1
+     case IP_VERSION(11, 0, 0):
      case IP_VERSION(11, 0, 4):
+     case IP_VERSION(11, 0, 5):
      case IP_VERSION(11, 0, 7):
      case IP_VERSION(11, 0, 9):
      case IP_VERSION(11, 0, 11):
--

2.31.1

#7 lore raw

Re: [PATCH 3/3] drm/amdgpu/psp: add some missing cases to psp_check_pmfw_centralized_cstate_management

Quoted 36 lines · Evan

[AMD Official Use Only]

Quoted 21 lines

-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Thursday, October 14, 2021 10:00 AM
To: Quan, Evan <[email protected]>
Cc: Deucher, Alexander <[email protected]>; amd- [email protected]
Subject: Re: [PATCH 3/3] drm/amdgpu/psp: add some missing cases to psp_check_pmfw_centralized_cstate_management

Quoted 4 lines · Evan

[AMD Official Use Only]

I assume IP_VERSION(11, 0, 0) and IP_VERSION(11, 0, 5) are for Navi10 and

Navi14 respectively.

Quoted 1 line

Then according to the code comment that "

pmfw_centralized_cstate_management support is available for Navi12 and onwards only", I think they should be handled by "default" branch. That means this patch seems unnecessary.

Quoted 1 line
Quoted 5 lines

The original code was this:

       if ((adev->asic_type >= CHIP_ARCTURUS) ||
           (adev->asic_type >= CHIP_NAVI12))
                psp->pmfw_centralized_cstate_management = true; So navi10 and

14 were included. Not sure whether they should have been or not.

[Quan, Evan] OK. That will make sense. Series is reviewed-by: Evan Quan <[email protected]>
Dig a little more about the history.
It seems at first the centralized_cstate_management was limited to ARCTURUS or >= CHIP_NAIV12. Then it was expanded to all ASICs >= CHIP_ ARCTURUS. But the code comment was left outdated. Can you get that updated on code submit?

Review static int psp_securedisplay_terminate(struct psp_context *psp); · line 68

Quoted 5 lines
(quoted diff) +0 -1
@@ -65,7 +65,6 @@ static int psp_securedisplay_terminate(struct psp_context *psp);
  *
  * This new sequence is required for
  *   - Arcturus and onwards
- *   - Navi12 and onwards
  */

Will do. Thanks!

Alex

Quoted 47 lines

BR
Evan

Quoted 44 lines

Alex

Quoted 14 lines

Patch1 and 2 are reviewed-by: Evan Quan <[email protected]>

Quoted 12 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Tuesday, October 12, 2021 11:53 PM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH 3/3] drm/amdgpu/psp: add some missing cases to psp_check_pmfw_centralized_cstate_management

Missed a few asics.

Fixes 82d05736c47b19 ("drm/amdgpu/amdgpu_psp: convert to IP

version

Quoted 6 lines
Quoted 6 lines

checking")

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 2 ++
 1 file changed, 2 insertions(+)
Quoted 7 lines
Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +0 -0
index 6b39e6c02dd8..51620f2fc43a 100644
@@ -77,7 +77,9 @@ static void

psp_check_pmfw_centralized_cstate_management(struct psp_context

*psp

Quoted 11 lines
Quoted 11 lines
      }

      switch (adev->ip_versions[MP0_HWIP][0]) {
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +2 -1
+     case IP_VERSION(11, 0, 0):
      case IP_VERSION(11, 0, 4):
+     case IP_VERSION(11, 0, 5):
      case IP_VERSION(11, 0, 7):
      case IP_VERSION(11, 0, 9):
      case IP_VERSION(11, 0, 11):
--

2.31.1

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

[AMD Official Use Only]

Quoted 37 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Tuesday, October 12, 2021 11:53 PM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH 1/3] drm/amdgpu/smu11: fix firmware version check for vangogh

Was missed in the conversion to IP version checking.

Fixes af3b89d3a639d5 ("drm/amdgpu/smu11.0: convert to IP version

checking")

---
 drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c +1 -1
index 3470c33ee09d..6d008e9c2f65 100644
@@ -255,7 +255,7 @@ int smu_v11_0_check_fw_version(struct
 smu_context *smu)
 	case IP_VERSION(11, 0, 11):
 		smu->smc_driver_if_version =
 SMU11_DRIVER_IF_VERSION_Navy_Flounder;
 		break;
-	case CHIP_VANGOGH:
+	case IP_VERSION(11, 5, 0):
 		smu->smc_driver_if_version =

SMU11_DRIVER_IF_VERSION_VANGOGH;

drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c +0 -1
 		break;
 	case IP_VERSION(11, 0, 12):
--

2.31.1

#9 lore raw
Quoted 4 lines · Evan

[AMD Official Use Only]

Is this for just this patch or the series?

Alex

Quoted 38 lines
Quoted 38 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Tuesday, October 12, 2021 11:53 PM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH 1/3] drm/amdgpu/smu11: fix firmware version check for vangogh

Was missed in the conversion to IP version checking.

Fixes af3b89d3a639d5 ("drm/amdgpu/smu11.0: convert to IP version

checking")

---
 drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c +1 -1
index 3470c33ee09d..6d008e9c2f65 100644
@@ -255,7 +255,7 @@ int smu_v11_0_check_fw_version(struct
 smu_context *smu)
      case IP_VERSION(11, 0, 11):
              smu->smc_driver_if_version =
 SMU11_DRIVER_IF_VERSION_Navy_Flounder;
              break;
-     case CHIP_VANGOGH:
+     case IP_VERSION(11, 5, 0):
              smu->smc_driver_if_version =
SMU11_DRIVER_IF_VERSION_VANGOGH;
              break;
      case IP_VERSION(11, 0, 12):

--
2.31.1