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

From: Konrad Dybcio
Date: Tue Oct 31 2023 - 06:54:54 EST


On 26.10.2023 17:50, Bryan O'Donoghue wrote:
> Moving the location of the hooks to VFE power domains has several
> advantages.
>
> 1. Separation of concerns and functional decomposition.
> vfe.c should be responsible for and know best how manage
> power-domains for a VFE, excising from camss.c follows this
> principle.
>
> 2. Embeddeding a pointer to genpd in struct camss_vfe{} meas that we can
> dispense with a bunch of kmalloc array inside of camss.c.
>
> 3. Splitting up titan top gdsc from vfe/ife gdsc provides a base for
> breaking up magic indexes in dtsi.
>
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@xxxxxxxxxx>
> ---
[...]


> + /*
> + * If the number of power-domains is greather than the number of VFEs
greater

> + * then the additional power-domain is for the entire CAMSS block the
> + * 'top' power-domain.
> + */
> + if (camss->genpd_num <= camss->res->vfe_num)
> + return 0;
>
Konrad