firmware: arm_scmi: Add v3.2 perf level indexing mode support
authorCristian Marussi <cristian.marussi@arm.com>
Mon, 17 Jul 2023 16:12:46 +0000 (17:12 +0100)
committerSudeep Holla <sudeep.holla@arm.com>
Fri, 4 Aug 2023 11:17:19 +0000 (12:17 +0100)
commit31c7c1397a33d4c7ad1e06aa6ea9fc6148554b29
treeb80c199ac6f0575eec0e113c0059a6ded261fc17
parent3da82112355bba263597fcbb24d275fc57e69e7e
firmware: arm_scmi: Add v3.2 perf level indexing mode support

SCMI v3.2 adds PERF protocol support to optionally define performance
domains that cannot be represented on a linear scale; the platform firmware
can declare the performance levels of a domain as being 'level indexed' and
provide an indicative frequency associated to each of those levels, with
such indexes not required anymore to be contiguous nor to satisfy any
linear-scaling constraint: when level-indexing is available for a domain,
the platform will expect to deal with SCMI requests using indexes instead
of performance levels for that domain.

Add level-indexing mode support to the PERF protocol implementation while
maintaining unchanged the protocol operations interface exposed by PERF;
all the required mapping from performamce levels/frequencies to the
corresponding level indexes is carried out transparently by the core PERF
protocol support: as a consequence no change is either required in any
SCMI driver using the PERF protocol, even when using level indexing.

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20230717161246.1761777-3-cristian.marussi@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
drivers/firmware/arm_scmi/perf.c