[PATCH] drm/amdgpu: fix reporting of failed msg sent to SMU
Zhu, Rex
Rex.Zhu at amd.com
Fri Oct 26 01:51:03 UTC 2018
Patch is Reviewed-by: Rex Zhu <Rex.Zhu at amd.com>
Rex
> -----Original Message-----
> From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> On Behalf Of S,
> Shirish
> Sent: Friday, October 26, 2018 6:37 AM
> To: Deucher, Alexander <Alexander.Deucher at amd.com>; Zhu, Rex
> <Rex.Zhu at amd.com>
> Cc: amd-gfx at lists.freedesktop.org; S, Shirish <Shirish.S at amd.com>
> Subject: [PATCH] drm/amdgpu: fix reporting of failed msg sent to SMU
>
> Currently send_msg_to_smc_async() only report which message failed, but
> the actual failing message is the previous one, which SMU is unable to service.
>
> This patch reads the contents of register where the SMU is stuck and report
> appropriately.
>
> Signed-off-by: Shirish S <shirish.s at amd.com>
> ---
> drivers/gpu/drm/amd/powerplay/smumgr/smu8_smumgr.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/smu8_smumgr.c
> b/drivers/gpu/drm/amd/powerplay/smumgr/smu8_smumgr.c
> index f836d30..b1007b8 100644
> --- a/drivers/gpu/drm/amd/powerplay/smumgr/smu8_smumgr.c
> +++ b/drivers/gpu/drm/amd/powerplay/smumgr/smu8_smumgr.c
> @@ -64,6 +64,7 @@ static uint32_t smu8_get_argument(struct pp_hwmgr
> *hwmgr) static int smu8_send_msg_to_smc_async(struct pp_hwmgr
> *hwmgr, uint16_t msg) {
> int result = 0;
> + uint32_t = val;
>
> if (hwmgr == NULL || hwmgr->device == NULL)
> return -EINVAL;
> @@ -71,7 +72,11 @@ static int smu8_send_msg_to_smc_async(struct
> pp_hwmgr *hwmgr, uint16_t msg)
> result = PHM_WAIT_FIELD_UNEQUAL(hwmgr,
> SMU_MP1_SRBM2P_RESP_0,
> CONTENT, 0);
> if (result != 0) {
> + /* Read the last message to SMU, to report actual cause */
> + val = cgs_read_register(hwmgr->device,
> + mmSMU_MP1_SRBM2P_MSG_0);
> pr_err("smu8_send_msg_to_smc_async (0x%04x) failed\n",
> msg);
> + pr_err("SMU still servicing msg (0x%04x)\n", val);
> return result;
> }
>
> --
> 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