[PATCH 3/3] drm/amd/pm: Downgrade SMU mismatch information messages

Lazar, Lijo lijo.lazar at amd.com
Fri Jul 30 04:54:40 UTC 2021



On 7/30/2021 8:10 AM, Mario Limonciello wrote:
> The SMU driver interface and firmware interface messages have comments
> indicating that they are backwards compatible.  Don't output at WARN
> level and scare people there is a problem.  Instead bring it down to
> INFO level and the details about the mismatch into DEBUG levels.
> 

That comment is misleading. We are more lenient on Linux that at least 
we consider it as warning. On a Windows driver this mismatch is treated 
as error. We need to keep the warn level.

Thanks,
Lijo

> Signed-off-by: Mario Limonciello <mario.limonciello at amd.com>
> ---
>   drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c | 15 ++++++++-------
>   drivers/gpu/drm/amd/pm/swsmu/smu12/smu_v12_0.c | 15 ++++++++-------
>   drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 17 +++++++++--------
>   3 files changed, 25 insertions(+), 22 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c
> index b5419e8eba89..1fb2129899e5 100644
> --- a/drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c
> +++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c
> @@ -224,17 +224,12 @@ int smu_v11_0_check_fw_version(struct smu_context *smu)
>   {
>   	struct amdgpu_device *adev = smu->adev;
>   	uint32_t if_version = 0xff, smu_version = 0xff;
> -	uint16_t smu_major;
> -	uint8_t smu_minor, smu_debug;
>   	int ret = 0;
>   
>   	ret = smu_cmn_get_smc_version(smu, &if_version, &smu_version);
>   	if (ret)
>   		return ret;
>   
> -	smu_major = (smu_version >> 16) & 0xffff;
> -	smu_minor = (smu_version >> 8) & 0xff;
> -	smu_debug = (smu_version >> 0) & 0xff;
>   	if (smu->is_apu)
>   		adev->pm.fw_version = smu_version;
>   
> @@ -284,11 +279,17 @@ int smu_v11_0_check_fw_version(struct smu_context *smu)
>   	 * of halt driver loading.
>   	 */
>   	if (if_version != smu->smc_driver_if_version) {
> -		dev_info(smu->adev->dev, "smu driver if version = 0x%08x, smu fw if version = 0x%08x, "
> +		uint8_t smu_minor, smu_debug;
> +		uint16_t smu_major;
> +
> +		smu_major = (smu_version >> 16) & 0xffff;
> +		smu_minor = (smu_version >> 8) & 0xff;
> +		smu_debug = (smu_version >> 0) & 0xff;
> +		dev_dbg(smu->adev->dev, "smu driver if version = 0x%08x, smu fw if version = 0x%08x, "
>   			"smu fw version = 0x%08x (%d.%d.%d)\n",
>   			smu->smc_driver_if_version, if_version,
>   			smu_version, smu_major, smu_minor, smu_debug);
> -		dev_warn(smu->adev->dev, "SMU driver if version not matched\n");
> +		dev_info(smu->adev->dev, "SMU driver if version not matched\n");
>   	}
>   
>   	return ret;
> diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu12/smu_v12_0.c b/drivers/gpu/drm/amd/pm/swsmu/smu12/smu_v12_0.c
> index d60b8c5e8715..ddd6bd5c78d7 100644
> --- a/drivers/gpu/drm/amd/pm/swsmu/smu12/smu_v12_0.c
> +++ b/drivers/gpu/drm/amd/pm/swsmu/smu12/smu_v12_0.c
> @@ -74,17 +74,12 @@ int smu_v12_0_check_fw_version(struct smu_context *smu)
>   {
>   	struct amdgpu_device *adev = smu->adev;
>   	uint32_t if_version = 0xff, smu_version = 0xff;
> -	uint16_t smu_major;
> -	uint8_t smu_minor, smu_debug;
>   	int ret = 0;
>   
>   	ret = smu_cmn_get_smc_version(smu, &if_version, &smu_version);
>   	if (ret)
>   		return ret;
>   
> -	smu_major = (smu_version >> 16) & 0xffff;
> -	smu_minor = (smu_version >> 8) & 0xff;
> -	smu_debug = (smu_version >> 0) & 0xff;
>   	if (smu->is_apu)
>   		adev->pm.fw_version = smu_version;
>   
> @@ -97,11 +92,17 @@ int smu_v12_0_check_fw_version(struct smu_context *smu)
>   	 * of halt driver loading.
>   	 */
>   	if (if_version != smu->smc_driver_if_version) {
> -		dev_info(smu->adev->dev, "smu driver if version = 0x%08x, smu fw if version = 0x%08x, "
> +		uint8_t smu_minor, smu_debug;
> +		uint16_t smu_major;
> +
> +		smu_major = (smu_version >> 16) & 0xffff;
> +		smu_minor = (smu_version >> 8) & 0xff;
> +		smu_debug = (smu_version >> 0) & 0xff;
> +		dev_dbg(smu->adev->dev, "smu driver if version = 0x%08x, smu fw if version = 0x%08x, "
>   			"smu fw version = 0x%08x (%d.%d.%d)\n",
>   			smu->smc_driver_if_version, if_version,
>   			smu_version, smu_major, smu_minor, smu_debug);
> -		dev_warn(smu->adev->dev, "SMU driver if version not matched\n");
> +		dev_info(smu->adev->dev, "SMU driver if version not matched\n");
>   	}
>   
>   	return ret;
> 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 9c99c51740a1..242d3cc6a79b 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
> @@ -194,18 +194,12 @@ int smu_v13_0_check_fw_status(struct smu_context *smu)
>   int smu_v13_0_check_fw_version(struct smu_context *smu)
>   {
>   	uint32_t if_version = 0xff, smu_version = 0xff;
> -	uint16_t smu_major;
> -	uint8_t smu_minor, smu_debug;
>   	int ret = 0;
>   
>   	ret = smu_cmn_get_smc_version(smu, &if_version, &smu_version);
>   	if (ret)
>   		return ret;
>   
> -	smu_major = (smu_version >> 16) & 0xffff;
> -	smu_minor = (smu_version >> 8) & 0xff;
> -	smu_debug = (smu_version >> 0) & 0xff;
> -
>   	switch (smu->adev->asic_type) {
>   	case CHIP_ALDEBARAN:
>   		smu->smc_driver_if_version = SMU13_DRIVER_IF_VERSION_ALDE;
> @@ -228,11 +222,18 @@ int smu_v13_0_check_fw_version(struct smu_context *smu)
>   	 * of halt driver loading.
>   	 */
>   	if (if_version != smu->smc_driver_if_version) {
> -		dev_info(smu->adev->dev, "smu driver if version = 0x%08x, smu fw if version = 0x%08x, "
> +		uint8_t smu_minor, smu_debug;
> +		uint16_t smu_major;
> +
> +		smu_major = (smu_version >> 16) & 0xffff;
> +		smu_minor = (smu_version >> 8) & 0xff;
> +		smu_debug = (smu_version >> 0) & 0xff;
> +
> +		dev_dbg(smu->adev->dev, "smu driver if version = 0x%08x, smu fw if version = 0x%08x, "
>   			 "smu fw version = 0x%08x (%d.%d.%d)\n",
>   			 smu->smc_driver_if_version, if_version,
>   			 smu_version, smu_major, smu_minor, smu_debug);
> -		dev_warn(smu->adev->dev, "SMU driver if version not matched\n");
> +		dev_info(smu->adev->dev, "SMU driver if version not matched\n");
>   	}
>   
>   	return ret;
> 


More information about the amd-gfx mailing list