[PATCH] drm/amd/pp/smu10: log smu version and modify error logging in send_msg

Alex Deucher alexdeucher at gmail.com
Thu Apr 4 15:28:47 UTC 2019


On Thu, Apr 4, 2019 at 6:38 AM S, Shirish <Shirish.S at amd.com> wrote:
>
> Signed-off-by: Shirish S <shirish.s at amd.com>

Please include a patch description.  Why are you you making this change?

> ---
>  drivers/gpu/drm/amd/powerplay/smumgr/smu10_smumgr.c | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/smu10_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/smu10_smumgr.c
> index 6d11076a..373f384 100644
> --- a/drivers/gpu/drm/amd/powerplay/smumgr/smu10_smumgr.c
> +++ b/drivers/gpu/drm/amd/powerplay/smumgr/smu10_smumgr.c
> @@ -85,7 +85,7 @@ static int smu10_send_msg_to_smc(struct pp_hwmgr *hwmgr, uint16_t msg)
>         smu10_send_msg_to_smc_without_waiting(hwmgr, msg);
>
>         if (smu10_wait_for_response(hwmgr) == 0)
> -               printk("Failed to send Message %x.\n", msg);
> +               pr_err("%s Failed to send Message (0x%04x)\n", __func__, msg);
>
>         return 0;
>  }
> @@ -106,7 +106,7 @@ static int smu10_send_msg_to_smc_with_parameter(struct pp_hwmgr *hwmgr,
>
>
>         if (smu10_wait_for_response(hwmgr) == 0)
> -               printk("Failed to send Message %x.\n", msg);
> +               pr_err("%s Failed to send Message (0x%04x)\n", __func__, msg);
>
>         return 0;
>  }

Are there any cases where these are harmless and can be ignored?

> @@ -210,6 +210,11 @@ static int smu10_start_smu(struct pp_hwmgr *hwmgr)
>
>         smum_send_msg_to_smc(hwmgr, PPSMC_MSG_GetSmuVersion);
>         hwmgr->smu_version = smu10_read_arg_from_smc(hwmgr);
> +       pr_info("smu version %02d.%02d.%02d.%02d\n",
> +               ((hwmgr->smu_version >> 24) & 0xFF),
> +               ((hwmgr->smu_version >> 16) & 0xFF),
> +               ((hwmgr->smu_version >> 8) & 0xFF),
> +               (hwmgr->smu_version & 0xFF));

Do we need to print this here?  Would it be better as a debug output?
We already expose the smu firmware version via debugfs along with all
of the other firmware versions.

Alex

>         adev->pm.fw_version = hwmgr->smu_version >> 8;
>
>         if (adev->rev_id < 0x8 && adev->pdev->device != 0x15d8 &&
> --
> 2.7.4
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


More information about the amd-gfx mailing list