media: qcom: camss: Pass line_num from compat resources
authorBryan O'Donoghue <bryan.odonoghue@linaro.org>
Mon, 25 Sep 2023 15:46:56 +0000 (16:46 +0100)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Sat, 7 Oct 2023 08:55:44 +0000 (10:55 +0200)
commit91719b27926a2e382dba8cb161cb244aebddad71
tree228fb8f25593fb50b81207dbec3e16d8c3f1ca37
parent5900b051959ebf56eb5c6687d8cafb48fc34b973
media: qcom: camss: Pass line_num from compat resources

line_num indicates the number of RDI - raw data interface channels which
are associated with a given IFE/VFE - image/video front end.

On several SoCs the RDI number is not static for each VFE - for example
on sm8250 VFE Lite has four RDIs where regular VFE has three.

Assigning line_num statically in the subdev_init() phase initialises
each VFE to the lower number, meaning in practical terms that we are
lobbing off one RDI on some VFEs.

Interrupt handling uses static for (i = RDI0; i < RDI2; i++) {} in some
of our VFE blocks but this can't work for situations where we have a
mixture of VFE @ 3 RDI and VFE-lite @ 4 RDI blocks.

First step to remediate is to pass line_num from a compat string
controlled data-structure and do so on a per-VFE basis.

Later patches will assign the correct number of RDI blocks per VFE.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/media/platform/qcom/camss/camss-vfe-170.c
drivers/media/platform/qcom/camss/camss-vfe-4-1.c
drivers/media/platform/qcom/camss/camss-vfe-4-7.c
drivers/media/platform/qcom/camss/camss-vfe-4-8.c
drivers/media/platform/qcom/camss/camss-vfe-480.c
drivers/media/platform/qcom/camss/camss-vfe.c
drivers/media/platform/qcom/camss/camss.c
drivers/media/platform/qcom/camss/camss.h