[PATCH 1/3] media: camss: vfe: implement pm domain ops for v4.1

Barnabás Czémán posted 3 patches 3 weeks, 2 days ago
There is a newer version of this series
[PATCH 1/3] media: camss: vfe: implement pm domain ops for v4.1
Posted by Barnabás Czémán 3 weeks, 2 days ago
MSM8917 and MSM8953 has multiple VFE power domains they
have to be power on/off explicitly.

Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
---
 drivers/media/platform/qcom/camss/camss-vfe-4-1.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/media/platform/qcom/camss/camss-vfe-4-1.c b/drivers/media/platform/qcom/camss/camss-vfe-4-1.c
index 1bd3a6ef1d04d8610fd1bee0c22cdbc147c98de5..9a9007c3ff33b40f4c88cd30283f0ad42f8e8d00 100644
--- a/drivers/media/platform/qcom/camss/camss-vfe-4-1.c
+++ b/drivers/media/platform/qcom/camss/camss-vfe-4-1.c
@@ -938,7 +938,10 @@ static irqreturn_t vfe_isr(int irq, void *dev)
  */
 static void vfe_4_1_pm_domain_off(struct vfe_device *vfe)
 {
-	/* nop */
+	if (!vfe->res->has_pd)
+		return;
+
+	vfe_pm_domain_off(vfe);
 }
 
 /*
@@ -947,7 +950,10 @@ static void vfe_4_1_pm_domain_off(struct vfe_device *vfe)
  */
 static int vfe_4_1_pm_domain_on(struct vfe_device *vfe)
 {
-	return 0;
+	if (!vfe->res->has_pd)
+		return 0;
+
+	return vfe_pm_domain_on(vfe);
 }
 
 static const struct vfe_hw_ops_gen1 vfe_ops_gen1_4_1 = {

-- 
2.47.0

Re: [PATCH 1/3] media: camss: vfe: implement pm domain ops for v4.1
Posted by Bryan O'Donoghue 3 weeks, 2 days ago
On 01/11/2024 13:47, Barnabás Czémán wrote:
> MSM8917 and MSM8953 has multiple VFE power domains they
> have to be power on/off explicitly.

"have multiple VFE power-domains"

> 
> Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
> ---
>   drivers/media/platform/qcom/camss/camss-vfe-4-1.c | 10 ++++++++--
>   1 file changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/media/platform/qcom/camss/camss-vfe-4-1.c b/drivers/media/platform/qcom/camss/camss-vfe-4-1.c
> index 1bd3a6ef1d04d8610fd1bee0c22cdbc147c98de5..9a9007c3ff33b40f4c88cd30283f0ad42f8e8d00 100644
> --- a/drivers/media/platform/qcom/camss/camss-vfe-4-1.c
> +++ b/drivers/media/platform/qcom/camss/camss-vfe-4-1.c
> @@ -938,7 +938,10 @@ static irqreturn_t vfe_isr(int irq, void *dev)
>    */
>   static void vfe_4_1_pm_domain_off(struct vfe_device *vfe)
>   {
> -	/* nop */
> +	if (!vfe->res->has_pd)
> +		return;
> +
> +	vfe_pm_domain_off(vfe);
>   }
>   
>   /*
> @@ -947,7 +950,10 @@ static void vfe_4_1_pm_domain_off(struct vfe_device *vfe)
>    */
>   static int vfe_4_1_pm_domain_on(struct vfe_device *vfe)
>   {
> -	return 0;
> +	if (!vfe->res->has_pd)
> +		return 0;
> +
> +	return vfe_pm_domain_on(vfe);
>   }
>   
>   static const struct vfe_hw_ops_gen1 vfe_ops_gen1_4_1 = {
> 

Otherwise LGTM, once you fix your commit log add.

Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>