Skip to contentSkip to conversation

drm/amdgpu/pm: Use inline function for IP version check

PATCH In review Ma Jun 2 participants 2 messages Jan 31, 2024

Subsystems (3)
lore
Share & tools
lore

Ma Jun

author
#0 lore raw

PATCH 1/1 drm/amdgpu/pm: Use inline function for IP version check

Use existing inline function for IP version check.

---
 drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c +1 -1
index bc8bd67c48ac..9c72c36260ff 100644
@@ -2944,7 +2944,7 @@ static bool smu_v13_0_0_wbrf_support_check(struct smu_context *smu)
 {
 	struct amdgpu_device *adev = smu->adev;
 
-	switch (adev->ip_versions[MP1_HWIP][0]) {
+	switch (amdgpu_ip_version(adev, MP1_HWIP, 0)) {
 	case IP_VERSION(13, 0, 0):
 		return smu->smc_fw_version >= 0x004e6300;
 	case IP_VERSION(13, 0, 10):
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw

[AMD Official Use Only - General]

Best Regards,
Kevin

-----Original Message-----
From: Ma, Jun <[email protected]>
Sent: Wednesday, January 31, 2024 1:59 PM
To: [email protected]
Cc: Feng, Kenneth <[email protected]>; Deucher, Alexander <[email protected]>; Wang, Yang(Kevin) <[email protected]>; Ma, Jun <[email protected]>
Subject: [PATCH] drm/amdgpu/pm: Use inline function for IP version check

Use existing inline function for IP version check.

---
 drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c +1 -2
index bc8bd67c48ac..9c72c36260ff 100644
@@ -2944,7 +2944,7 @@ static bool smu_v13_0_0_wbrf_support_check(struct smu_context *smu)  {
        struct amdgpu_device *adev = smu->adev;
 
-       switch (adev->ip_versions[MP1_HWIP][0]) {
+       switch (amdgpu_ip_version(adev, MP1_HWIP, 0)) {
        case IP_VERSION(13, 0, 0):
                return smu->smc_fw_version >= 0x004e6300;
        case IP_VERSION(13, 0, 10):
--

2.34.1