[PATCH] drm/amd/pm: add smu fw version check for ECC table support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Signed-off-by: Yang Wang <KevinYang.Wang@xxxxxxx>
---
 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




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux