]> Git Repo - linux.git/commitdiff
firmware: arm_scmi: Fixup perf power-cost/microwatt support
authorSibi Sankar <[email protected]>
Fri, 11 Aug 2023 20:48:18 +0000 (02:18 +0530)
committerSudeep Holla <[email protected]>
Mon, 11 Sep 2023 09:34:05 +0000 (10:34 +0100)
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]>
drivers/firmware/arm_scmi/perf.c

index c0cd556fbaaec6946a98b2785990c2edaa14b699..30dedd6ebfde61f54fef878cdfb5b6eadd2a70c1 100644 (file)
@@ -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);
 }
 
This page took 0.050437 seconds and 4 git commands to generate.