All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amd/pm: add smu fw version check for ECC table support
@ 2021-12-14 10:52 Yang Wang
  2021-12-14 19:14 ` Alex Deucher
  0 siblings, 1 reply; 2+ messages in thread
From: Yang Wang @ 2021-12-14 10:52 UTC (permalink / raw)
  To: amd-gfx; +Cc: hao.zhou, lijo.lazar, Yang Wang, hawking.zhang

the smu firmware has been remove ECC TABLE support from 68.46.0.

Signed-off-by: Yang Wang <KevinYang.Wang@amd.com>
---
 drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h            | 2 ++
 drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c | 8 +-------
 2 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h b/drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h
index 2b9b9a7ba97a..78ce451d0b37 100644
--- a/drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h
+++ b/drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h
@@ -79,6 +79,8 @@
 #define SMU_THROTTLER_PPM_BIT			56
 #define SMU_THROTTLER_FIT_BIT			57
 
+#define SMU_FW_VERSION(maj, min, rev)	((maj & 0xffff) << 16 | (min & 0xff) << 8 | (rev & 0xff))
+
 struct smu_hw_power_state {
 	unsigned int magic;
 };
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
index 0907da022197..7f8f00a19836 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
@@ -78,12 +78,6 @@
 
 #define smnPCIE_ESM_CTRL			0x111003D0
 
-/*
- * SMU support ECCTABLE since version 68.42.0,
- * use this to check ECCTALE feature whether support
- */
-#define SUPPORT_ECCTABLE_SMU_VERSION 0x00442a00
-
 static const struct smu_temperature_range smu13_thermal_policy[] =
 {
 	{-273150,  99000, 99000, -273150, 99000, 99000, -273150, 99000, 99000},
@@ -1780,7 +1774,7 @@ static int aldebaran_check_ecc_table_support(struct smu_context *smu)
 		ret = -EOPNOTSUPP;
 	}
 
-	if (smu_version < SUPPORT_ECCTABLE_SMU_VERSION)
+	if (smu_version < SMU_FW_VERSION(68, 42, 0) || smu_version >= SMU_FW_VERSION(68, 46, 0))
 		ret = -EOPNOTSUPP;
 
 	return ret;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] drm/amd/pm: add smu fw version check for ECC table support
  2021-12-14 10:52 [PATCH] drm/amd/pm: add smu fw version check for ECC table support Yang Wang
@ 2021-12-14 19:14 ` Alex Deucher
  0 siblings, 0 replies; 2+ messages in thread
From: Alex Deucher @ 2021-12-14 19:14 UTC (permalink / raw)
  To: Yang Wang; +Cc: Lazar, Lijo, Hawking Zhang, amd-gfx list, hao.zhou

On Tue, Dec 14, 2021 at 5:53 AM Yang Wang <KevinYang.Wang@amd.com> wrote:
>
> the smu firmware has been remove ECC TABLE support from 68.46.0.
>
> Signed-off-by: Yang Wang <KevinYang.Wang@amd.com>

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

> ---
>  drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h            | 2 ++
>  drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c | 8 +-------
>  2 files changed, 3 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h b/drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h
> index 2b9b9a7ba97a..78ce451d0b37 100644
> --- a/drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h
> +++ b/drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h
> @@ -79,6 +79,8 @@
>  #define SMU_THROTTLER_PPM_BIT                  56
>  #define SMU_THROTTLER_FIT_BIT                  57
>
> +#define SMU_FW_VERSION(maj, min, rev)  ((maj & 0xffff) << 16 | (min & 0xff) << 8 | (rev & 0xff))
> +
>  struct smu_hw_power_state {
>         unsigned int magic;
>  };
> diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
> index 0907da022197..7f8f00a19836 100644
> --- a/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
> +++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
> @@ -78,12 +78,6 @@
>
>  #define smnPCIE_ESM_CTRL                       0x111003D0
>
> -/*
> - * SMU support ECCTABLE since version 68.42.0,
> - * use this to check ECCTALE feature whether support
> - */
> -#define SUPPORT_ECCTABLE_SMU_VERSION 0x00442a00
> -
>  static const struct smu_temperature_range smu13_thermal_policy[] =
>  {
>         {-273150,  99000, 99000, -273150, 99000, 99000, -273150, 99000, 99000},
> @@ -1780,7 +1774,7 @@ static int aldebaran_check_ecc_table_support(struct smu_context *smu)
>                 ret = -EOPNOTSUPP;
>         }
>
> -       if (smu_version < SUPPORT_ECCTABLE_SMU_VERSION)
> +       if (smu_version < SMU_FW_VERSION(68, 42, 0) || smu_version >= SMU_FW_VERSION(68, 46, 0))
>                 ret = -EOPNOTSUPP;
>
>         return ret;
> --
> 2.25.1
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-12-14 19:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-14 10:52 [PATCH] drm/amd/pm: add smu fw version check for ECC table support Yang Wang
2021-12-14 19:14 ` Alex Deucher

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.