Skip to content
Commit 95e1b60f authored by Shyam Sundar S K's avatar Shyam Sundar S K Committed by Hans de Goede
Browse files

platform/x86: amd-pmc: Fix command completion code



The protocol to submit a job request to SMU is to wait for
AMD_PMC_REGISTER_RESPONSE to return 1,meaning SMU is ready to take
requests. PMC driver has to make sure that the response code is always
AMD_PMC_RESULT_OK before making any command submissions.

When we submit a message to SMU, we have to wait until it processes
the request. Adding a read_poll_timeout() check as this was missing in
the existing code.

Also, add a mutex to protect amd_pmc_send_cmd() calls to SMU.

Fixes: 156ec473 ("platform/x86: amd-pmc: Add AMD platform support for S2Idle")
Signed-off-by: default avatarShyam Sundar S K <Shyam-sundar.S-k@amd.com>
Acked-by: default avatarRaul E Rangel <rrangel@chromium.org>
Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20210629084803.248498-2-Shyam-sundar.S-k@amd.com


Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
parent 95d42920
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment