Using scmi performance domains and scmi power domains together

Ben Horgan Ben.Horgan at arm.com
Mon Jan 22 12:27:03 PST 2024


Hi,

I've been looking at adding support in total compute, an arm reference platform, to control the gpu operating points and gpu power on/off via scmi. This was previously done for the juno platform but involved hacks. I would like to make sure this is cleaner going forward.

For device driver simplicity it would be good if a device with a single power domain and a single performance domain could just use a single PM domain. Using a single PM domain means this can be on the platform device and you don't need to create virtual devices. The drivers scmi_pm_domain and scmi_perf_domain both initialize a separate 'struct generic_pm_domain genpd' for each of the corresponding scmi domains. Possibly, there could be some way to bring these together under a single genpd domain. Possible options are:

A. Parent power domains with a helper driver that just uses an empty genpd domain as the child of both the genpd performance domain and the genpd power domain.
B. Combine the scmi_pm_domain and scmi_perf_domain driver and create a 'struct generic_pm_domain genpd' for every pair of power domain and performance domain.
C. Combine the scmi_pm_domain and scmi_perf_domain driver but only create the 'struct generic_pm_domain genpd' for the power domain combinations that are used.
D. Keep things as they are and use separate PM domains for performance and power when using scmi.

Examples of possible ways of expressing these options in the device tree, the scmi performance domain is 3 and the scmi power domain is 8.

A.

scmi_devpd: protocol at 11 {
	reg = <0x11>;
	#power-domain-cells = <1>;
};

scmi_dvfs: protocol at 13 {
	reg = <0x13>;
	#power-domain-cells = <1>;
};

perf_and_performance: perf_and_performance {
	power-domain-names = "perf", "power";
	power-domain = <&scmi_dvfs 3>, <&scmi_devpd 8>;
};

my_device : my_device  {
	power-domain = <&perf_and_performance>
};

B. Combine on every pair

scmi_pm_perf: protocol at 11_13 {
	reg = <0x11>, <0x13>;
	#power-domain-cells = <2>;
};

my_device : my_device {
	power-domain = <&scmi_pm_perf 8 3>
};

C. Combine on used pairs

scmi_pm_perf: protocol at 11_13 {
	reg = <0x11>, <0x13>;
	#power-domain-cells = <2>;
       used-domains = <8, 3>, <9, 4>;
};

my_device : my_device {
	power-domain = <&scmi_pm_perf 8 3>
};

It seems wasteful that the scmi_pm_domain sets up and makes scmi calls for all possibly usable domains at start up even those that aren't controllable by linux. E.g. cpus may use scmi power domain controlled via psci.

scmi_devpd: protocol at 11 {
	reg = <0x11>;
	#power-domain-cells = <1>;
	used-domains = <8>, <9>;
};

Any thoughts?

Thanks,

Ben



More information about the linux-arm-kernel mailing list