[Public]

First, it's not the developer who is using the system. Any mismatch information 
in a dmesg log is always an alarm to the user who is not aware of the 
implementation details.

This mismatch is bound to happen when PMFW is not loaded along with the driver. 
 In such cases, the mechanism to ensure compatibility is only PMFW version 
checks and hence some IP implementations follow the same. If there is an issue, 
the identification mechanism is the stack information which is the driver 
version along with the all the firmware versions. The interface version is not 
the first thing that is checked; in fact, I don't remember checking that at 
all. That is why this code is keeping the same interface version for SMU 
v13.0.12 and SMU v13.0.6 and not getting noticed so far. So instead of sticking 
with it,  it is rather good to clean up such messages or downgrade to debug 
(which is again useless because as mentioned earlier it's not looked at all).

Thanks,
Lijo
-----Original Message-----
From: Wang, Yang(Kevin) <kevinyang.w...@amd.com>
Sent: Friday, September 19, 2025 12:14 PM
To: Lazar, Lijo <lijo.la...@amd.com>; amd-gfx@lists.freedesktop.org
Cc: Zhang, Hawking <hawking.zh...@amd.com>; Deucher, Alexander 
<alexander.deuc...@amd.com>; Kamal, Asad <asad.ka...@amd.com>
Subject: RE: [PATCH] drm/amd/pm: Avoid interface mismatch messaging

[Public]

>> " is not used": Actually, this is used to display information to users and 
>> developers, not the driver itself.

This "driver_if_version" is used to show what driver if source file version is 
using on current driver, this information is used to *developers* and *user* 
from dmesg.log, not driver *itself*.

>> This interface version is not used anywhere. Driver ensures backward 
>> compatibility by PMFW version checks and shows the exact PMFW version in 
>> dmesg log. PMFW version is a more authentic way to identify any 
>> compatibility. So having a mismatch statement in the log is only leading to 
>> confusion.

Pmfw/driver_if_version is the remote(pmfw) version, while driver_if_version is 
the local (kmd) version, Because the driver allows for their existence without 
matching, more information is needed.

They should not be confused as they do not display the same type of information.

Best Regards,
Kevin

-----Original Message-----
From: Lazar, Lijo <lijo.la...@amd.com>
Sent: Friday, September 19, 2025 2:34 PM
To: Wang, Yang(Kevin) <kevinyang.w...@amd.com>; amd-gfx@lists.freedesktop.org
Cc: Zhang, Hawking <hawking.zh...@amd.com>; Deucher, Alexander 
<alexander.deuc...@amd.com>; Kamal, Asad <asad.ka...@amd.com>
Subject: RE: [PATCH] drm/amd/pm: Avoid interface mismatch messaging

[Public]

> Hiding this information seems unreasonable unless there is another
> strong reason

This interface version is not used anywhere. Driver ensures backward 
compatibility by PMFW version checks and shows the exact PMFW version in dmesg 
log. PMFW version is a more authentic way to identify any compatibility. So 
having a mismatch statement in the log is only leading to confusion.

Thanks,
Lijo
-----Original Message-----
From: Wang, Yang(Kevin) <kevinyang.w...@amd.com>
Sent: Friday, September 19, 2025 11:59 AM
To: Lazar, Lijo <lijo.la...@amd.com>; amd-gfx@lists.freedesktop.org
Cc: Zhang, Hawking <hawking.zh...@amd.com>; Deucher, Alexander 
<alexander.deuc...@amd.com>; Kamal, Asad <asad.ka...@amd.com>
Subject: RE: [PATCH] drm/amd/pm: Avoid interface mismatch messaging

[AMD Official Use Only - AMD Internal Distribution Only]

>> PMFW interface version is not used by some IP implementations like SMU 
>> v13.0.6/12, instead rely on PMFW version checks. Avoid the log if interface 
>> version is not used.

" is not used": Actually, this is used to display information to users and 
developers, not the driver itself.

Smu 'driver_if_version': it is used to show driver source file interface 
version on kernel driver side.
Smu 'If_version': it is returned from pmfw side, that means what driver if 
version is using on pmfw side.

The most perfect aesthetic situation is using same if version between driver 
and pmfw side, but it can still work normally even if it is not matched. (with 
limited functionality)

According to the SMU driver design, KMD will not reject interface version 
mismatches to ensure smooth driver loading.
Preserving this information helps the driver understand the KMD/PMFW operating 
environment and detect problems early.
Hiding this information seems unreasonable unless there is another strong 
reason.

Best Regards,
Kevin

-----Original Message-----
From: Lazar, Lijo <lijo.la...@amd.com>
Sent: Friday, September 19, 2025 1:45 PM
To: amd-gfx@lists.freedesktop.org
Cc: Zhang, Hawking <hawking.zh...@amd.com>; Deucher, Alexander 
<alexander.deuc...@amd.com>; Kamal, Asad <asad.ka...@amd.com>; Wang, 
Yang(Kevin) <kevinyang.w...@amd.com>
Subject: [PATCH] drm/amd/pm: Avoid interface mismatch messaging

PMFW interface version is not used by some IP implementations like SMU 
v13.0.6/12, instead rely on PMFW version checks. Avoid the log if interface 
version is not used.

Signed-off-by: Lijo Lazar <lijo.la...@amd.com>
---
 drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c       | 3 ++-
 drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 2 +-
 drivers/gpu/drm/amd/pm/swsmu/smu_cmn.h               | 2 ++
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c 
b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c
index 1a1f2a6b2e52..a89075e25717 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c
@@ -288,7 +288,8 @@ int smu_v13_0_check_fw_version(struct smu_context *smu)
         * Considering above, we just leave user a verbal message instead
         * of halt driver loading.
         */
-       if (if_version != smu->smc_driver_if_version) {
+       if (smu->smc_driver_if_version != SMU_IGNORE_IF_VERSION &&
+           if_version != smu->smc_driver_if_version) {
                dev_info(adev->dev, "smu driver if version = 0x%08x, smu fw if 
version = 0x%08x, "
                         "smu fw program = %d, smu fw version = 0x%08x 
(%d.%d.%d)\n",
                         smu->smc_driver_if_version, if_version, diff --git 
a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c 
b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c
index 349b6b8be010..062f92635215 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c
@@ -3930,7 +3930,7 @@ void smu_v13_0_6_set_ppt_funcs(struct smu_context *smu)
        smu->feature_map = (amdgpu_ip_version(smu->adev, MP1_HWIP, 0) == 
IP_VERSION(13, 0, 12)) ?
                smu_v13_0_12_feature_mask_map : smu_v13_0_6_feature_mask_map;
        smu->table_map = smu_v13_0_6_table_map;
-       smu->smc_driver_if_version = SMU13_0_6_DRIVER_IF_VERSION;
+       smu->smc_driver_if_version = SMU_IGNORE_IF_VERSION;
        smu->smc_fw_caps |= SMU_FW_CAP_RAS_PRI;
        smu_v13_0_set_smu_mailbox_registers(smu);
        smu_v13_0_6_set_temp_funcs(smu); diff --git 
a/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.h 
b/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.h
index d588f74b98de..0ae91c8b6d72 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.h
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.h
@@ -40,6 +40,8 @@
 #define SMU_IH_INTERRUPT_CONTEXT_ID_FAN_ABNORMAL        0x8
 #define SMU_IH_INTERRUPT_CONTEXT_ID_FAN_RECOVERY        0x9

+#define SMU_IGNORE_IF_VERSION 0xFFFFFFFF
+
 #define smu_cmn_init_soft_gpu_metrics(ptr, frev, crev)                   \
        do {                                                             \
                typecheck(struct gpu_metrics_v##frev##_##crev *, (ptr)); \
--
2.49.0




Reply via email to