linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* Using scmi performance domains and scmi power domains together
@ 2024-01-22 20:27 Ben Horgan
  2024-01-23 10:33 ` Sudeep Holla
  0 siblings, 1 reply; 3+ messages in thread
From: Ben Horgan @ 2024-01-22 20:27 UTC (permalink / raw)
  To: linux-arm-kernel@lists.infradead.org
  Cc: nd, Vishnu Banavath, Florent Tomasin, Ulf Hansson, Sudeep Holla,
	linux-pm@vger.kernel.org

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@11 {
	reg = <0x11>;
	#power-domain-cells = <1>;
};

scmi_dvfs: protocol@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@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@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@11 {
	reg = <0x11>;
	#power-domain-cells = <1>;
	used-domains = <8>, <9>;
};

Any thoughts?

Thanks,

Ben

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-01-24  9:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-22 20:27 Using scmi performance domains and scmi power domains together Ben Horgan
2024-01-23 10:33 ` Sudeep Holla
2024-01-24  9:55   ` Ben Horgan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).