Skip to content

Commit c3638b8

Browse files
Sibi Sankarsudeep-holla
authored andcommitted
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 <quic_lingutla@quicinc.com> Fixes: 3630cd8 ("firmware: arm_scmi: Add SCMI v3.1 perf power-cost in microwatts") Signed-off-by: Sibi Sankar <quic_sibis@quicinc.com> Reviewed-by: Cristian Marussi <cristian.marussi@arm.com> Link: https://lore.kernel.org/r/20230811204818.30928-1-quic_sibis@quicinc.com Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
1 parent 0bb80ec commit c3638b8

File tree

1 file changed

+2
-2
lines changed
  • drivers/firmware/arm_scmi

1 file changed

+2
-2
lines changed

drivers/firmware/arm_scmi/perf.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1080,6 +1080,8 @@ static int scmi_perf_protocol_init(const struct scmi_protocol_handle *ph)
10801080
if (!pinfo)
10811081
return -ENOMEM;
10821082

1083+
pinfo->version = version;
1084+
10831085
ret = scmi_perf_attributes_get(ph, pinfo);
10841086
if (ret)
10851087
return ret;
@@ -1104,8 +1106,6 @@ static int scmi_perf_protocol_init(const struct scmi_protocol_handle *ph)
11041106
if (ret)
11051107
return ret;
11061108

1107-
pinfo->version = version;
1108-
11091109
return ph->set_priv(ph, pinfo);
11101110
}
11111111

0 commit comments

Comments
 (0)