mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 02:50:49 +09:00
firmware: arm_scmi: Fixup perf power-cost/microwatt support
[ Upstream commitc3638b851b] 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:3630cd8130("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> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
a135c88138
commit
64adb41644
@@ -858,6 +858,8 @@ static int scmi_perf_protocol_init(const struct scmi_protocol_handle *ph)
|
|||||||
if (!pinfo)
|
if (!pinfo)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
pinfo->version = version;
|
||||||
|
|
||||||
ret = scmi_perf_attributes_get(ph, pinfo);
|
ret = scmi_perf_attributes_get(ph, pinfo);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
@@ -877,8 +879,6 @@ static int scmi_perf_protocol_init(const struct scmi_protocol_handle *ph)
|
|||||||
scmi_perf_domain_init_fc(ph, domain, &dom->fc_info);
|
scmi_perf_domain_init_fc(ph, domain, &dom->fc_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
pinfo->version = version;
|
|
||||||
|
|
||||||
return ph->set_priv(ph, pinfo);
|
return ph->set_priv(ph, pinfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user