diff mbox series

[6/9] media: qcom: camss: Designate lite subdevices in resources

Message ID 20240227122415.491-7-quic_grosikop@quicinc.com
State New
Headers show
Series Move camss version related defs in to resources | expand

Commit Message

Gjorgji Rosikopulos Feb. 27, 2024, 12:24 p.m. UTC
From: Milen Mitkov <quic_mmitkov@quicinc.com>

VFE/CSID may have full-fledged or lite versions. Use a variable
in the subdev resources for differentiating between these,
instead of figuring it out by id.

Signed-off-by: Milen Mitkov <quic_mmitkov@quicinc.com>
Signed-off-by: Radoslav Tsvetkov <quic_rtsvetko@quicinc.com>
---
 drivers/media/platform/qcom/camss/camss-vfe.c |  1 +
 drivers/media/platform/qcom/camss/camss.c     | 16 +++++++++++-----
 2 files changed, 12 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/drivers/media/platform/qcom/camss/camss-vfe.c b/drivers/media/platform/qcom/camss/camss-vfe.c
index 4e0a8b2bb737..8d9be0a8e1bb 100644
--- a/drivers/media/platform/qcom/camss/camss-vfe.c
+++ b/drivers/media/platform/qcom/camss/camss-vfe.c
@@ -1491,6 +1491,7 @@  int msm_vfe_subdev_init(struct camss *camss, struct vfe_device *vfe,
 		return -EINVAL;
 
 	vfe->res = &res->vfe;
+
 	vfe->res->hw_ops->subdev_init(dev, vfe);
 
 	/* Power domain */
diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/platform/qcom/camss/camss.c
index eea6f050db64..fc9940e883c5 100644
--- a/drivers/media/platform/qcom/camss/camss.c
+++ b/drivers/media/platform/qcom/camss/camss.c
@@ -713,6 +713,7 @@  static const struct camss_subdev_resources csid_res_845[] = {
 		.interrupt = { "csid0" },
 		.type = CAMSS_SUBDEV_TYPE_CSID,
 		.csid = {
+			.is_lite = false,
 			.hw_ops = &csid_ops_gen2,
 			.formats = &csid_formats_gen2
 		}
@@ -738,6 +739,7 @@  static const struct camss_subdev_resources csid_res_845[] = {
 		.interrupt = { "csid1" },
 		.type = CAMSS_SUBDEV_TYPE_CSID,
 		.csid = {
+			.is_lite = false,
 			.hw_ops = &csid_ops_gen2,
 			.formats = &csid_formats_gen2
 		}
@@ -792,7 +794,7 @@  static const struct camss_subdev_resources vfe_res_845[] = {
 		.type = CAMSS_SUBDEV_TYPE_VFE,
 		.vfe = {
 			.line_num = 4,
-			.has_pd = true,
+			.is_lite = false,
 			.hw_ops = &vfe_ops_170,
 			.formats_rdi = &vfe_formats_rdi_845,
 			.formats_pix = &vfe_formats_pix_845
@@ -820,7 +822,7 @@  static const struct camss_subdev_resources vfe_res_845[] = {
 		.type = CAMSS_SUBDEV_TYPE_VFE,
 		.vfe = {
 			.line_num = 4,
-			.has_pd = true,
+			.is_lite = false,
 			.hw_ops = &vfe_ops_170,
 			.formats_rdi = &vfe_formats_rdi_845,
 			.formats_pix = &vfe_formats_pix_845
@@ -846,8 +848,8 @@  static const struct camss_subdev_resources vfe_res_845[] = {
 		.interrupt = { "vfe_lite" },
 		.type = CAMSS_SUBDEV_TYPE_VFE,
 		.vfe = {
-			.is_lite = true,
 			.line_num = 4,
+			.is_lite = true,
 			.hw_ops = &vfe_ops_170,
 			.formats_rdi = &vfe_formats_rdi_845,
 			.formats_pix = &vfe_formats_pix_845
@@ -956,6 +958,7 @@  static const struct camss_subdev_resources csid_res_8250[] = {
 		.interrupt = { "csid0" },
 		.type = CAMSS_SUBDEV_TYPE_CSID,
 		.csid = {
+			.is_lite = false,
 			.hw_ops = &csid_ops_gen2,
 			.formats = &csid_formats_gen2
 		}
@@ -973,6 +976,7 @@  static const struct camss_subdev_resources csid_res_8250[] = {
 		.interrupt = { "csid1" },
 		.type = CAMSS_SUBDEV_TYPE_CSID,
 		.csid = {
+			.is_lite = false,
 			.hw_ops = &csid_ops_gen2,
 			.formats = &csid_formats_gen2
 		}
@@ -1034,6 +1038,7 @@  static const struct camss_subdev_resources vfe_res_8250[] = {
 		.type = CAMSS_SUBDEV_TYPE_VFE,
 		.vfe = {
 			.line_num = 3,
+			.is_lite = false,
 			.has_pd = true,
 			.pd_name = "ife0",
 			.hw_ops = &vfe_ops_480,
@@ -1061,6 +1066,7 @@  static const struct camss_subdev_resources vfe_res_8250[] = {
 		.type = CAMSS_SUBDEV_TYPE_VFE,
 		.vfe = {
 			.line_num = 3,
+			.is_lite = false,
 			.has_pd = true,
 			.pd_name = "ife1",
 			.hw_ops = &vfe_ops_480,
@@ -1086,8 +1092,8 @@  static const struct camss_subdev_resources vfe_res_8250[] = {
 		.interrupt = { "vfe_lite0" },
 		.type = CAMSS_SUBDEV_TYPE_VFE,
 		.vfe = {
-			.is_lite = true,
 			.line_num = 4,
+			.is_lite = true,
 			.hw_ops = &vfe_ops_480,
 			.formats_rdi = &vfe_formats_rdi_845,
 			.formats_pix = &vfe_formats_pix_845
@@ -1111,8 +1117,8 @@  static const struct camss_subdev_resources vfe_res_8250[] = {
 		.interrupt = { "vfe_lite1" },
 		.type = CAMSS_SUBDEV_TYPE_VFE,
 		.vfe = {
-			.is_lite = true,
 			.line_num = 4,
+			.is_lite = true,
 			.hw_ops = &vfe_ops_480,
 			.formats_rdi = &vfe_formats_rdi_845,
 			.formats_pix = &vfe_formats_pix_845