diff options
author | Sibi Sankar <[email protected]> | 2023-08-12 02:18:18 +0530 |
---|---|---|
committer | Sudeep Holla <[email protected]> | 2023-09-11 10:34:05 +0100 |
commit | c3638b851bc1ca0022dca9d6ca4beaa6ef03a216 (patch) | |
tree | 9eac509f1b2ca9359cb3bf925ba9124c6cc4e910 | |
parent | 0bb80ecc33a8fb5a682236443c1e740d5c917d1d (diff) |
firmware: arm_scmi: Fixup perf power-cost/microwatt support
The perf power scale value would currently be reported as bogowatts if the
platform firmware supports microwatt power scale and meets the perf major
version requirements. Fix this by populating version information in the
driver private data before the call to protocol attributes is made.
CC: Chandra Sekhar Lingutla <[email protected]>
Fixes: 3630cd8130ce ("firmware: arm_scmi: Add SCMI v3.1 perf power-cost in microwatts")
Signed-off-by: Sibi Sankar <[email protected]>
Reviewed-by: Cristian Marussi <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Sudeep Holla <[email protected]>
-rw-r--r-- | drivers/firmware/arm_scmi/perf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/firmware/arm_scmi/perf.c b/drivers/firmware/arm_scmi/perf.c index c0cd556fbaae..30dedd6ebfde 100644 --- a/drivers/firmware/arm_scmi/perf.c +++ b/drivers/firmware/arm_scmi/perf.c @@ -1080,6 +1080,8 @@ static int scmi_perf_protocol_init(const struct scmi_protocol_handle *ph) if (!pinfo) return -ENOMEM; + pinfo->version = version; + ret = scmi_perf_attributes_get(ph, pinfo); if (ret) return ret; @@ -1104,8 +1106,6 @@ static int scmi_perf_protocol_init(const struct scmi_protocol_handle *ph) if (ret) return ret; - pinfo->version = version; - return ph->set_priv(ph, pinfo); } |