lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240227122415.491-7-quic_grosikop@quicinc.com>
Date: Tue, 27 Feb 2024 14:24:12 +0200
From: Gjorgji Rosikopulos <quic_grosikop@...cinc.com>
To: <rfoss@...nel.org>, <todor.too@...il.com>, <bryan.odonoghue@...aro.org>,
        <andersson@...nel.org>, <konrad.dybcio@...aro.org>,
        <mchehab@...nel.org>
CC: <linux-media@...r.kernel.org>, <linux-arm-msm@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <laurent.pinchart@...asonboard.com>,
        <hverkuil-cisco@...all.nl>, <quic_hariramp@...cinc.com>
Subject: [PATCH 6/9] media: qcom: camss: Designate lite subdevices in resources

From: Milen Mitkov <quic_mmitkov@...cinc.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@...cinc.com>
Signed-off-by: Radoslav Tsvetkov <quic_rtsvetko@...cinc.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 --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
-- 
2.17.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ