Re: [PATCH v5 4/7] media: qcom: camss: Move VFE power-domain specifics into vfe.c

From: Bryan O'Donoghue
Date: Thu Nov 23 2023 - 08:53:39 EST


On 23/11/2023 12:04, Konrad Dybcio wrote:
-    if (camss->genpd_num > camss->res->vfe_num)
-        device_link_del(camss->genpd_link[camss->genpd_num - 1]);
+    if (camss->genpd_link)
+        device_link_del(camss->genpd_link);
+
+    dev_pm_domain_detach(camss->genpd, true);
-    for (i = 0; i < camss->genpd_num; i++)
-        dev_pm_domain_detach(camss->genpd[i], true);
+    camss_genpd_subdevice_cleanup(camss);
This changes the behavior, previously CAMSS_TOP was shut down last

Nope it was first. As a testament to how confusing this code was this is TOP completely not obviously..

if (camss->genpd_num > camss->res->vfe_num)
device_link_del(camss->genpd_link[camss->genpd_num - 1]);

so this is equivalent

if (camss->genpd_link)
device_link_del(camss->genpd_link);

Since I'm V6ing to add the additional patch, I will change the logic here to make TOP unlink last though because, logic.

---
bod