diff options
author | Shyam Sundar S K <Shyam-sundar.S-k@amd.com> | 2021-06-29 14:17:57 +0530 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2021-07-14 15:09:01 +0200 |
commit | 95e1b60f8dc8f225b14619e9aca9bdd7d99167db (patch) | |
tree | ff1e620c8aeda493cbdeb41c78f37eb5c93f7ad1 /tools/perf/scripts/python/export-to-sqlite.py | |
parent | 95d429206c97cf109591009fa386004191c62c47 (diff) |
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: 156ec4731cb2 ("platform/x86: amd-pmc: Add AMD platform support for S2Idle")
Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Acked-by: Raul E Rangel <rrangel@chromium.org>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20210629084803.248498-2-Shyam-sundar.S-k@amd.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions