All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/13] media: Use platform_get_irq*() variants to fetch IRQ's
@ 2022-01-11  0:23 Lad Prabhakar
  2022-01-11  0:23 ` [PATCH v2 01/13] media: vsp1: Use platform_get_irq() to get the interrupt Lad Prabhakar
                   ` (12 more replies)
  0 siblings, 13 replies; 36+ messages in thread
From: Lad Prabhakar @ 2022-01-11  0:23 UTC (permalink / raw)
  To: linux-media, Mauro Carvalho Chehab, Hans Verkuil
  Cc: Rob Herring, Andy Shevchenko, Prabhakar, Lad Prabhakar

Hi All,

This patch series aims to drop using platform_get_resource() for IRQ types
in preparation for removal of static setup of IRQ resource from DT core
code.

Dropping usage of platform_get_resource() was agreed based on
the discussion [0].

[0] https://patchwork.kernel.org/project/linux-renesas-soc/
patch/20211209001056.29774-1-prabhakar.mahadev-lad.rj@bp.renesas.com/

Cheers,
Prabhakar

Lad Prabhakar (13):
  media: vsp1: Use platform_get_irq() to get the interrupt
  media: camss: Use platform_get_irq_byname() to get the interrupt
  media: bdisp: Use platform_get_irq() to get the interrupt
  media: s5p-mfc: Use platform_get_irq() to get the interrupt
  media: stm32-dma2d: Use platform_get_irq() to get the interrupt
  media: davinci: vpif: Use platform_get_irq_optional() to get the
    interrupt
  media: exynos-gsc: Use platform_get_irq() to get the interrupt
  media: marvell-ccic: Use platform_get_irq() to get the interrupt
  media: mtk-vcodec: Drop unnecessary call to platform_get_resource()
  media: exynos4-is: Use platform_get_irq() to get the interrupt
  media: s5p-g2d: Use platform_get_irq() to get the interrupt
  media: mtk-vpu: Drop unnecessary call to platform_get_resource()
  media: coda: Use platform_get_irq() to get the interrupt

 drivers/media/platform/coda/imx-vdoa.c        |  9 ++++---
 drivers/media/platform/davinci/vpif.c         | 18 ++++++++------
 drivers/media/platform/davinci/vpif_capture.c | 24 ++++++++++++-------
 drivers/media/platform/davinci/vpif_display.c | 21 ++++++++++------
 drivers/media/platform/exynos-gsc/gsc-core.c  | 14 +++++------
 drivers/media/platform/exynos4-is/fimc-core.c | 11 ++++-----
 drivers/media/platform/exynos4-is/fimc-lite.c | 11 ++++-----
 .../media/platform/marvell-ccic/mmp-driver.c  |  8 +++----
 .../platform/mtk-vcodec/mtk_vcodec_dec_drv.c  | 11 ++++-----
 .../platform/mtk-vcodec/mtk_vcodec_enc_drv.c  | 10 +++-----
 drivers/media/platform/mtk-vpu/mtk_vpu.c      | 10 +++-----
 .../media/platform/qcom/camss/camss-csid.c    | 12 ++++------
 .../media/platform/qcom/camss/camss-csiphy.c  | 12 ++++------
 .../media/platform/qcom/camss/camss-ispif.c   | 12 ++++------
 drivers/media/platform/qcom/camss/camss-vfe.c | 12 ++++------
 drivers/media/platform/s5p-g2d/g2d.c          | 10 +++-----
 drivers/media/platform/s5p-mfc/s5p_mfc.c      | 11 ++++-----
 drivers/media/platform/sti/bdisp/bdisp-v4l2.c | 10 +++-----
 drivers/media/platform/stm32/dma2d/dma2d.c    |  9 +++----
 drivers/media/platform/vsp1/vsp1_drv.c        | 14 +++++------
 20 files changed, 108 insertions(+), 141 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [PATCH v2 01/13] media: vsp1: Use platform_get_irq() to get the interrupt
  2022-01-11  0:23 [PATCH v2 00/13] media: Use platform_get_irq*() variants to fetch IRQ's Lad Prabhakar
@ 2022-01-11  0:23 ` Lad Prabhakar
  2022-01-11  0:23 ` [PATCH v2 02/13] media: camss: Use platform_get_irq_byname() " Lad Prabhakar
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 36+ messages in thread
From: Lad Prabhakar @ 2022-01-11  0:23 UTC (permalink / raw)
  To: linux-media, Mauro Carvalho Chehab, Hans Verkuil,
	Laurent Pinchart, Kieran Bingham
  Cc: Rob Herring, Andy Shevchenko, Prabhakar, Lad Prabhakar,
	linux-renesas-soc, linux-kernel

platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
allocation of IRQ resources in DT core code, this causes an issue
when using hierarchical interrupt domains using "interrupts" property
in the node as this bypasses the hierarchical setup and messes up the
irq chaining.

In preparation for removal of static setup of IRQ resource from DT core
code use platform_get_irq().

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
v1->v2
* Used a local variable irq.
* Included Ack from Laurent
---
 drivers/media/platform/vsp1/vsp1_drv.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/drivers/media/platform/vsp1/vsp1_drv.c b/drivers/media/platform/vsp1/vsp1_drv.c
index c9044785b903..e5b865dca111 100644
--- a/drivers/media/platform/vsp1/vsp1_drv.c
+++ b/drivers/media/platform/vsp1/vsp1_drv.c
@@ -794,9 +794,9 @@ static int vsp1_probe(struct platform_device *pdev)
 {
 	struct vsp1_device *vsp1;
 	struct device_node *fcp_node;
-	struct resource *irq;
 	unsigned int i;
 	int ret;
+	int irq;
 
 	vsp1 = devm_kzalloc(&pdev->dev, sizeof(*vsp1), GFP_KERNEL);
 	if (vsp1 == NULL)
@@ -813,14 +813,12 @@ static int vsp1_probe(struct platform_device *pdev)
 	if (IS_ERR(vsp1->mmio))
 		return PTR_ERR(vsp1->mmio);
 
-	irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
-	if (!irq) {
-		dev_err(&pdev->dev, "missing IRQ\n");
-		return -EINVAL;
-	}
+	irq = platform_get_irq(pdev, 0);
+	if (irq < 0)
+		return irq;
 
-	ret = devm_request_irq(&pdev->dev, irq->start, vsp1_irq_handler,
-			      IRQF_SHARED, dev_name(&pdev->dev), vsp1);
+	ret = devm_request_irq(&pdev->dev, irq, vsp1_irq_handler,
+			       IRQF_SHARED, dev_name(&pdev->dev), vsp1);
 	if (ret < 0) {
 		dev_err(&pdev->dev, "failed to request IRQ\n");
 		return ret;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH v2 02/13] media: camss: Use platform_get_irq_byname() to get the interrupt
  2022-01-11  0:23 [PATCH v2 00/13] media: Use platform_get_irq*() variants to fetch IRQ's Lad Prabhakar
  2022-01-11  0:23 ` [PATCH v2 01/13] media: vsp1: Use platform_get_irq() to get the interrupt Lad Prabhakar
@ 2022-01-11  0:23 ` Lad Prabhakar
  2022-01-11  0:23 ` [PATCH v2 03/13] media: bdisp: Use platform_get_irq() " Lad Prabhakar
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 36+ messages in thread
From: Lad Prabhakar @ 2022-01-11  0:23 UTC (permalink / raw)
  To: linux-media, Mauro Carvalho Chehab, Hans Verkuil, Robert Foss,
	Todor Tomov, Andy Gross, Bjorn Andersson
  Cc: Rob Herring, Andy Shevchenko, Prabhakar, Lad Prabhakar,
	linux-arm-msm, linux-kernel

platform_get_resource_byname(pdev, IORESOURCE_IRQ, ..) relies on static
allocation of IRQ resources in DT core code, this causes an issue
when using hierarchical interrupt domains using "interrupts" property
in the node as this bypasses the hierarchical setup and messes up the
irq chaining.

In preparation for removal of static setup of IRQ resource from DT core
code use platform_get_irq_byname().

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
v1->v2
* No change.
---
 drivers/media/platform/qcom/camss/camss-csid.c   | 12 ++++--------
 drivers/media/platform/qcom/camss/camss-csiphy.c | 12 ++++--------
 drivers/media/platform/qcom/camss/camss-ispif.c  | 12 ++++--------
 drivers/media/platform/qcom/camss/camss-vfe.c    | 12 ++++--------
 4 files changed, 16 insertions(+), 32 deletions(-)

diff --git a/drivers/media/platform/qcom/camss/camss-csid.c b/drivers/media/platform/qcom/camss/camss-csid.c
index a1637b78568b..ac3504e98668 100644
--- a/drivers/media/platform/qcom/camss/camss-csid.c
+++ b/drivers/media/platform/qcom/camss/camss-csid.c
@@ -544,7 +544,6 @@ int msm_csid_subdev_init(struct camss *camss, struct csid_device *csid,
 {
 	struct device *dev = camss->dev;
 	struct platform_device *pdev = to_platform_device(dev);
-	struct resource *r;
 	int i, j;
 	int ret;
 
@@ -571,14 +570,11 @@ int msm_csid_subdev_init(struct camss *camss, struct csid_device *csid,
 
 	/* Interrupt */
 
-	r = platform_get_resource_byname(pdev, IORESOURCE_IRQ,
-					 res->interrupt[0]);
-	if (!r) {
-		dev_err(dev, "missing IRQ\n");
-		return -EINVAL;
-	}
+	ret = platform_get_irq_byname(pdev, res->interrupt[0]);
+	if (ret < 0)
+		return ret;
 
-	csid->irq = r->start;
+	csid->irq = ret;
 	snprintf(csid->irq_name, sizeof(csid->irq_name), "%s_%s%d",
 		 dev_name(dev), MSM_CSID_NAME, csid->id);
 	ret = devm_request_irq(dev, csid->irq, csid->ops->isr,
diff --git a/drivers/media/platform/qcom/camss/camss-csiphy.c b/drivers/media/platform/qcom/camss/camss-csiphy.c
index 24eec16197e7..6b225d06f35a 100644
--- a/drivers/media/platform/qcom/camss/camss-csiphy.c
+++ b/drivers/media/platform/qcom/camss/camss-csiphy.c
@@ -568,7 +568,6 @@ int msm_csiphy_subdev_init(struct camss *camss,
 {
 	struct device *dev = camss->dev;
 	struct platform_device *pdev = to_platform_device(dev);
-	struct resource *r;
 	int i, j;
 	int ret;
 
@@ -611,14 +610,11 @@ int msm_csiphy_subdev_init(struct camss *camss,
 
 	/* Interrupt */
 
-	r = platform_get_resource_byname(pdev, IORESOURCE_IRQ,
-					 res->interrupt[0]);
-	if (!r) {
-		dev_err(dev, "missing IRQ\n");
-		return -EINVAL;
-	}
+	ret = platform_get_irq_byname(pdev, res->interrupt[0]);
+	if (ret < 0)
+		return ret;
 
-	csiphy->irq = r->start;
+	csiphy->irq = ret;
 	snprintf(csiphy->irq_name, sizeof(csiphy->irq_name), "%s_%s%d",
 		 dev_name(dev), MSM_CSIPHY_NAME, csiphy->id);
 
diff --git a/drivers/media/platform/qcom/camss/camss-ispif.c b/drivers/media/platform/qcom/camss/camss-ispif.c
index ba5d65f6ef34..4ee11bb979cd 100644
--- a/drivers/media/platform/qcom/camss/camss-ispif.c
+++ b/drivers/media/platform/qcom/camss/camss-ispif.c
@@ -1100,7 +1100,6 @@ int msm_ispif_subdev_init(struct camss *camss,
 	struct device *dev = camss->dev;
 	struct ispif_device *ispif = camss->ispif;
 	struct platform_device *pdev = to_platform_device(dev);
-	struct resource *r;
 	int i;
 	int ret;
 
@@ -1153,14 +1152,11 @@ int msm_ispif_subdev_init(struct camss *camss,
 
 	/* Interrupt */
 
-	r = platform_get_resource_byname(pdev, IORESOURCE_IRQ, res->interrupt);
-
-	if (!r) {
-		dev_err(dev, "missing IRQ\n");
-		return -EINVAL;
-	}
+	ret = platform_get_irq_byname(pdev, res->interrupt);
+	if (ret < 0)
+		return ret;
 
-	ispif->irq = r->start;
+	ispif->irq = ret;
 	snprintf(ispif->irq_name, sizeof(ispif->irq_name), "%s_%s",
 		 dev_name(dev), MSM_ISPIF_NAME);
 	if (camss->version == CAMSS_8x16)
diff --git a/drivers/media/platform/qcom/camss/camss-vfe.c b/drivers/media/platform/qcom/camss/camss-vfe.c
index 71f78b40e7f5..7c2311d70546 100644
--- a/drivers/media/platform/qcom/camss/camss-vfe.c
+++ b/drivers/media/platform/qcom/camss/camss-vfe.c
@@ -1279,7 +1279,6 @@ int msm_vfe_subdev_init(struct camss *camss, struct vfe_device *vfe,
 {
 	struct device *dev = camss->dev;
 	struct platform_device *pdev = to_platform_device(dev);
-	struct resource *r;
 	int i, j;
 	int ret;
 
@@ -1312,14 +1311,11 @@ int msm_vfe_subdev_init(struct camss *camss, struct vfe_device *vfe,
 
 	/* Interrupt */
 
-	r = platform_get_resource_byname(pdev, IORESOURCE_IRQ,
-					 res->interrupt[0]);
-	if (!r) {
-		dev_err(dev, "missing IRQ\n");
-		return -EINVAL;
-	}
+	ret = platform_get_irq_byname(pdev, res->interrupt[0]);
+	if (ret < 0)
+		return ret;
 
-	vfe->irq = r->start;
+	vfe->irq = ret;
 	snprintf(vfe->irq_name, sizeof(vfe->irq_name), "%s_%s%d",
 		 dev_name(dev), MSM_VFE_NAME, vfe->id);
 	ret = devm_request_irq(dev, vfe->irq, vfe->ops->isr,
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH v2 03/13] media: bdisp: Use platform_get_irq() to get the interrupt
  2022-01-11  0:23 [PATCH v2 00/13] media: Use platform_get_irq*() variants to fetch IRQ's Lad Prabhakar
  2022-01-11  0:23 ` [PATCH v2 01/13] media: vsp1: Use platform_get_irq() to get the interrupt Lad Prabhakar
  2022-01-11  0:23 ` [PATCH v2 02/13] media: camss: Use platform_get_irq_byname() " Lad Prabhakar
@ 2022-01-11  0:23 ` Lad Prabhakar
  2022-01-11  0:23   ` Lad Prabhakar
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 36+ messages in thread
From: Lad Prabhakar @ 2022-01-11  0:23 UTC (permalink / raw)
  To: linux-media, Mauro Carvalho Chehab, Hans Verkuil, Fabien Dessenne
  Cc: Rob Herring, Andy Shevchenko, Prabhakar, Lad Prabhakar, linux-kernel

platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
allocation of IRQ resources in DT core code, this causes an issue
when using hierarchical interrupt domains using "interrupts" property
in the node as this bypasses the hierarchical setup and messes up the
irq chaining.

In preparation for removal of static setup of IRQ resource from DT core
code use platform_get_irq().

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
v1->v2
* No change.
---
 drivers/media/platform/sti/bdisp/bdisp-v4l2.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/media/platform/sti/bdisp/bdisp-v4l2.c b/drivers/media/platform/sti/bdisp/bdisp-v4l2.c
index 01ce7b711774..5aa79d9277c8 100644
--- a/drivers/media/platform/sti/bdisp/bdisp-v4l2.c
+++ b/drivers/media/platform/sti/bdisp/bdisp-v4l2.c
@@ -1284,7 +1284,6 @@ static int bdisp_remove(struct platform_device *pdev)
 static int bdisp_probe(struct platform_device *pdev)
 {
 	struct bdisp_dev *bdisp;
-	struct resource *res;
 	struct device *dev = &pdev->dev;
 	int ret;
 
@@ -1335,14 +1334,11 @@ static int bdisp_probe(struct platform_device *pdev)
 		goto err_wq;
 	}
 
-	res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
-	if (!res) {
-		dev_err(dev, "failed to get IRQ resource\n");
-		ret = -EINVAL;
+	ret = platform_get_irq(pdev, 0);
+	if (ret < 0)
 		goto err_clk;
-	}
 
-	ret = devm_request_threaded_irq(dev, res->start, bdisp_irq_handler,
+	ret = devm_request_threaded_irq(dev, ret, bdisp_irq_handler,
 					bdisp_irq_thread, IRQF_ONESHOT,
 					pdev->name, bdisp);
 	if (ret) {
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH v2 04/13] media: s5p-mfc: Use platform_get_irq() to get the interrupt
  2022-01-11  0:23 [PATCH v2 00/13] media: Use platform_get_irq*() variants to fetch IRQ's Lad Prabhakar
@ 2022-01-11  0:23   ` Lad Prabhakar
  2022-01-11  0:23 ` [PATCH v2 02/13] media: camss: Use platform_get_irq_byname() " Lad Prabhakar
                     ` (11 subsequent siblings)
  12 siblings, 0 replies; 36+ messages in thread
From: Lad Prabhakar @ 2022-01-11  0:23 UTC (permalink / raw)
  To: linux-media, Mauro Carvalho Chehab, Hans Verkuil,
	Marek Szyprowski, Andrzej Hajda
  Cc: Rob Herring, Andy Shevchenko, Prabhakar, Lad Prabhakar,
	linux-arm-kernel, linux-kernel

platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
allocation of IRQ resources in DT core code, this causes an issue
when using hierarchical interrupt domains using "interrupts" property
in the node as this bypasses the hierarchical setup and messes up the
irq chaining.

In preparation for removal of static setup of IRQ resource from DT core
code use platform_get_irq().

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com>
---
v1->v2
* Included RB tag
---
 drivers/media/platform/s5p-mfc/s5p_mfc.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c
index f6732f031e96..761341934925 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c
@@ -1268,7 +1268,6 @@ static int s5p_mfc_probe(struct platform_device *pdev)
 {
 	struct s5p_mfc_dev *dev;
 	struct video_device *vfd;
-	struct resource *res;
 	int ret;
 
 	pr_debug("%s++\n", __func__);
@@ -1294,12 +1293,10 @@ static int s5p_mfc_probe(struct platform_device *pdev)
 	if (IS_ERR(dev->regs_base))
 		return PTR_ERR(dev->regs_base);
 
-	res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
-	if (!res) {
-		dev_err(&pdev->dev, "failed to get irq resource\n");
-		return -ENOENT;
-	}
-	dev->irq = res->start;
+	ret = platform_get_irq(pdev, 0);
+	if (ret < 0)
+		return ret;
+	dev->irq = ret;
 	ret = devm_request_irq(&pdev->dev, dev->irq, s5p_mfc_irq,
 					0, pdev->name, dev);
 	if (ret) {
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH v2 04/13] media: s5p-mfc: Use platform_get_irq() to get the interrupt
@ 2022-01-11  0:23   ` Lad Prabhakar
  0 siblings, 0 replies; 36+ messages in thread
From: Lad Prabhakar @ 2022-01-11  0:23 UTC (permalink / raw)
  To: linux-media, Mauro Carvalho Chehab, Hans Verkuil,
	Marek Szyprowski, Andrzej Hajda
  Cc: Rob Herring, Andy Shevchenko, Prabhakar, Lad Prabhakar,
	linux-arm-kernel, linux-kernel

platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
allocation of IRQ resources in DT core code, this causes an issue
when using hierarchical interrupt domains using "interrupts" property
in the node as this bypasses the hierarchical setup and messes up the
irq chaining.

In preparation for removal of static setup of IRQ resource from DT core
code use platform_get_irq().

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com>
---
v1->v2
* Included RB tag
---
 drivers/media/platform/s5p-mfc/s5p_mfc.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c
index f6732f031e96..761341934925 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c
@@ -1268,7 +1268,6 @@ static int s5p_mfc_probe(struct platform_device *pdev)
 {
 	struct s5p_mfc_dev *dev;
 	struct video_device *vfd;
-	struct resource *res;
 	int ret;
 
 	pr_debug("%s++\n", __func__);
@@ -1294,12 +1293,10 @@ static int s5p_mfc_probe(struct platform_device *pdev)
 	if (IS_ERR(dev->regs_base))
 		return PTR_ERR(dev->regs_base);
 
-	res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
-	if (!res) {
-		dev_err(&pdev->dev, "failed to get irq resource\n");
-		return -ENOENT;
-	}
-	dev->irq = res->start;
+	ret = platform_get_irq(pdev, 0);
+	if (ret < 0)
+		return ret;
+	dev->irq = ret;
 	ret = devm_request_irq(&pdev->dev, dev->irq, s5p_mfc_irq,
 					0, pdev->name, dev);
 	if (ret) {
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH v2 05/13] media: stm32-dma2d: Use platform_get_irq() to get the interrupt
  2022-01-11  0:23 [PATCH v2 00/13] media: Use platform_get_irq*() variants to fetch IRQ's Lad Prabhakar
@ 2022-01-11  0:23   ` Lad Prabhakar
  2022-01-11  0:23 ` [PATCH v2 02/13] media: camss: Use platform_get_irq_byname() " Lad Prabhakar
                     ` (11 subsequent siblings)
  12 siblings, 0 replies; 36+ messages in thread
From: Lad Prabhakar @ 2022-01-11  0:23 UTC (permalink / raw)
  To: linux-media, Mauro Carvalho Chehab, Hans Verkuil,
	Maxime Coquelin, Alexandre Torgue
  Cc: Rob Herring, Andy Shevchenko, Prabhakar, Lad Prabhakar,
	linux-stm32, linux-arm-kernel, linux-kernel

platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
allocation of IRQ resources in DT core code, this causes an issue
when using hierarchical interrupt domains using "interrupts" property
in the node as this bypasses the hierarchical setup and messes up the
irq chaining.

In preparation for removal of static setup of IRQ resource from DT core
code use platform_get_irq().

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
v1->v2
* No change.
---
 drivers/media/platform/stm32/dma2d/dma2d.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/media/platform/stm32/dma2d/dma2d.c b/drivers/media/platform/stm32/dma2d/dma2d.c
index 17af90d86898..9706aa41b5d2 100644
--- a/drivers/media/platform/stm32/dma2d/dma2d.c
+++ b/drivers/media/platform/stm32/dma2d/dma2d.c
@@ -633,14 +633,11 @@ static int dma2d_probe(struct platform_device *pdev)
 		goto put_clk_gate;
 	}
 
-	res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
-	if (!res) {
-		dev_err(&pdev->dev, "failed to find IRQ\n");
-		ret = -ENXIO;
+	ret = platform_get_irq(pdev, 0);
+	if (ret < 0)
 		goto unprep_clk_gate;
-	}
 
-	dev->irq = res->start;
+	dev->irq = ret;
 
 	ret = devm_request_irq(&pdev->dev, dev->irq, dma2d_isr,
 			       0, pdev->name, dev);
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH v2 05/13] media: stm32-dma2d: Use platform_get_irq() to get the interrupt
@ 2022-01-11  0:23   ` Lad Prabhakar
  0 siblings, 0 replies; 36+ messages in thread
From: Lad Prabhakar @ 2022-01-11  0:23 UTC (permalink / raw)
  To: linux-media, Mauro Carvalho Chehab, Hans Verkuil,
	Maxime Coquelin, Alexandre Torgue
  Cc: Rob Herring, Andy Shevchenko, Prabhakar, Lad Prabhakar,
	linux-stm32, linux-arm-kernel, linux-kernel

platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
allocation of IRQ resources in DT core code, this causes an issue
when using hierarchical interrupt domains using "interrupts" property
in the node as this bypasses the hierarchical setup and messes up the
irq chaining.

In preparation for removal of static setup of IRQ resource from DT core
code use platform_get_irq().

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
v1->v2
* No change.
---
 drivers/media/platform/stm32/dma2d/dma2d.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/media/platform/stm32/dma2d/dma2d.c b/drivers/media/platform/stm32/dma2d/dma2d.c
index 17af90d86898..9706aa41b5d2 100644
--- a/drivers/media/platform/stm32/dma2d/dma2d.c
+++ b/drivers/media/platform/stm32/dma2d/dma2d.c
@@ -633,14 +633,11 @@ static int dma2d_probe(struct platform_device *pdev)
 		goto put_clk_gate;
 	}
 
-	res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
-	if (!res) {
-		dev_err(&pdev->dev, "failed to find IRQ\n");
-		ret = -ENXIO;
+	ret = platform_get_irq(pdev, 0);
+	if (ret < 0)
 		goto unprep_clk_gate;
-	}
 
-	dev->irq = res->start;
+	dev->irq = ret;
 
 	ret = devm_request_irq(&pdev->dev, dev->irq, dma2d_isr,
 			       0, pdev->name, dev);
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH v2 06/13] media: davinci: vpif: Use platform_get_irq_optional() to get the interrupt
  2022-01-11  0:23 [PATCH v2 00/13] media: Use platform_get_irq*() variants to fetch IRQ's Lad Prabhakar
                   ` (4 preceding siblings ...)
  2022-01-11  0:23   ` Lad Prabhakar
@ 2022-01-11  0:23 ` Lad Prabhakar
  2022-01-11 10:25   ` Hans Verkuil
  2022-01-11  0:23   ` Lad Prabhakar
                   ` (6 subsequent siblings)
  12 siblings, 1 reply; 36+ messages in thread
From: Lad Prabhakar @ 2022-01-11  0:23 UTC (permalink / raw)
  To: linux-media, Mauro Carvalho Chehab, Hans Verkuil, Lad, Prabhakar
  Cc: Rob Herring, Andy Shevchenko, Lad Prabhakar, linux-kernel

platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
allocation of IRQ resources in DT core code, this causes an issue
when using hierarchical interrupt domains using "interrupts" property
in the node as this bypasses the hierarchical setup and messes up the
irq chaining.

In preparation for removal of static setup of IRQ resource from DT core
code use platform_get_irq_optional().

While at it, propagate error code in case devm_request_irq() fails
instead of returning -EINVAL in vpif_display.c.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
v1->v2
* Used DEFINE_RES_IRQ_NAMED() macro
* Considered IRQ0 as no IRQ.
---
 drivers/media/platform/davinci/vpif.c         | 18 ++++++++------
 drivers/media/platform/davinci/vpif_capture.c | 24 ++++++++++++-------
 drivers/media/platform/davinci/vpif_display.c | 21 ++++++++++------
 3 files changed, 40 insertions(+), 23 deletions(-)

diff --git a/drivers/media/platform/davinci/vpif.c b/drivers/media/platform/davinci/vpif.c
index 5a89d885d0e3..2dbb464399cc 100644
--- a/drivers/media/platform/davinci/vpif.c
+++ b/drivers/media/platform/davinci/vpif.c
@@ -20,8 +20,10 @@
 #include <linux/err.h>
 #include <linux/init.h>
 #include <linux/io.h>
+#include <linux/irq.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
+#include <linux/of.h>
 #include <linux/platform_device.h>
 #include <linux/pm_runtime.h>
 #include <linux/spinlock.h>
@@ -425,9 +427,10 @@ EXPORT_SYMBOL(vpif_channel_getfid);
 
 static int vpif_probe(struct platform_device *pdev)
 {
-	static struct resource *res_irq;
+	static struct resource res_irq;
 	struct platform_device *pdev_capture, *pdev_display;
 	struct device_node *endpoint = NULL;
+	int irq;
 
 	vpif_base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(vpif_base))
@@ -453,19 +456,20 @@ static int vpif_probe(struct platform_device *pdev)
 	 * For DT platforms, manually create platform_devices for
 	 * capture/display drivers.
 	 */
-	res_irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
-	if (!res_irq) {
-		dev_warn(&pdev->dev, "Missing IRQ resource.\n");
+	irq = platform_get_irq(pdev, 0);
+	if (irq < 0) {
 		pm_runtime_put(&pdev->dev);
-		return -EINVAL;
+		return irq;
 	}
+	res_irq = (struct resource)DEFINE_RES_IRQ_NAMED(irq, of_node_full_name(pdev->dev.of_node));
+	res_irq.flags |= irq_get_trigger_type(irq);
 
 	pdev_capture = devm_kzalloc(&pdev->dev, sizeof(*pdev_capture),
 				    GFP_KERNEL);
 	if (pdev_capture) {
 		pdev_capture->name = "vpif_capture";
 		pdev_capture->id = -1;
-		pdev_capture->resource = res_irq;
+		pdev_capture->resource = &res_irq;
 		pdev_capture->num_resources = 1;
 		pdev_capture->dev.dma_mask = pdev->dev.dma_mask;
 		pdev_capture->dev.coherent_dma_mask = pdev->dev.coherent_dma_mask;
@@ -480,7 +484,7 @@ static int vpif_probe(struct platform_device *pdev)
 	if (pdev_display) {
 		pdev_display->name = "vpif_display";
 		pdev_display->id = -1;
-		pdev_display->resource = res_irq;
+		pdev_display->resource = &res_irq;
 		pdev_display->num_resources = 1;
 		pdev_display->dev.dma_mask = pdev->dev.dma_mask;
 		pdev_display->dev.coherent_dma_mask = pdev->dev.coherent_dma_mask;
diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c
index 8fe55374c5a3..aaf8a0ec98ff 100644
--- a/drivers/media/platform/davinci/vpif_capture.c
+++ b/drivers/media/platform/davinci/vpif_capture.c
@@ -1607,7 +1607,6 @@ static __init int vpif_probe(struct platform_device *pdev)
 {
 	struct vpif_subdev_info *subdevdata;
 	struct i2c_adapter *i2c_adap;
-	struct resource *res;
 	int subdev_count;
 	int res_idx = 0;
 	int i, err;
@@ -1632,15 +1631,22 @@ static __init int vpif_probe(struct platform_device *pdev)
 		goto vpif_free;
 	}
 
-	while ((res = platform_get_resource(pdev, IORESOURCE_IRQ, res_idx))) {
-		err = devm_request_irq(&pdev->dev, res->start, vpif_channel_isr,
-					IRQF_SHARED, VPIF_DRIVER_NAME,
-					(void *)(&vpif_obj.dev[res_idx]->
-					channel_id));
-		if (err) {
-			err = -EINVAL;
+	while (1) {
+		int irq;
+
+		err = platform_get_irq_optional(pdev, res_idx);
+		if (err < 0 && err != -ENXIO)
+			goto vpif_unregister;
+		if (err > 0)
+			irq = err;
+		else
+			break;
+
+		err = devm_request_irq(&pdev->dev, irq, vpif_channel_isr,
+				       IRQF_SHARED, VPIF_DRIVER_NAME,
+				       (void *)(&vpif_obj.dev[res_idx]->channel_id));
+		if (err)
 			goto vpif_unregister;
-		}
 		res_idx++;
 	}
 
diff --git a/drivers/media/platform/davinci/vpif_display.c b/drivers/media/platform/davinci/vpif_display.c
index 59f6b782e104..c4a0c4a4448c 100644
--- a/drivers/media/platform/davinci/vpif_display.c
+++ b/drivers/media/platform/davinci/vpif_display.c
@@ -1221,7 +1221,6 @@ static __init int vpif_probe(struct platform_device *pdev)
 {
 	struct vpif_subdev_info *subdevdata;
 	struct i2c_adapter *i2c_adap;
-	struct resource *res;
 	int subdev_count;
 	int res_idx = 0;
 	int i, err;
@@ -1245,13 +1244,21 @@ static __init int vpif_probe(struct platform_device *pdev)
 		goto vpif_free;
 	}
 
-	while ((res = platform_get_resource(pdev, IORESOURCE_IRQ, res_idx))) {
-		err = devm_request_irq(&pdev->dev, res->start, vpif_channel_isr,
-					IRQF_SHARED, VPIF_DRIVER_NAME,
-					(void *)(&vpif_obj.dev[res_idx]->
-					channel_id));
+	while (1) {
+		int irq;
+
+		err = platform_get_irq_optional(pdev, res_idx);
+		if (err < 0 && err != -ENXIO)
+			goto vpif_unregister;
+		if (err > 0)
+			irq = err;
+		else
+			break;
+
+		err = devm_request_irq(&pdev->dev, irq, vpif_channel_isr,
+				       IRQF_SHARED, VPIF_DRIVER_NAME,
+				       (void *)(&vpif_obj.dev[res_idx]->channel_id));
 		if (err) {
-			err = -EINVAL;
 			vpif_err("VPIF IRQ request failed\n");
 			goto vpif_unregister;
 		}
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH v2 07/13] media: exynos-gsc: Use platform_get_irq() to get the interrupt
  2022-01-11  0:23 [PATCH v2 00/13] media: Use platform_get_irq*() variants to fetch IRQ's Lad Prabhakar
@ 2022-01-11  0:23   ` Lad Prabhakar
  2022-01-11  0:23 ` [PATCH v2 02/13] media: camss: Use platform_get_irq_byname() " Lad Prabhakar
                     ` (11 subsequent siblings)
  12 siblings, 0 replies; 36+ messages in thread
From: Lad Prabhakar @ 2022-01-11  0:23 UTC (permalink / raw)
  To: linux-media, Mauro Carvalho Chehab, Hans Verkuil, Krzysztof Kozlowski
  Cc: Rob Herring, Andy Shevchenko, Prabhakar, Lad Prabhakar,
	linux-arm-kernel, linux-samsung-soc, linux-kernel

platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
allocation of IRQ resources in DT core code, this causes an issue
when using hierarchical interrupt domains using "interrupts" property
in the node as this bypasses the hierarchical setup and messes up the
irq chaining.

In preparation for removal of static setup of IRQ resource from DT core
code use platform_get_irq().

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
v1->v2
* No change.
---
 drivers/media/platform/exynos-gsc/gsc-core.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/drivers/media/platform/exynos-gsc/gsc-core.c b/drivers/media/platform/exynos-gsc/gsc-core.c
index cfd6ae70b8d8..e3559b047092 100644
--- a/drivers/media/platform/exynos-gsc/gsc-core.c
+++ b/drivers/media/platform/exynos-gsc/gsc-core.c
@@ -1106,9 +1106,9 @@ MODULE_DEVICE_TABLE(of, exynos_gsc_match);
 static int gsc_probe(struct platform_device *pdev)
 {
 	struct gsc_dev *gsc;
-	struct resource *res;
 	struct device *dev = &pdev->dev;
 	const struct gsc_driverdata *drv_data = of_device_get_match_data(dev);
+	int irq;
 	int ret;
 	int i;
 
@@ -1141,11 +1141,9 @@ static int gsc_probe(struct platform_device *pdev)
 	if (IS_ERR(gsc->regs))
 		return PTR_ERR(gsc->regs);
 
-	res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
-	if (!res) {
-		dev_err(dev, "failed to get IRQ resource\n");
-		return -ENXIO;
-	}
+	irq = platform_get_irq(pdev, 0);
+	if (irq < 0)
+		return irq;
 
 	for (i = 0; i < gsc->num_clocks; i++) {
 		gsc->clock[i] = devm_clk_get(dev, drv_data->clk_names[i]);
@@ -1167,8 +1165,8 @@ static int gsc_probe(struct platform_device *pdev)
 		}
 	}
 
-	ret = devm_request_irq(dev, res->start, gsc_irq_handler,
-				0, pdev->name, gsc);
+	ret = devm_request_irq(dev, irq, gsc_irq_handler,
+			       0, pdev->name, gsc);
 	if (ret) {
 		dev_err(dev, "failed to install irq (%d)\n", ret);
 		goto err_clk;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH v2 07/13] media: exynos-gsc: Use platform_get_irq() to get the interrupt
@ 2022-01-11  0:23   ` Lad Prabhakar
  0 siblings, 0 replies; 36+ messages in thread
From: Lad Prabhakar @ 2022-01-11  0:23 UTC (permalink / raw)
  To: linux-media, Mauro Carvalho Chehab, Hans Verkuil, Krzysztof Kozlowski
  Cc: Rob Herring, Andy Shevchenko, Prabhakar, Lad Prabhakar,
	linux-arm-kernel, linux-samsung-soc, linux-kernel

platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
allocation of IRQ resources in DT core code, this causes an issue
when using hierarchical interrupt domains using "interrupts" property
in the node as this bypasses the hierarchical setup and messes up the
irq chaining.

In preparation for removal of static setup of IRQ resource from DT core
code use platform_get_irq().

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
v1->v2
* No change.
---
 drivers/media/platform/exynos-gsc/gsc-core.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/drivers/media/platform/exynos-gsc/gsc-core.c b/drivers/media/platform/exynos-gsc/gsc-core.c
index cfd6ae70b8d8..e3559b047092 100644
--- a/drivers/media/platform/exynos-gsc/gsc-core.c
+++ b/drivers/media/platform/exynos-gsc/gsc-core.c
@@ -1106,9 +1106,9 @@ MODULE_DEVICE_TABLE(of, exynos_gsc_match);
 static int gsc_probe(struct platform_device *pdev)
 {
 	struct gsc_dev *gsc;
-	struct resource *res;
 	struct device *dev = &pdev->dev;
 	const struct gsc_driverdata *drv_data = of_device_get_match_data(dev);
+	int irq;
 	int ret;
 	int i;
 
@@ -1141,11 +1141,9 @@ static int gsc_probe(struct platform_device *pdev)
 	if (IS_ERR(gsc->regs))
 		return PTR_ERR(gsc->regs);
 
-	res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
-	if (!res) {
-		dev_err(dev, "failed to get IRQ resource\n");
-		return -ENXIO;
-	}
+	irq = platform_get_irq(pdev, 0);
+	if (irq < 0)
+		return irq;
 
 	for (i = 0; i < gsc->num_clocks; i++) {
 		gsc->clock[i] = devm_clk_get(dev, drv_data->clk_names[i]);
@@ -1167,8 +1165,8 @@ static int gsc_probe(struct platform_device *pdev)
 		}
 	}
 
-	ret = devm_request_irq(dev, res->start, gsc_irq_handler,
-				0, pdev->name, gsc);
+	ret = devm_request_irq(dev, irq, gsc_irq_handler,
+			       0, pdev->name, gsc);
 	if (ret) {
 		dev_err(dev, "failed to install irq (%d)\n", ret);
 		goto err_clk;
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH v2 08/13] media: marvell-ccic: Use platform_get_irq() to get the interrupt
  2022-01-11  0:23 [PATCH v2 00/13] media: Use platform_get_irq*() variants to fetch IRQ's Lad Prabhakar
                   ` (6 preceding siblings ...)
  2022-01-11  0:23   ` Lad Prabhakar
@ 2022-01-11  0:23 ` Lad Prabhakar
  2022-01-11  0:23   ` Lad Prabhakar
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 36+ messages in thread
From: Lad Prabhakar @ 2022-01-11  0:23 UTC (permalink / raw)
  To: linux-media, Mauro Carvalho Chehab, Hans Verkuil
  Cc: Rob Herring, Andy Shevchenko, Prabhakar, Lad Prabhakar, linux-kernel

platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
allocation of IRQ resources in DT core code, this causes an issue
when using hierarchical interrupt domains using "interrupts" property
in the node as this bypasses the hierarchical setup and messes up the
irq chaining.

In preparation for removal of static setup of IRQ resource from DT core
code use platform_get_irq().

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
v1->v2
* No change.
---
 drivers/media/platform/marvell-ccic/mmp-driver.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/media/platform/marvell-ccic/mmp-driver.c b/drivers/media/platform/marvell-ccic/mmp-driver.c
index 343ab4f7d807..df16899ab1cb 100644
--- a/drivers/media/platform/marvell-ccic/mmp-driver.c
+++ b/drivers/media/platform/marvell-ccic/mmp-driver.c
@@ -270,12 +270,10 @@ static int mmpcam_probe(struct platform_device *pdev)
 	 * Finally, set up our IRQ now that the core is ready to
 	 * deal with it.
 	 */
-	res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
-	if (res == NULL) {
-		ret = -ENODEV;
+	ret = platform_get_irq(pdev, 0);
+	if (ret < 0)
 		goto out;
-	}
-	cam->irq = res->start;
+	cam->irq = ret;
 	ret = devm_request_irq(&pdev->dev, cam->irq, mmpcam_irq, IRQF_SHARED,
 					"mmp-camera", mcam);
 	if (ret)
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH v2 09/13] media: mtk-vcodec: Drop unnecessary call to platform_get_resource()
  2022-01-11  0:23 [PATCH v2 00/13] media: Use platform_get_irq*() variants to fetch IRQ's Lad Prabhakar
  2022-01-11  0:23 ` [PATCH v2 01/13] media: vsp1: Use platform_get_irq() to get the interrupt Lad Prabhakar
@ 2022-01-11  0:23   ` Lad Prabhakar
  2022-01-11  0:23 ` [PATCH v2 03/13] media: bdisp: Use platform_get_irq() " Lad Prabhakar
                     ` (10 subsequent siblings)
  12 siblings, 0 replies; 36+ messages in thread
From: Lad Prabhakar @ 2022-01-11  0:23 UTC (permalink / raw)
  To: linux-media, Mauro Carvalho Chehab, Hans Verkuil, Tiffany Lin,
	Andrew-CT Chen, Matthias Brugger
  Cc: Rob Herring, Andy Shevchenko, Prabhakar, Lad Prabhakar,
	linux-arm-kernel, linux-mediatek, linux-kernel

mtk_vcodec_probe() calls platform_get_resource(pdev, IORESOURCE_IRQ, ..)
to check if IRQ resource exists and later calls platform_get_irq(pdev, ..)
to get the actual IRQ.

This patch drops an unnecessary call to platform_get_resource() and
checks the return value of platform_get_irq(pdev, ..) to check if the
IRQ line is valid.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
v1->v2
* No change.
---
 .../media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c    | 11 ++++-------
 .../media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c    | 10 +++-------
 2 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c
index 40c39e1e596b..1509c2a4de84 100644
--- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c
+++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c
@@ -200,7 +200,6 @@ static int mtk_vcodec_probe(struct platform_device *pdev)
 {
 	struct mtk_vcodec_dev *dev;
 	struct video_device *vfd_dec;
-	struct resource *res;
 	phandle rproc_phandle;
 	enum mtk_vcodec_fw_type fw_type;
 	int i, ret;
@@ -244,14 +243,12 @@ static int mtk_vcodec_probe(struct platform_device *pdev)
 		mtk_v4l2_debug(2, "reg[%d] base=%p", i, dev->reg_base[i]);
 	}
 
-	res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
-	if (res == NULL) {
-		dev_err(&pdev->dev, "failed to get irq resource");
-		ret = -ENOENT;
+	ret = platform_get_irq(pdev, 0);
+	if (ret < 0)
 		goto err_res;
-	}
 
-	dev->dec_irq = platform_get_irq(pdev, 0);
+	dev->dec_irq = ret;
+
 	irq_set_status_flags(dev->dec_irq, IRQ_NOAUTOEN);
 	ret = devm_request_irq(&pdev->dev, dev->dec_irq,
 			mtk_vcodec_dec_irq_handler, 0, pdev->name, dev);
diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c b/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c
index aeaecb8d416e..86e70d826754 100644
--- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c
+++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c
@@ -236,7 +236,6 @@ static int mtk_vcodec_probe(struct platform_device *pdev)
 {
 	struct mtk_vcodec_dev *dev;
 	struct video_device *vfd_enc;
-	struct resource *res;
 	phandle rproc_phandle;
 	enum mtk_vcodec_fw_type fw_type;
 	int ret;
@@ -280,14 +279,11 @@ static int mtk_vcodec_probe(struct platform_device *pdev)
 		goto err_res;
 	}
 
-	res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
-	if (res == NULL) {
-		dev_err(&pdev->dev, "failed to get irq resource");
-		ret = -ENOENT;
+	ret = platform_get_irq(pdev, 0);
+	if (ret < 0)
 		goto err_res;
-	}
 
-	dev->enc_irq = platform_get_irq(pdev, 0);
+	dev->enc_irq = ret;
 	irq_set_status_flags(dev->enc_irq, IRQ_NOAUTOEN);
 	ret = devm_request_irq(&pdev->dev, dev->enc_irq,
 			       mtk_vcodec_enc_irq_handler,
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH v2 09/13] media: mtk-vcodec: Drop unnecessary call to platform_get_resource()
@ 2022-01-11  0:23   ` Lad Prabhakar
  0 siblings, 0 replies; 36+ messages in thread
From: Lad Prabhakar @ 2022-01-11  0:23 UTC (permalink / raw)
  To: linux-media, Mauro Carvalho Chehab, Hans Verkuil, Tiffany Lin,
	Andrew-CT Chen, Matthias Brugger
  Cc: Rob Herring, Andy Shevchenko, Prabhakar, Lad Prabhakar,
	linux-arm-kernel, linux-mediatek, linux-kernel

mtk_vcodec_probe() calls platform_get_resource(pdev, IORESOURCE_IRQ, ..)
to check if IRQ resource exists and later calls platform_get_irq(pdev, ..)
to get the actual IRQ.

This patch drops an unnecessary call to platform_get_resource() and
checks the return value of platform_get_irq(pdev, ..) to check if the
IRQ line is valid.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
v1->v2
* No change.
---
 .../media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c    | 11 ++++-------
 .../media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c    | 10 +++-------
 2 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c
index 40c39e1e596b..1509c2a4de84 100644
--- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c
+++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c
@@ -200,7 +200,6 @@ static int mtk_vcodec_probe(struct platform_device *pdev)
 {
 	struct mtk_vcodec_dev *dev;
 	struct video_device *vfd_dec;
-	struct resource *res;
 	phandle rproc_phandle;
 	enum mtk_vcodec_fw_type fw_type;
 	int i, ret;
@@ -244,14 +243,12 @@ static int mtk_vcodec_probe(struct platform_device *pdev)
 		mtk_v4l2_debug(2, "reg[%d] base=%p", i, dev->reg_base[i]);
 	}
 
-	res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
-	if (res == NULL) {
-		dev_err(&pdev->dev, "failed to get irq resource");
-		ret = -ENOENT;
+	ret = platform_get_irq(pdev, 0);
+	if (ret < 0)
 		goto err_res;
-	}
 
-	dev->dec_irq = platform_get_irq(pdev, 0);
+	dev->dec_irq = ret;
+
 	irq_set_status_flags(dev->dec_irq, IRQ_NOAUTOEN);
 	ret = devm_request_irq(&pdev->dev, dev->dec_irq,
 			mtk_vcodec_dec_irq_handler, 0, pdev->name, dev);
diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c b/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c
index aeaecb8d416e..86e70d826754 100644
--- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c
+++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c
@@ -236,7 +236,6 @@ static int mtk_vcodec_probe(struct platform_device *pdev)
 {
 	struct mtk_vcodec_dev *dev;
 	struct video_device *vfd_enc;
-	struct resource *res;
 	phandle rproc_phandle;
 	enum mtk_vcodec_fw_type fw_type;
 	int ret;
@@ -280,14 +279,11 @@ static int mtk_vcodec_probe(struct platform_device *pdev)
 		goto err_res;
 	}
 
-	res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
-	if (res == NULL) {
-		dev_err(&pdev->dev, "failed to get irq resource");
-		ret = -ENOENT;
+	ret = platform_get_irq(pdev, 0);
+	if (ret < 0)
 		goto err_res;
-	}
 
-	dev->enc_irq = platform_get_irq(pdev, 0);
+	dev->enc_irq = ret;
 	irq_set_status_flags(dev->enc_irq, IRQ_NOAUTOEN);
 	ret = devm_request_irq(&pdev->dev, dev->enc_irq,
 			       mtk_vcodec_enc_irq_handler,
-- 
2.17.1


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH v2 09/13] media: mtk-vcodec: Drop unnecessary call to platform_get_resource()
@ 2022-01-11  0:23   ` Lad Prabhakar
  0 siblings, 0 replies; 36+ messages in thread
From: Lad Prabhakar @ 2022-01-11  0:23 UTC (permalink / raw)
  To: linux-media, Mauro Carvalho Chehab, Hans Verkuil, Tiffany Lin,
	Andrew-CT Chen, Matthias Brugger
  Cc: Rob Herring, Andy Shevchenko, Prabhakar, Lad Prabhakar,
	linux-arm-kernel, linux-mediatek, linux-kernel

mtk_vcodec_probe() calls platform_get_resource(pdev, IORESOURCE_IRQ, ..)
to check if IRQ resource exists and later calls platform_get_irq(pdev, ..)
to get the actual IRQ.

This patch drops an unnecessary call to platform_get_resource() and
checks the return value of platform_get_irq(pdev, ..) to check if the
IRQ line is valid.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
v1->v2
* No change.
---
 .../media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c    | 11 ++++-------
 .../media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c    | 10 +++-------
 2 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c
index 40c39e1e596b..1509c2a4de84 100644
--- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c
+++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c
@@ -200,7 +200,6 @@ static int mtk_vcodec_probe(struct platform_device *pdev)
 {
 	struct mtk_vcodec_dev *dev;
 	struct video_device *vfd_dec;
-	struct resource *res;
 	phandle rproc_phandle;
 	enum mtk_vcodec_fw_type fw_type;
 	int i, ret;
@@ -244,14 +243,12 @@ static int mtk_vcodec_probe(struct platform_device *pdev)
 		mtk_v4l2_debug(2, "reg[%d] base=%p", i, dev->reg_base[i]);
 	}
 
-	res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
-	if (res == NULL) {
-		dev_err(&pdev->dev, "failed to get irq resource");
-		ret = -ENOENT;
+	ret = platform_get_irq(pdev, 0);
+	if (ret < 0)
 		goto err_res;
-	}
 
-	dev->dec_irq = platform_get_irq(pdev, 0);
+	dev->dec_irq = ret;
+
 	irq_set_status_flags(dev->dec_irq, IRQ_NOAUTOEN);
 	ret = devm_request_irq(&pdev->dev, dev->dec_irq,
 			mtk_vcodec_dec_irq_handler, 0, pdev->name, dev);
diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c b/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c
index aeaecb8d416e..86e70d826754 100644
--- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c
+++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c
@@ -236,7 +236,6 @@ static int mtk_vcodec_probe(struct platform_device *pdev)
 {
 	struct mtk_vcodec_dev *dev;
 	struct video_device *vfd_enc;
-	struct resource *res;
 	phandle rproc_phandle;
 	enum mtk_vcodec_fw_type fw_type;
 	int ret;
@@ -280,14 +279,11 @@ static int mtk_vcodec_probe(struct platform_device *pdev)
 		goto err_res;
 	}
 
-	res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
-	if (res == NULL) {
-		dev_err(&pdev->dev, "failed to get irq resource");
-		ret = -ENOENT;
+	ret = platform_get_irq(pdev, 0);
+	if (ret < 0)
 		goto err_res;
-	}
 
-	dev->enc_irq = platform_get_irq(pdev, 0);
+	dev->enc_irq = ret;
 	irq_set_status_flags(dev->enc_irq, IRQ_NOAUTOEN);
 	ret = devm_request_irq(&pdev->dev, dev->enc_irq,
 			       mtk_vcodec_enc_irq_handler,
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH v2 10/13] media: exynos4-is: Use platform_get_irq() to get the interrupt
  2022-01-11  0:23 [PATCH v2 00/13] media: Use platform_get_irq*() variants to fetch IRQ's Lad Prabhakar
@ 2022-01-11  0:23   ` Lad Prabhakar
  2022-01-11  0:23 ` [PATCH v2 02/13] media: camss: Use platform_get_irq_byname() " Lad Prabhakar
                     ` (11 subsequent siblings)
  12 siblings, 0 replies; 36+ messages in thread
From: Lad Prabhakar @ 2022-01-11  0:23 UTC (permalink / raw)
  To: linux-media, Mauro Carvalho Chehab, Hans Verkuil,
	Sylwester Nawrocki, Krzysztof Kozlowski
  Cc: Rob Herring, Andy Shevchenko, Prabhakar, Lad Prabhakar,
	linux-arm-kernel, linux-samsung-soc, linux-kernel

platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
allocation of IRQ resources in DT core code, this causes an issue
when using hierarchical interrupt domains using "interrupts" property
in the node as this bypasses the hierarchical setup and messes up the
irq chaining.

In preparation for removal of static setup of IRQ resource from DT core
code use platform_get_irq().

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
v1->v2
* No change.
---
 drivers/media/platform/exynos4-is/fimc-core.c | 11 +++++------
 drivers/media/platform/exynos4-is/fimc-lite.c | 11 +++++------
 2 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/drivers/media/platform/exynos4-is/fimc-core.c b/drivers/media/platform/exynos4-is/fimc-core.c
index bfdee771cef9..91cc8d58a663 100644
--- a/drivers/media/platform/exynos4-is/fimc-core.c
+++ b/drivers/media/platform/exynos4-is/fimc-core.c
@@ -926,6 +926,7 @@ static int fimc_probe(struct platform_device *pdev)
 	struct fimc_dev *fimc;
 	struct resource *res;
 	int ret = 0;
+	int irq;
 
 	fimc = devm_kzalloc(dev, sizeof(*fimc), GFP_KERNEL);
 	if (!fimc)
@@ -965,11 +966,9 @@ static int fimc_probe(struct platform_device *pdev)
 	if (IS_ERR(fimc->regs))
 		return PTR_ERR(fimc->regs);
 
-	res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
-	if (res == NULL) {
-		dev_err(dev, "Failed to get IRQ resource\n");
-		return -ENXIO;
-	}
+	irq = platform_get_irq(pdev, 0);
+	if (irq < 0)
+		return irq;
 
 	ret = fimc_clk_get(fimc);
 	if (ret)
@@ -986,7 +985,7 @@ static int fimc_probe(struct platform_device *pdev)
 	if (ret < 0)
 		return ret;
 
-	ret = devm_request_irq(dev, res->start, fimc_irq_handler,
+	ret = devm_request_irq(dev, irq, fimc_irq_handler,
 			       0, dev_name(dev), fimc);
 	if (ret < 0) {
 		dev_err(dev, "failed to install irq (%d)\n", ret);
diff --git a/drivers/media/platform/exynos4-is/fimc-lite.c b/drivers/media/platform/exynos4-is/fimc-lite.c
index aaa3af0493ce..9b7cc9564cf1 100644
--- a/drivers/media/platform/exynos4-is/fimc-lite.c
+++ b/drivers/media/platform/exynos4-is/fimc-lite.c
@@ -1454,6 +1454,7 @@ static int fimc_lite_probe(struct platform_device *pdev)
 	struct fimc_lite *fimc;
 	struct resource *res;
 	int ret;
+	int irq;
 
 	if (!dev->of_node)
 		return -ENODEV;
@@ -1485,17 +1486,15 @@ static int fimc_lite_probe(struct platform_device *pdev)
 	if (IS_ERR(fimc->regs))
 		return PTR_ERR(fimc->regs);
 
-	res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
-	if (res == NULL) {
-		dev_err(dev, "Failed to get IRQ resource\n");
-		return -ENXIO;
-	}
+	irq = platform_get_irq(pdev, 0);
+	if (irq < 0)
+		return irq;
 
 	ret = fimc_lite_clk_get(fimc);
 	if (ret)
 		return ret;
 
-	ret = devm_request_irq(dev, res->start, flite_irq_handler,
+	ret = devm_request_irq(dev, irq, flite_irq_handler,
 			       0, dev_name(dev), fimc);
 	if (ret) {
 		dev_err(dev, "Failed to install irq (%d)\n", ret);
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH v2 10/13] media: exynos4-is: Use platform_get_irq() to get the interrupt
@ 2022-01-11  0:23   ` Lad Prabhakar
  0 siblings, 0 replies; 36+ messages in thread
From: Lad Prabhakar @ 2022-01-11  0:23 UTC (permalink / raw)
  To: linux-media, Mauro Carvalho Chehab, Hans Verkuil,
	Sylwester Nawrocki, Krzysztof Kozlowski
  Cc: Rob Herring, Andy Shevchenko, Prabhakar, Lad Prabhakar,
	linux-arm-kernel, linux-samsung-soc, linux-kernel

platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
allocation of IRQ resources in DT core code, this causes an issue
when using hierarchical interrupt domains using "interrupts" property
in the node as this bypasses the hierarchical setup and messes up the
irq chaining.

In preparation for removal of static setup of IRQ resource from DT core
code use platform_get_irq().

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
v1->v2
* No change.
---
 drivers/media/platform/exynos4-is/fimc-core.c | 11 +++++------
 drivers/media/platform/exynos4-is/fimc-lite.c | 11 +++++------
 2 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/drivers/media/platform/exynos4-is/fimc-core.c b/drivers/media/platform/exynos4-is/fimc-core.c
index bfdee771cef9..91cc8d58a663 100644
--- a/drivers/media/platform/exynos4-is/fimc-core.c
+++ b/drivers/media/platform/exynos4-is/fimc-core.c
@@ -926,6 +926,7 @@ static int fimc_probe(struct platform_device *pdev)
 	struct fimc_dev *fimc;
 	struct resource *res;
 	int ret = 0;
+	int irq;
 
 	fimc = devm_kzalloc(dev, sizeof(*fimc), GFP_KERNEL);
 	if (!fimc)
@@ -965,11 +966,9 @@ static int fimc_probe(struct platform_device *pdev)
 	if (IS_ERR(fimc->regs))
 		return PTR_ERR(fimc->regs);
 
-	res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
-	if (res == NULL) {
-		dev_err(dev, "Failed to get IRQ resource\n");
-		return -ENXIO;
-	}
+	irq = platform_get_irq(pdev, 0);
+	if (irq < 0)
+		return irq;
 
 	ret = fimc_clk_get(fimc);
 	if (ret)
@@ -986,7 +985,7 @@ static int fimc_probe(struct platform_device *pdev)
 	if (ret < 0)
 		return ret;
 
-	ret = devm_request_irq(dev, res->start, fimc_irq_handler,
+	ret = devm_request_irq(dev, irq, fimc_irq_handler,
 			       0, dev_name(dev), fimc);
 	if (ret < 0) {
 		dev_err(dev, "failed to install irq (%d)\n", ret);
diff --git a/drivers/media/platform/exynos4-is/fimc-lite.c b/drivers/media/platform/exynos4-is/fimc-lite.c
index aaa3af0493ce..9b7cc9564cf1 100644
--- a/drivers/media/platform/exynos4-is/fimc-lite.c
+++ b/drivers/media/platform/exynos4-is/fimc-lite.c
@@ -1454,6 +1454,7 @@ static int fimc_lite_probe(struct platform_device *pdev)
 	struct fimc_lite *fimc;
 	struct resource *res;
 	int ret;
+	int irq;
 
 	if (!dev->of_node)
 		return -ENODEV;
@@ -1485,17 +1486,15 @@ static int fimc_lite_probe(struct platform_device *pdev)
 	if (IS_ERR(fimc->regs))
 		return PTR_ERR(fimc->regs);
 
-	res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
-	if (res == NULL) {
-		dev_err(dev, "Failed to get IRQ resource\n");
-		return -ENXIO;
-	}
+	irq = platform_get_irq(pdev, 0);
+	if (irq < 0)
+		return irq;
 
 	ret = fimc_lite_clk_get(fimc);
 	if (ret)
 		return ret;
 
-	ret = devm_request_irq(dev, res->start, flite_irq_handler,
+	ret = devm_request_irq(dev, irq, flite_irq_handler,
 			       0, dev_name(dev), fimc);
 	if (ret) {
 		dev_err(dev, "Failed to install irq (%d)\n", ret);
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH v2 11/13] media: s5p-g2d: Use platform_get_irq() to get the interrupt
  2022-01-11  0:23 [PATCH v2 00/13] media: Use platform_get_irq*() variants to fetch IRQ's Lad Prabhakar
@ 2022-01-11  0:23   ` Lad Prabhakar
  2022-01-11  0:23 ` [PATCH v2 02/13] media: camss: Use platform_get_irq_byname() " Lad Prabhakar
                     ` (11 subsequent siblings)
  12 siblings, 0 replies; 36+ messages in thread
From: Lad Prabhakar @ 2022-01-11  0:23 UTC (permalink / raw)
  To: linux-media, Mauro Carvalho Chehab, Hans Verkuil, Łukasz Stelmach
  Cc: Rob Herring, Andy Shevchenko, Prabhakar, Lad Prabhakar,
	linux-arm-kernel, linux-kernel

platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
allocation of IRQ resources in DT core code, this causes an issue
when using hierarchical interrupt domains using "interrupts" property
in the node as this bypasses the hierarchical setup and messes up the
irq chaining.

In preparation for removal of static setup of IRQ resource from DT core
code use platform_get_irq().

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
v1->v2
* No change.
---
 drivers/media/platform/s5p-g2d/g2d.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/media/platform/s5p-g2d/g2d.c b/drivers/media/platform/s5p-g2d/g2d.c
index fa0bb31bd2b9..dd8864779a7c 100644
--- a/drivers/media/platform/s5p-g2d/g2d.c
+++ b/drivers/media/platform/s5p-g2d/g2d.c
@@ -623,7 +623,6 @@ static int g2d_probe(struct platform_device *pdev)
 {
 	struct g2d_dev *dev;
 	struct video_device *vfd;
-	struct resource *res;
 	const struct of_device_id *of_id;
 	int ret = 0;
 
@@ -664,14 +663,11 @@ static int g2d_probe(struct platform_device *pdev)
 		goto put_clk_gate;
 	}
 
-	res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
-	if (!res) {
-		dev_err(&pdev->dev, "failed to find IRQ\n");
-		ret = -ENXIO;
+	ret = platform_get_irq(pdev, 0);
+	if (ret < 0)
 		goto unprep_clk_gate;
-	}
 
-	dev->irq = res->start;
+	dev->irq = ret;
 
 	ret = devm_request_irq(&pdev->dev, dev->irq, g2d_isr,
 						0, pdev->name, dev);
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH v2 11/13] media: s5p-g2d: Use platform_get_irq() to get the interrupt
@ 2022-01-11  0:23   ` Lad Prabhakar
  0 siblings, 0 replies; 36+ messages in thread
From: Lad Prabhakar @ 2022-01-11  0:23 UTC (permalink / raw)
  To: linux-media, Mauro Carvalho Chehab, Hans Verkuil, Łukasz Stelmach
  Cc: Rob Herring, Andy Shevchenko, Prabhakar, Lad Prabhakar,
	linux-arm-kernel, linux-kernel

platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
allocation of IRQ resources in DT core code, this causes an issue
when using hierarchical interrupt domains using "interrupts" property
in the node as this bypasses the hierarchical setup and messes up the
irq chaining.

In preparation for removal of static setup of IRQ resource from DT core
code use platform_get_irq().

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
v1->v2
* No change.
---
 drivers/media/platform/s5p-g2d/g2d.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/media/platform/s5p-g2d/g2d.c b/drivers/media/platform/s5p-g2d/g2d.c
index fa0bb31bd2b9..dd8864779a7c 100644
--- a/drivers/media/platform/s5p-g2d/g2d.c
+++ b/drivers/media/platform/s5p-g2d/g2d.c
@@ -623,7 +623,6 @@ static int g2d_probe(struct platform_device *pdev)
 {
 	struct g2d_dev *dev;
 	struct video_device *vfd;
-	struct resource *res;
 	const struct of_device_id *of_id;
 	int ret = 0;
 
@@ -664,14 +663,11 @@ static int g2d_probe(struct platform_device *pdev)
 		goto put_clk_gate;
 	}
 
-	res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
-	if (!res) {
-		dev_err(&pdev->dev, "failed to find IRQ\n");
-		ret = -ENXIO;
+	ret = platform_get_irq(pdev, 0);
+	if (ret < 0)
 		goto unprep_clk_gate;
-	}
 
-	dev->irq = res->start;
+	dev->irq = ret;
 
 	ret = devm_request_irq(&pdev->dev, dev->irq, g2d_isr,
 						0, pdev->name, dev);
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH v2 12/13] media: mtk-vpu: Drop unnecessary call to platform_get_resource()
  2022-01-11  0:23 [PATCH v2 00/13] media: Use platform_get_irq*() variants to fetch IRQ's Lad Prabhakar
  2022-01-11  0:23 ` [PATCH v2 01/13] media: vsp1: Use platform_get_irq() to get the interrupt Lad Prabhakar
@ 2022-01-11  0:23   ` Lad Prabhakar
  2022-01-11  0:23 ` [PATCH v2 03/13] media: bdisp: Use platform_get_irq() " Lad Prabhakar
                     ` (10 subsequent siblings)
  12 siblings, 0 replies; 36+ messages in thread
From: Lad Prabhakar @ 2022-01-11  0:23 UTC (permalink / raw)
  To: linux-media, Mauro Carvalho Chehab, Hans Verkuil, Minghsiu Tsai,
	Houlong Wei, Andrew-CT Chen, Tiffany Lin, Matthias Brugger
  Cc: Rob Herring, Andy Shevchenko, Prabhakar, Lad Prabhakar,
	linux-arm-kernel, linux-mediatek, linux-kernel

mtk_vpu_probe() calls platform_get_resource(pdev, IORESOURCE_IRQ, ..)
to check if IRQ resource exists and later calls
platform_get_irq(pdev, ..) to get the actual IRQ.

This patch drops an unnecessary call to platform_get_resource() and
checks the return value of platform_get_irq(pdev, ..) to make sure the
IRQ line is valid.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
v1->v2
* No change.
---
 drivers/media/platform/mtk-vpu/mtk_vpu.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/media/platform/mtk-vpu/mtk_vpu.c b/drivers/media/platform/mtk-vpu/mtk_vpu.c
index 7bd715fc844d..47b684b92f81 100644
--- a/drivers/media/platform/mtk-vpu/mtk_vpu.c
+++ b/drivers/media/platform/mtk-vpu/mtk_vpu.c
@@ -810,7 +810,6 @@ static int mtk_vpu_probe(struct platform_device *pdev)
 {
 	struct mtk_vpu *vpu;
 	struct device *dev;
-	struct resource *res;
 	int ret = 0;
 
 	dev_dbg(&pdev->dev, "initialization\n");
@@ -908,13 +907,10 @@ static int mtk_vpu_probe(struct platform_device *pdev)
 	init_waitqueue_head(&vpu->run.wq);
 	init_waitqueue_head(&vpu->ack_wq);
 
-	res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
-	if (!res) {
-		dev_err(dev, "get IRQ resource failed.\n");
-		ret = -ENXIO;
+	ret = platform_get_irq(pdev, 0);
+	if (ret < 0)
 		goto free_p_mem;
-	}
-	vpu->reg.irq = platform_get_irq(pdev, 0);
+	vpu->reg.irq = ret;
 	ret = devm_request_irq(dev, vpu->reg.irq, vpu_irq_handler, 0,
 			       pdev->name, vpu);
 	if (ret) {
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH v2 12/13] media: mtk-vpu: Drop unnecessary call to platform_get_resource()
@ 2022-01-11  0:23   ` Lad Prabhakar
  0 siblings, 0 replies; 36+ messages in thread
From: Lad Prabhakar @ 2022-01-11  0:23 UTC (permalink / raw)
  To: linux-media, Mauro Carvalho Chehab, Hans Verkuil, Minghsiu Tsai,
	Houlong Wei, Andrew-CT Chen, Tiffany Lin, Matthias Brugger
  Cc: Rob Herring, Andy Shevchenko, Prabhakar, Lad Prabhakar,
	linux-arm-kernel, linux-mediatek, linux-kernel

mtk_vpu_probe() calls platform_get_resource(pdev, IORESOURCE_IRQ, ..)
to check if IRQ resource exists and later calls
platform_get_irq(pdev, ..) to get the actual IRQ.

This patch drops an unnecessary call to platform_get_resource() and
checks the return value of platform_get_irq(pdev, ..) to make sure the
IRQ line is valid.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
v1->v2
* No change.
---
 drivers/media/platform/mtk-vpu/mtk_vpu.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/media/platform/mtk-vpu/mtk_vpu.c b/drivers/media/platform/mtk-vpu/mtk_vpu.c
index 7bd715fc844d..47b684b92f81 100644
--- a/drivers/media/platform/mtk-vpu/mtk_vpu.c
+++ b/drivers/media/platform/mtk-vpu/mtk_vpu.c
@@ -810,7 +810,6 @@ static int mtk_vpu_probe(struct platform_device *pdev)
 {
 	struct mtk_vpu *vpu;
 	struct device *dev;
-	struct resource *res;
 	int ret = 0;
 
 	dev_dbg(&pdev->dev, "initialization\n");
@@ -908,13 +907,10 @@ static int mtk_vpu_probe(struct platform_device *pdev)
 	init_waitqueue_head(&vpu->run.wq);
 	init_waitqueue_head(&vpu->ack_wq);
 
-	res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
-	if (!res) {
-		dev_err(dev, "get IRQ resource failed.\n");
-		ret = -ENXIO;
+	ret = platform_get_irq(pdev, 0);
+	if (ret < 0)
 		goto free_p_mem;
-	}
-	vpu->reg.irq = platform_get_irq(pdev, 0);
+	vpu->reg.irq = ret;
 	ret = devm_request_irq(dev, vpu->reg.irq, vpu_irq_handler, 0,
 			       pdev->name, vpu);
 	if (ret) {
-- 
2.17.1


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH v2 12/13] media: mtk-vpu: Drop unnecessary call to platform_get_resource()
@ 2022-01-11  0:23   ` Lad Prabhakar
  0 siblings, 0 replies; 36+ messages in thread
From: Lad Prabhakar @ 2022-01-11  0:23 UTC (permalink / raw)
  To: linux-media, Mauro Carvalho Chehab, Hans Verkuil, Minghsiu Tsai,
	Houlong Wei, Andrew-CT Chen, Tiffany Lin, Matthias Brugger
  Cc: Rob Herring, Andy Shevchenko, Prabhakar, Lad Prabhakar,
	linux-arm-kernel, linux-mediatek, linux-kernel

mtk_vpu_probe() calls platform_get_resource(pdev, IORESOURCE_IRQ, ..)
to check if IRQ resource exists and later calls
platform_get_irq(pdev, ..) to get the actual IRQ.

This patch drops an unnecessary call to platform_get_resource() and
checks the return value of platform_get_irq(pdev, ..) to make sure the
IRQ line is valid.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
v1->v2
* No change.
---
 drivers/media/platform/mtk-vpu/mtk_vpu.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/media/platform/mtk-vpu/mtk_vpu.c b/drivers/media/platform/mtk-vpu/mtk_vpu.c
index 7bd715fc844d..47b684b92f81 100644
--- a/drivers/media/platform/mtk-vpu/mtk_vpu.c
+++ b/drivers/media/platform/mtk-vpu/mtk_vpu.c
@@ -810,7 +810,6 @@ static int mtk_vpu_probe(struct platform_device *pdev)
 {
 	struct mtk_vpu *vpu;
 	struct device *dev;
-	struct resource *res;
 	int ret = 0;
 
 	dev_dbg(&pdev->dev, "initialization\n");
@@ -908,13 +907,10 @@ static int mtk_vpu_probe(struct platform_device *pdev)
 	init_waitqueue_head(&vpu->run.wq);
 	init_waitqueue_head(&vpu->ack_wq);
 
-	res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
-	if (!res) {
-		dev_err(dev, "get IRQ resource failed.\n");
-		ret = -ENXIO;
+	ret = platform_get_irq(pdev, 0);
+	if (ret < 0)
 		goto free_p_mem;
-	}
-	vpu->reg.irq = platform_get_irq(pdev, 0);
+	vpu->reg.irq = ret;
 	ret = devm_request_irq(dev, vpu->reg.irq, vpu_irq_handler, 0,
 			       pdev->name, vpu);
 	if (ret) {
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH v2 13/13] media: coda: Use platform_get_irq() to get the interrupt
  2022-01-11  0:23 [PATCH v2 00/13] media: Use platform_get_irq*() variants to fetch IRQ's Lad Prabhakar
@ 2022-01-11  0:23   ` Lad Prabhakar
  2022-01-11  0:23 ` [PATCH v2 02/13] media: camss: Use platform_get_irq_byname() " Lad Prabhakar
                     ` (11 subsequent siblings)
  12 siblings, 0 replies; 36+ messages in thread
From: Lad Prabhakar @ 2022-01-11  0:23 UTC (permalink / raw)
  To: linux-media, Mauro Carvalho Chehab, Hans Verkuil, Philipp Zabel,
	Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team
  Cc: Rob Herring, Andy Shevchenko, Prabhakar, Lad Prabhakar,
	linux-arm-kernel, linux-kernel

platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
allocation of IRQ resources in DT core code, this causes an issue
when using hierarchical interrupt domains using "interrupts" property
in the node as this bypasses the hierarchical setup and messes up the
irq chaining.

In preparation for removal of static setup of IRQ resource from DT core
code use platform_get_irq().

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
v1->v2
* No change.
---
 drivers/media/platform/coda/imx-vdoa.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/media/platform/coda/imx-vdoa.c b/drivers/media/platform/coda/imx-vdoa.c
index 00643f37b3e6..c70871bae193 100644
--- a/drivers/media/platform/coda/imx-vdoa.c
+++ b/drivers/media/platform/coda/imx-vdoa.c
@@ -284,7 +284,6 @@ EXPORT_SYMBOL(vdoa_context_configure);
 static int vdoa_probe(struct platform_device *pdev)
 {
 	struct vdoa_data *vdoa;
-	struct resource *res;
 	int ret;
 
 	ret = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32));
@@ -309,10 +308,10 @@ static int vdoa_probe(struct platform_device *pdev)
 	if (IS_ERR(vdoa->regs))
 		return PTR_ERR(vdoa->regs);
 
-	res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
-	if (!res)
-		return -EINVAL;
-	ret = devm_request_threaded_irq(&pdev->dev, res->start, NULL,
+	ret = platform_get_irq(pdev, 0);
+	if (ret < 0)
+		return ret;
+	ret = devm_request_threaded_irq(&pdev->dev, ret, NULL,
 					vdoa_irq_handler, IRQF_ONESHOT,
 					"vdoa", vdoa);
 	if (ret < 0) {
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH v2 13/13] media: coda: Use platform_get_irq() to get the interrupt
@ 2022-01-11  0:23   ` Lad Prabhakar
  0 siblings, 0 replies; 36+ messages in thread
From: Lad Prabhakar @ 2022-01-11  0:23 UTC (permalink / raw)
  To: linux-media, Mauro Carvalho Chehab, Hans Verkuil, Philipp Zabel,
	Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team
  Cc: Rob Herring, Andy Shevchenko, Prabhakar, Lad Prabhakar,
	linux-arm-kernel, linux-kernel

platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
allocation of IRQ resources in DT core code, this causes an issue
when using hierarchical interrupt domains using "interrupts" property
in the node as this bypasses the hierarchical setup and messes up the
irq chaining.

In preparation for removal of static setup of IRQ resource from DT core
code use platform_get_irq().

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
v1->v2
* No change.
---
 drivers/media/platform/coda/imx-vdoa.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/media/platform/coda/imx-vdoa.c b/drivers/media/platform/coda/imx-vdoa.c
index 00643f37b3e6..c70871bae193 100644
--- a/drivers/media/platform/coda/imx-vdoa.c
+++ b/drivers/media/platform/coda/imx-vdoa.c
@@ -284,7 +284,6 @@ EXPORT_SYMBOL(vdoa_context_configure);
 static int vdoa_probe(struct platform_device *pdev)
 {
 	struct vdoa_data *vdoa;
-	struct resource *res;
 	int ret;
 
 	ret = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32));
@@ -309,10 +308,10 @@ static int vdoa_probe(struct platform_device *pdev)
 	if (IS_ERR(vdoa->regs))
 		return PTR_ERR(vdoa->regs);
 
-	res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
-	if (!res)
-		return -EINVAL;
-	ret = devm_request_threaded_irq(&pdev->dev, res->start, NULL,
+	ret = platform_get_irq(pdev, 0);
+	if (ret < 0)
+		return ret;
+	ret = devm_request_threaded_irq(&pdev->dev, ret, NULL,
 					vdoa_irq_handler, IRQF_ONESHOT,
 					"vdoa", vdoa);
 	if (ret < 0) {
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 36+ messages in thread

* Re: [PATCH v2 06/13] media: davinci: vpif: Use platform_get_irq_optional() to get the interrupt
  2022-01-11  0:23 ` [PATCH v2 06/13] media: davinci: vpif: Use platform_get_irq_optional() " Lad Prabhakar
@ 2022-01-11 10:25   ` Hans Verkuil
  2022-01-11 10:43     ` Lad, Prabhakar
  0 siblings, 1 reply; 36+ messages in thread
From: Hans Verkuil @ 2022-01-11 10:25 UTC (permalink / raw)
  To: Lad Prabhakar, linux-media, Mauro Carvalho Chehab, Lad, Prabhakar
  Cc: Rob Herring, Andy Shevchenko, linux-kernel

Hi Prabhakar,

On 11/01/2022 01:23, Lad Prabhakar wrote:
> platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
> allocation of IRQ resources in DT core code, this causes an issue
> when using hierarchical interrupt domains using "interrupts" property
> in the node as this bypasses the hierarchical setup and messes up the
> irq chaining.
> 
> In preparation for removal of static setup of IRQ resource from DT core
> code use platform_get_irq_optional().
> 
> While at it, propagate error code in case devm_request_irq() fails
> instead of returning -EINVAL in vpif_display.c.

Please note that this patch clashes with [1], for which I just posted a PR [2].

So once [2] is merged you'll need to rebase this patch.

Regards,

	Hans

[1] https://patchwork.linuxtv.org/project/linux-media/list/?series=7000
[2] https://patchwork.linuxtv.org/project/linux-media/patch/63d723aa-b6a3-ff42-c3e4-f1fcb979be11@xs4all.nl/

> 
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> ---
> v1->v2
> * Used DEFINE_RES_IRQ_NAMED() macro
> * Considered IRQ0 as no IRQ.
> ---
>  drivers/media/platform/davinci/vpif.c         | 18 ++++++++------
>  drivers/media/platform/davinci/vpif_capture.c | 24 ++++++++++++-------
>  drivers/media/platform/davinci/vpif_display.c | 21 ++++++++++------
>  3 files changed, 40 insertions(+), 23 deletions(-)
> 
> diff --git a/drivers/media/platform/davinci/vpif.c b/drivers/media/platform/davinci/vpif.c
> index 5a89d885d0e3..2dbb464399cc 100644
> --- a/drivers/media/platform/davinci/vpif.c
> +++ b/drivers/media/platform/davinci/vpif.c
> @@ -20,8 +20,10 @@
>  #include <linux/err.h>
>  #include <linux/init.h>
>  #include <linux/io.h>
> +#include <linux/irq.h>
>  #include <linux/kernel.h>
>  #include <linux/module.h>
> +#include <linux/of.h>
>  #include <linux/platform_device.h>
>  #include <linux/pm_runtime.h>
>  #include <linux/spinlock.h>
> @@ -425,9 +427,10 @@ EXPORT_SYMBOL(vpif_channel_getfid);
>  
>  static int vpif_probe(struct platform_device *pdev)
>  {
> -	static struct resource *res_irq;
> +	static struct resource res_irq;
>  	struct platform_device *pdev_capture, *pdev_display;
>  	struct device_node *endpoint = NULL;
> +	int irq;
>  
>  	vpif_base = devm_platform_ioremap_resource(pdev, 0);
>  	if (IS_ERR(vpif_base))
> @@ -453,19 +456,20 @@ static int vpif_probe(struct platform_device *pdev)
>  	 * For DT platforms, manually create platform_devices for
>  	 * capture/display drivers.
>  	 */
> -	res_irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
> -	if (!res_irq) {
> -		dev_warn(&pdev->dev, "Missing IRQ resource.\n");
> +	irq = platform_get_irq(pdev, 0);
> +	if (irq < 0) {
>  		pm_runtime_put(&pdev->dev);
> -		return -EINVAL;
> +		return irq;
>  	}
> +	res_irq = (struct resource)DEFINE_RES_IRQ_NAMED(irq, of_node_full_name(pdev->dev.of_node));
> +	res_irq.flags |= irq_get_trigger_type(irq);
>  
>  	pdev_capture = devm_kzalloc(&pdev->dev, sizeof(*pdev_capture),
>  				    GFP_KERNEL);
>  	if (pdev_capture) {
>  		pdev_capture->name = "vpif_capture";
>  		pdev_capture->id = -1;
> -		pdev_capture->resource = res_irq;
> +		pdev_capture->resource = &res_irq;
>  		pdev_capture->num_resources = 1;
>  		pdev_capture->dev.dma_mask = pdev->dev.dma_mask;
>  		pdev_capture->dev.coherent_dma_mask = pdev->dev.coherent_dma_mask;
> @@ -480,7 +484,7 @@ static int vpif_probe(struct platform_device *pdev)
>  	if (pdev_display) {
>  		pdev_display->name = "vpif_display";
>  		pdev_display->id = -1;
> -		pdev_display->resource = res_irq;
> +		pdev_display->resource = &res_irq;
>  		pdev_display->num_resources = 1;
>  		pdev_display->dev.dma_mask = pdev->dev.dma_mask;
>  		pdev_display->dev.coherent_dma_mask = pdev->dev.coherent_dma_mask;
> diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c
> index 8fe55374c5a3..aaf8a0ec98ff 100644
> --- a/drivers/media/platform/davinci/vpif_capture.c
> +++ b/drivers/media/platform/davinci/vpif_capture.c
> @@ -1607,7 +1607,6 @@ static __init int vpif_probe(struct platform_device *pdev)
>  {
>  	struct vpif_subdev_info *subdevdata;
>  	struct i2c_adapter *i2c_adap;
> -	struct resource *res;
>  	int subdev_count;
>  	int res_idx = 0;
>  	int i, err;
> @@ -1632,15 +1631,22 @@ static __init int vpif_probe(struct platform_device *pdev)
>  		goto vpif_free;
>  	}
>  
> -	while ((res = platform_get_resource(pdev, IORESOURCE_IRQ, res_idx))) {
> -		err = devm_request_irq(&pdev->dev, res->start, vpif_channel_isr,
> -					IRQF_SHARED, VPIF_DRIVER_NAME,
> -					(void *)(&vpif_obj.dev[res_idx]->
> -					channel_id));
> -		if (err) {
> -			err = -EINVAL;
> +	while (1) {
> +		int irq;
> +
> +		err = platform_get_irq_optional(pdev, res_idx);
> +		if (err < 0 && err != -ENXIO)
> +			goto vpif_unregister;
> +		if (err > 0)
> +			irq = err;
> +		else
> +			break;
> +
> +		err = devm_request_irq(&pdev->dev, irq, vpif_channel_isr,
> +				       IRQF_SHARED, VPIF_DRIVER_NAME,
> +				       (void *)(&vpif_obj.dev[res_idx]->channel_id));
> +		if (err)
>  			goto vpif_unregister;
> -		}
>  		res_idx++;
>  	}
>  
> diff --git a/drivers/media/platform/davinci/vpif_display.c b/drivers/media/platform/davinci/vpif_display.c
> index 59f6b782e104..c4a0c4a4448c 100644
> --- a/drivers/media/platform/davinci/vpif_display.c
> +++ b/drivers/media/platform/davinci/vpif_display.c
> @@ -1221,7 +1221,6 @@ static __init int vpif_probe(struct platform_device *pdev)
>  {
>  	struct vpif_subdev_info *subdevdata;
>  	struct i2c_adapter *i2c_adap;
> -	struct resource *res;
>  	int subdev_count;
>  	int res_idx = 0;
>  	int i, err;
> @@ -1245,13 +1244,21 @@ static __init int vpif_probe(struct platform_device *pdev)
>  		goto vpif_free;
>  	}
>  
> -	while ((res = platform_get_resource(pdev, IORESOURCE_IRQ, res_idx))) {
> -		err = devm_request_irq(&pdev->dev, res->start, vpif_channel_isr,
> -					IRQF_SHARED, VPIF_DRIVER_NAME,
> -					(void *)(&vpif_obj.dev[res_idx]->
> -					channel_id));
> +	while (1) {
> +		int irq;
> +
> +		err = platform_get_irq_optional(pdev, res_idx);
> +		if (err < 0 && err != -ENXIO)
> +			goto vpif_unregister;
> +		if (err > 0)
> +			irq = err;
> +		else
> +			break;
> +
> +		err = devm_request_irq(&pdev->dev, irq, vpif_channel_isr,
> +				       IRQF_SHARED, VPIF_DRIVER_NAME,
> +				       (void *)(&vpif_obj.dev[res_idx]->channel_id));
>  		if (err) {
> -			err = -EINVAL;
>  			vpif_err("VPIF IRQ request failed\n");
>  			goto vpif_unregister;
>  		}


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH v2 06/13] media: davinci: vpif: Use platform_get_irq_optional() to get the interrupt
  2022-01-11 10:25   ` Hans Verkuil
@ 2022-01-11 10:43     ` Lad, Prabhakar
  2022-01-11 10:45       ` Hans Verkuil
  0 siblings, 1 reply; 36+ messages in thread
From: Lad, Prabhakar @ 2022-01-11 10:43 UTC (permalink / raw)
  To: Hans Verkuil
  Cc: Lad Prabhakar, linux-media, Mauro Carvalho Chehab, Rob Herring,
	Andy Shevchenko, LKML

Hi Hans,

On Tue, Jan 11, 2022 at 10:25 AM Hans Verkuil <hverkuil-cisco@xs4all.nl> wrote:
>
> Hi Prabhakar,
>
> On 11/01/2022 01:23, Lad Prabhakar wrote:
> > platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
> > allocation of IRQ resources in DT core code, this causes an issue
> > when using hierarchical interrupt domains using "interrupts" property
> > in the node as this bypasses the hierarchical setup and messes up the
> > irq chaining.
> >
> > In preparation for removal of static setup of IRQ resource from DT core
> > code use platform_get_irq_optional().
> >
> > While at it, propagate error code in case devm_request_irq() fails
> > instead of returning -EINVAL in vpif_display.c.
>
> Please note that this patch clashes with [1], for which I just posted a PR [2].
>
Ouch, I think I had a comment for patch#2 which needed to be addressed
(I was nitpicking anyway) so I was hoping this will go in first.

> So once [2] is merged you'll need to rebase this patch.
>
Ok, do you want me to just re-send this patch alone or the entire series?

Cheers,
Prabhakar

> Regards,
>
>         Hans
>
> [1] https://patchwork.linuxtv.org/project/linux-media/list/?series=7000
> [2] https://patchwork.linuxtv.org/project/linux-media/patch/63d723aa-b6a3-ff42-c3e4-f1fcb979be11@xs4all.nl/
>
> >
> > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> > ---
> > v1->v2
> > * Used DEFINE_RES_IRQ_NAMED() macro
> > * Considered IRQ0 as no IRQ.
> > ---
> >  drivers/media/platform/davinci/vpif.c         | 18 ++++++++------
> >  drivers/media/platform/davinci/vpif_capture.c | 24 ++++++++++++-------
> >  drivers/media/platform/davinci/vpif_display.c | 21 ++++++++++------
> >  3 files changed, 40 insertions(+), 23 deletions(-)
> >
> > diff --git a/drivers/media/platform/davinci/vpif.c b/drivers/media/platform/davinci/vpif.c
> > index 5a89d885d0e3..2dbb464399cc 100644
> > --- a/drivers/media/platform/davinci/vpif.c
> > +++ b/drivers/media/platform/davinci/vpif.c
> > @@ -20,8 +20,10 @@
> >  #include <linux/err.h>
> >  #include <linux/init.h>
> >  #include <linux/io.h>
> > +#include <linux/irq.h>
> >  #include <linux/kernel.h>
> >  #include <linux/module.h>
> > +#include <linux/of.h>
> >  #include <linux/platform_device.h>
> >  #include <linux/pm_runtime.h>
> >  #include <linux/spinlock.h>
> > @@ -425,9 +427,10 @@ EXPORT_SYMBOL(vpif_channel_getfid);
> >
> >  static int vpif_probe(struct platform_device *pdev)
> >  {
> > -     static struct resource *res_irq;
> > +     static struct resource res_irq;
> >       struct platform_device *pdev_capture, *pdev_display;
> >       struct device_node *endpoint = NULL;
> > +     int irq;
> >
> >       vpif_base = devm_platform_ioremap_resource(pdev, 0);
> >       if (IS_ERR(vpif_base))
> > @@ -453,19 +456,20 @@ static int vpif_probe(struct platform_device *pdev)
> >        * For DT platforms, manually create platform_devices for
> >        * capture/display drivers.
> >        */
> > -     res_irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
> > -     if (!res_irq) {
> > -             dev_warn(&pdev->dev, "Missing IRQ resource.\n");
> > +     irq = platform_get_irq(pdev, 0);
> > +     if (irq < 0) {
> >               pm_runtime_put(&pdev->dev);
> > -             return -EINVAL;
> > +             return irq;
> >       }
> > +     res_irq = (struct resource)DEFINE_RES_IRQ_NAMED(irq, of_node_full_name(pdev->dev.of_node));
> > +     res_irq.flags |= irq_get_trigger_type(irq);
> >
> >       pdev_capture = devm_kzalloc(&pdev->dev, sizeof(*pdev_capture),
> >                                   GFP_KERNEL);
> >       if (pdev_capture) {
> >               pdev_capture->name = "vpif_capture";
> >               pdev_capture->id = -1;
> > -             pdev_capture->resource = res_irq;
> > +             pdev_capture->resource = &res_irq;
> >               pdev_capture->num_resources = 1;
> >               pdev_capture->dev.dma_mask = pdev->dev.dma_mask;
> >               pdev_capture->dev.coherent_dma_mask = pdev->dev.coherent_dma_mask;
> > @@ -480,7 +484,7 @@ static int vpif_probe(struct platform_device *pdev)
> >       if (pdev_display) {
> >               pdev_display->name = "vpif_display";
> >               pdev_display->id = -1;
> > -             pdev_display->resource = res_irq;
> > +             pdev_display->resource = &res_irq;
> >               pdev_display->num_resources = 1;
> >               pdev_display->dev.dma_mask = pdev->dev.dma_mask;
> >               pdev_display->dev.coherent_dma_mask = pdev->dev.coherent_dma_mask;
> > diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c
> > index 8fe55374c5a3..aaf8a0ec98ff 100644
> > --- a/drivers/media/platform/davinci/vpif_capture.c
> > +++ b/drivers/media/platform/davinci/vpif_capture.c
> > @@ -1607,7 +1607,6 @@ static __init int vpif_probe(struct platform_device *pdev)
> >  {
> >       struct vpif_subdev_info *subdevdata;
> >       struct i2c_adapter *i2c_adap;
> > -     struct resource *res;
> >       int subdev_count;
> >       int res_idx = 0;
> >       int i, err;
> > @@ -1632,15 +1631,22 @@ static __init int vpif_probe(struct platform_device *pdev)
> >               goto vpif_free;
> >       }
> >
> > -     while ((res = platform_get_resource(pdev, IORESOURCE_IRQ, res_idx))) {
> > -             err = devm_request_irq(&pdev->dev, res->start, vpif_channel_isr,
> > -                                     IRQF_SHARED, VPIF_DRIVER_NAME,
> > -                                     (void *)(&vpif_obj.dev[res_idx]->
> > -                                     channel_id));
> > -             if (err) {
> > -                     err = -EINVAL;
> > +     while (1) {
> > +             int irq;
> > +
> > +             err = platform_get_irq_optional(pdev, res_idx);
> > +             if (err < 0 && err != -ENXIO)
> > +                     goto vpif_unregister;
> > +             if (err > 0)
> > +                     irq = err;
> > +             else
> > +                     break;
> > +
> > +             err = devm_request_irq(&pdev->dev, irq, vpif_channel_isr,
> > +                                    IRQF_SHARED, VPIF_DRIVER_NAME,
> > +                                    (void *)(&vpif_obj.dev[res_idx]->channel_id));
> > +             if (err)
> >                       goto vpif_unregister;
> > -             }
> >               res_idx++;
> >       }
> >
> > diff --git a/drivers/media/platform/davinci/vpif_display.c b/drivers/media/platform/davinci/vpif_display.c
> > index 59f6b782e104..c4a0c4a4448c 100644
> > --- a/drivers/media/platform/davinci/vpif_display.c
> > +++ b/drivers/media/platform/davinci/vpif_display.c
> > @@ -1221,7 +1221,6 @@ static __init int vpif_probe(struct platform_device *pdev)
> >  {
> >       struct vpif_subdev_info *subdevdata;
> >       struct i2c_adapter *i2c_adap;
> > -     struct resource *res;
> >       int subdev_count;
> >       int res_idx = 0;
> >       int i, err;
> > @@ -1245,13 +1244,21 @@ static __init int vpif_probe(struct platform_device *pdev)
> >               goto vpif_free;
> >       }
> >
> > -     while ((res = platform_get_resource(pdev, IORESOURCE_IRQ, res_idx))) {
> > -             err = devm_request_irq(&pdev->dev, res->start, vpif_channel_isr,
> > -                                     IRQF_SHARED, VPIF_DRIVER_NAME,
> > -                                     (void *)(&vpif_obj.dev[res_idx]->
> > -                                     channel_id));
> > +     while (1) {
> > +             int irq;
> > +
> > +             err = platform_get_irq_optional(pdev, res_idx);
> > +             if (err < 0 && err != -ENXIO)
> > +                     goto vpif_unregister;
> > +             if (err > 0)
> > +                     irq = err;
> > +             else
> > +                     break;
> > +
> > +             err = devm_request_irq(&pdev->dev, irq, vpif_channel_isr,
> > +                                    IRQF_SHARED, VPIF_DRIVER_NAME,
> > +                                    (void *)(&vpif_obj.dev[res_idx]->channel_id));
> >               if (err) {
> > -                     err = -EINVAL;
> >                       vpif_err("VPIF IRQ request failed\n");
> >                       goto vpif_unregister;
> >               }
>

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH v2 06/13] media: davinci: vpif: Use platform_get_irq_optional() to get the interrupt
  2022-01-11 10:43     ` Lad, Prabhakar
@ 2022-01-11 10:45       ` Hans Verkuil
  2022-01-11 19:30         ` Lad, Prabhakar
  0 siblings, 1 reply; 36+ messages in thread
From: Hans Verkuil @ 2022-01-11 10:45 UTC (permalink / raw)
  To: Lad, Prabhakar
  Cc: Lad Prabhakar, linux-media, Mauro Carvalho Chehab, Rob Herring,
	Andy Shevchenko, LKML

On 11/01/2022 11:43, Lad, Prabhakar wrote:
> Hi Hans,
> 
> On Tue, Jan 11, 2022 at 10:25 AM Hans Verkuil <hverkuil-cisco@xs4all.nl> wrote:
>>
>> Hi Prabhakar,
>>
>> On 11/01/2022 01:23, Lad Prabhakar wrote:
>>> platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
>>> allocation of IRQ resources in DT core code, this causes an issue
>>> when using hierarchical interrupt domains using "interrupts" property
>>> in the node as this bypasses the hierarchical setup and messes up the
>>> irq chaining.
>>>
>>> In preparation for removal of static setup of IRQ resource from DT core
>>> code use platform_get_irq_optional().
>>>
>>> While at it, propagate error code in case devm_request_irq() fails
>>> instead of returning -EINVAL in vpif_display.c.
>>
>> Please note that this patch clashes with [1], for which I just posted a PR [2].
>>
> Ouch, I think I had a comment for patch#2 which needed to be addressed
> (I was nitpicking anyway) so I was hoping this will go in first.

Patch 2 was fine since that change makes sense when looking at patch 3.

> 
>> So once [2] is merged you'll need to rebase this patch.
>>
> Ok, do you want me to just re-send this patch alone or the entire series?

Either works.

Regards,

	Hans

> 
> Cheers,
> Prabhakar
> 
>> Regards,
>>
>>         Hans
>>
>> [1] https://patchwork.linuxtv.org/project/linux-media/list/?series=7000
>> [2] https://patchwork.linuxtv.org/project/linux-media/patch/63d723aa-b6a3-ff42-c3e4-f1fcb979be11@xs4all.nl/
>>
>>>
>>> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
>>> ---
>>> v1->v2
>>> * Used DEFINE_RES_IRQ_NAMED() macro
>>> * Considered IRQ0 as no IRQ.
>>> ---
>>>  drivers/media/platform/davinci/vpif.c         | 18 ++++++++------
>>>  drivers/media/platform/davinci/vpif_capture.c | 24 ++++++++++++-------
>>>  drivers/media/platform/davinci/vpif_display.c | 21 ++++++++++------
>>>  3 files changed, 40 insertions(+), 23 deletions(-)
>>>
>>> diff --git a/drivers/media/platform/davinci/vpif.c b/drivers/media/platform/davinci/vpif.c
>>> index 5a89d885d0e3..2dbb464399cc 100644
>>> --- a/drivers/media/platform/davinci/vpif.c
>>> +++ b/drivers/media/platform/davinci/vpif.c
>>> @@ -20,8 +20,10 @@
>>>  #include <linux/err.h>
>>>  #include <linux/init.h>
>>>  #include <linux/io.h>
>>> +#include <linux/irq.h>
>>>  #include <linux/kernel.h>
>>>  #include <linux/module.h>
>>> +#include <linux/of.h>
>>>  #include <linux/platform_device.h>
>>>  #include <linux/pm_runtime.h>
>>>  #include <linux/spinlock.h>
>>> @@ -425,9 +427,10 @@ EXPORT_SYMBOL(vpif_channel_getfid);
>>>
>>>  static int vpif_probe(struct platform_device *pdev)
>>>  {
>>> -     static struct resource *res_irq;
>>> +     static struct resource res_irq;
>>>       struct platform_device *pdev_capture, *pdev_display;
>>>       struct device_node *endpoint = NULL;
>>> +     int irq;
>>>
>>>       vpif_base = devm_platform_ioremap_resource(pdev, 0);
>>>       if (IS_ERR(vpif_base))
>>> @@ -453,19 +456,20 @@ static int vpif_probe(struct platform_device *pdev)
>>>        * For DT platforms, manually create platform_devices for
>>>        * capture/display drivers.
>>>        */
>>> -     res_irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
>>> -     if (!res_irq) {
>>> -             dev_warn(&pdev->dev, "Missing IRQ resource.\n");
>>> +     irq = platform_get_irq(pdev, 0);
>>> +     if (irq < 0) {
>>>               pm_runtime_put(&pdev->dev);
>>> -             return -EINVAL;
>>> +             return irq;
>>>       }
>>> +     res_irq = (struct resource)DEFINE_RES_IRQ_NAMED(irq, of_node_full_name(pdev->dev.of_node));
>>> +     res_irq.flags |= irq_get_trigger_type(irq);
>>>
>>>       pdev_capture = devm_kzalloc(&pdev->dev, sizeof(*pdev_capture),
>>>                                   GFP_KERNEL);
>>>       if (pdev_capture) {
>>>               pdev_capture->name = "vpif_capture";
>>>               pdev_capture->id = -1;
>>> -             pdev_capture->resource = res_irq;
>>> +             pdev_capture->resource = &res_irq;
>>>               pdev_capture->num_resources = 1;
>>>               pdev_capture->dev.dma_mask = pdev->dev.dma_mask;
>>>               pdev_capture->dev.coherent_dma_mask = pdev->dev.coherent_dma_mask;
>>> @@ -480,7 +484,7 @@ static int vpif_probe(struct platform_device *pdev)
>>>       if (pdev_display) {
>>>               pdev_display->name = "vpif_display";
>>>               pdev_display->id = -1;
>>> -             pdev_display->resource = res_irq;
>>> +             pdev_display->resource = &res_irq;
>>>               pdev_display->num_resources = 1;
>>>               pdev_display->dev.dma_mask = pdev->dev.dma_mask;
>>>               pdev_display->dev.coherent_dma_mask = pdev->dev.coherent_dma_mask;
>>> diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c
>>> index 8fe55374c5a3..aaf8a0ec98ff 100644
>>> --- a/drivers/media/platform/davinci/vpif_capture.c
>>> +++ b/drivers/media/platform/davinci/vpif_capture.c
>>> @@ -1607,7 +1607,6 @@ static __init int vpif_probe(struct platform_device *pdev)
>>>  {
>>>       struct vpif_subdev_info *subdevdata;
>>>       struct i2c_adapter *i2c_adap;
>>> -     struct resource *res;
>>>       int subdev_count;
>>>       int res_idx = 0;
>>>       int i, err;
>>> @@ -1632,15 +1631,22 @@ static __init int vpif_probe(struct platform_device *pdev)
>>>               goto vpif_free;
>>>       }
>>>
>>> -     while ((res = platform_get_resource(pdev, IORESOURCE_IRQ, res_idx))) {
>>> -             err = devm_request_irq(&pdev->dev, res->start, vpif_channel_isr,
>>> -                                     IRQF_SHARED, VPIF_DRIVER_NAME,
>>> -                                     (void *)(&vpif_obj.dev[res_idx]->
>>> -                                     channel_id));
>>> -             if (err) {
>>> -                     err = -EINVAL;
>>> +     while (1) {
>>> +             int irq;
>>> +
>>> +             err = platform_get_irq_optional(pdev, res_idx);
>>> +             if (err < 0 && err != -ENXIO)
>>> +                     goto vpif_unregister;
>>> +             if (err > 0)
>>> +                     irq = err;
>>> +             else
>>> +                     break;
>>> +
>>> +             err = devm_request_irq(&pdev->dev, irq, vpif_channel_isr,
>>> +                                    IRQF_SHARED, VPIF_DRIVER_NAME,
>>> +                                    (void *)(&vpif_obj.dev[res_idx]->channel_id));
>>> +             if (err)
>>>                       goto vpif_unregister;
>>> -             }
>>>               res_idx++;
>>>       }
>>>
>>> diff --git a/drivers/media/platform/davinci/vpif_display.c b/drivers/media/platform/davinci/vpif_display.c
>>> index 59f6b782e104..c4a0c4a4448c 100644
>>> --- a/drivers/media/platform/davinci/vpif_display.c
>>> +++ b/drivers/media/platform/davinci/vpif_display.c
>>> @@ -1221,7 +1221,6 @@ static __init int vpif_probe(struct platform_device *pdev)
>>>  {
>>>       struct vpif_subdev_info *subdevdata;
>>>       struct i2c_adapter *i2c_adap;
>>> -     struct resource *res;
>>>       int subdev_count;
>>>       int res_idx = 0;
>>>       int i, err;
>>> @@ -1245,13 +1244,21 @@ static __init int vpif_probe(struct platform_device *pdev)
>>>               goto vpif_free;
>>>       }
>>>
>>> -     while ((res = platform_get_resource(pdev, IORESOURCE_IRQ, res_idx))) {
>>> -             err = devm_request_irq(&pdev->dev, res->start, vpif_channel_isr,
>>> -                                     IRQF_SHARED, VPIF_DRIVER_NAME,
>>> -                                     (void *)(&vpif_obj.dev[res_idx]->
>>> -                                     channel_id));
>>> +     while (1) {
>>> +             int irq;
>>> +
>>> +             err = platform_get_irq_optional(pdev, res_idx);
>>> +             if (err < 0 && err != -ENXIO)
>>> +                     goto vpif_unregister;
>>> +             if (err > 0)
>>> +                     irq = err;
>>> +             else
>>> +                     break;
>>> +
>>> +             err = devm_request_irq(&pdev->dev, irq, vpif_channel_isr,
>>> +                                    IRQF_SHARED, VPIF_DRIVER_NAME,
>>> +                                    (void *)(&vpif_obj.dev[res_idx]->channel_id));
>>>               if (err) {
>>> -                     err = -EINVAL;
>>>                       vpif_err("VPIF IRQ request failed\n");
>>>                       goto vpif_unregister;
>>>               }
>>


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH v2 11/13] media: s5p-g2d: Use platform_get_irq() to get the interrupt
       [not found]   ` <CGME20220111144930eucas1p1d538f02d731983b1cd1b56472163eda4@eucas1p1.samsung.com>
@ 2022-01-11 14:49       ` Lukasz Stelmach
  0 siblings, 0 replies; 36+ messages in thread
From: Lukasz Stelmach @ 2022-01-11 14:49 UTC (permalink / raw)
  To: Lad Prabhakar
  Cc: linux-media, Mauro Carvalho Chehab, Hans Verkuil, Rob Herring,
	Andy Shevchenko, Prabhakar, linux-arm-kernel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1783 bytes --]

It was <2022-01-11 wto 00:23>, when Lad Prabhakar wrote:
> platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
> allocation of IRQ resources in DT core code, this causes an issue
> when using hierarchical interrupt domains using "interrupts" property
> in the node as this bypasses the hierarchical setup and messes up the
> irq chaining.
>
> In preparation for removal of static setup of IRQ resource from DT core
> code use platform_get_irq().
>
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> ---
> v1->v2
> * No change.
> ---
>  drivers/media/platform/s5p-g2d/g2d.c | 10 +++-------
>  1 file changed, 3 insertions(+), 7 deletions(-)
>

Acked-by: Łukasz Stelmach <l.stelmach@samsung.com>

> diff --git a/drivers/media/platform/s5p-g2d/g2d.c b/drivers/media/platform/s5p-g2d/g2d.c
> index fa0bb31bd2b9..dd8864779a7c 100644
> --- a/drivers/media/platform/s5p-g2d/g2d.c
> +++ b/drivers/media/platform/s5p-g2d/g2d.c
> @@ -623,7 +623,6 @@ static int g2d_probe(struct platform_device *pdev)
>  {
>  	struct g2d_dev *dev;
>  	struct video_device *vfd;
> -	struct resource *res;
>  	const struct of_device_id *of_id;
>  	int ret = 0;
>  
> @@ -664,14 +663,11 @@ static int g2d_probe(struct platform_device *pdev)
>  		goto put_clk_gate;
>  	}
>  
> -	res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
> -	if (!res) {
> -		dev_err(&pdev->dev, "failed to find IRQ\n");
> -		ret = -ENXIO;
> +	ret = platform_get_irq(pdev, 0);
> +	if (ret < 0)
>  		goto unprep_clk_gate;
> -	}
>  
> -	dev->irq = res->start;
> +	dev->irq = ret;
>  
>  	ret = devm_request_irq(&pdev->dev, dev->irq, g2d_isr,
>  						0, pdev->name, dev);

-- 
Łukasz Stelmach
Samsung R&D Institute Poland
Samsung Electronics

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH v2 11/13] media: s5p-g2d: Use platform_get_irq() to get the interrupt
@ 2022-01-11 14:49       ` Lukasz Stelmach
  0 siblings, 0 replies; 36+ messages in thread
From: Lukasz Stelmach @ 2022-01-11 14:49 UTC (permalink / raw)
  To: Lad Prabhakar
  Cc: linux-media, Mauro Carvalho Chehab, Hans Verkuil, Rob Herring,
	Andy Shevchenko, Prabhakar, linux-arm-kernel, linux-kernel


[-- Attachment #1.1: Type: text/plain, Size: 1783 bytes --]

It was <2022-01-11 wto 00:23>, when Lad Prabhakar wrote:
> platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
> allocation of IRQ resources in DT core code, this causes an issue
> when using hierarchical interrupt domains using "interrupts" property
> in the node as this bypasses the hierarchical setup and messes up the
> irq chaining.
>
> In preparation for removal of static setup of IRQ resource from DT core
> code use platform_get_irq().
>
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> ---
> v1->v2
> * No change.
> ---
>  drivers/media/platform/s5p-g2d/g2d.c | 10 +++-------
>  1 file changed, 3 insertions(+), 7 deletions(-)
>

Acked-by: Łukasz Stelmach <l.stelmach@samsung.com>

> diff --git a/drivers/media/platform/s5p-g2d/g2d.c b/drivers/media/platform/s5p-g2d/g2d.c
> index fa0bb31bd2b9..dd8864779a7c 100644
> --- a/drivers/media/platform/s5p-g2d/g2d.c
> +++ b/drivers/media/platform/s5p-g2d/g2d.c
> @@ -623,7 +623,6 @@ static int g2d_probe(struct platform_device *pdev)
>  {
>  	struct g2d_dev *dev;
>  	struct video_device *vfd;
> -	struct resource *res;
>  	const struct of_device_id *of_id;
>  	int ret = 0;
>  
> @@ -664,14 +663,11 @@ static int g2d_probe(struct platform_device *pdev)
>  		goto put_clk_gate;
>  	}
>  
> -	res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
> -	if (!res) {
> -		dev_err(&pdev->dev, "failed to find IRQ\n");
> -		ret = -ENXIO;
> +	ret = platform_get_irq(pdev, 0);
> +	if (ret < 0)
>  		goto unprep_clk_gate;
> -	}
>  
> -	dev->irq = res->start;
> +	dev->irq = ret;
>  
>  	ret = devm_request_irq(&pdev->dev, dev->irq, g2d_isr,
>  						0, pdev->name, dev);

-- 
Łukasz Stelmach
Samsung R&D Institute Poland
Samsung Electronics

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH v2 06/13] media: davinci: vpif: Use platform_get_irq_optional() to get the interrupt
  2022-01-11 10:45       ` Hans Verkuil
@ 2022-01-11 19:30         ` Lad, Prabhakar
  0 siblings, 0 replies; 36+ messages in thread
From: Lad, Prabhakar @ 2022-01-11 19:30 UTC (permalink / raw)
  To: Hans Verkuil
  Cc: Lad Prabhakar, linux-media, Mauro Carvalho Chehab, Rob Herring,
	Andy Shevchenko, LKML

Hi Hans,

On Tue, Jan 11, 2022 at 10:45 AM Hans Verkuil <hverkuil-cisco@xs4all.nl> wrote:
>
> On 11/01/2022 11:43, Lad, Prabhakar wrote:
> > Hi Hans,
> >
> > On Tue, Jan 11, 2022 at 10:25 AM Hans Verkuil <hverkuil-cisco@xs4all.nl> wrote:
> >>
> >> Hi Prabhakar,
> >>
> >> On 11/01/2022 01:23, Lad Prabhakar wrote:
> >>> platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
> >>> allocation of IRQ resources in DT core code, this causes an issue
> >>> when using hierarchical interrupt domains using "interrupts" property
> >>> in the node as this bypasses the hierarchical setup and messes up the
> >>> irq chaining.
> >>>
> >>> In preparation for removal of static setup of IRQ resource from DT core
> >>> code use platform_get_irq_optional().
> >>>
> >>> While at it, propagate error code in case devm_request_irq() fails
> >>> instead of returning -EINVAL in vpif_display.c.
> >>
> >> Please note that this patch clashes with [1], for which I just posted a PR [2].
> >>
> > Ouch, I think I had a comment for patch#2 which needed to be addressed
> > (I was nitpicking anyway) so I was hoping this will go in first.
>
> Patch 2 was fine since that change makes sense when looking at patch 3.
>
Agreed.

> >
> >> So once [2] is merged you'll need to rebase this patch.
> >>
> > Ok, do you want me to just re-send this patch alone or the entire series?
>
> Either works.
>
Will just send this  alone patch as v3.

Cheers,
Prabhakar

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH v2 09/13] media: mtk-vcodec: Drop unnecessary call to platform_get_resource()
  2022-01-11  0:23   ` Lad Prabhakar
  (?)
@ 2022-01-13 13:05     ` Hans Verkuil
  -1 siblings, 0 replies; 36+ messages in thread
From: Hans Verkuil @ 2022-01-13 13:05 UTC (permalink / raw)
  To: Lad Prabhakar, linux-media, Mauro Carvalho Chehab, Tiffany Lin,
	Andrew-CT Chen, Matthias Brugger
  Cc: Rob Herring, Andy Shevchenko, Prabhakar, linux-arm-kernel,
	linux-mediatek, linux-kernel

Hi Prabhakar,

I'm skipping this patch since if I am not mistaken this patch fixes this as well
(as part of a larger overhaul):

https://patchwork.linuxtv.org/project/linux-media/patch/20220113041055.25213-9-yunfei.dong@mediatek.com/

I posted a PR for that series, so that's on the way in.

Please confirm so I can mark your patch as Superseded.

Regards,

	Hans

On 11/01/2022 01:23, Lad Prabhakar wrote:
> mtk_vcodec_probe() calls platform_get_resource(pdev, IORESOURCE_IRQ, ..)
> to check if IRQ resource exists and later calls platform_get_irq(pdev, ..)
> to get the actual IRQ.
> 
> This patch drops an unnecessary call to platform_get_resource() and
> checks the return value of platform_get_irq(pdev, ..) to check if the
> IRQ line is valid.
> 
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> ---
> v1->v2
> * No change.
> ---
>  .../media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c    | 11 ++++-------
>  .../media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c    | 10 +++-------
>  2 files changed, 7 insertions(+), 14 deletions(-)
> 
> diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c
> index 40c39e1e596b..1509c2a4de84 100644
> --- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c
> +++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c
> @@ -200,7 +200,6 @@ static int mtk_vcodec_probe(struct platform_device *pdev)
>  {
>  	struct mtk_vcodec_dev *dev;
>  	struct video_device *vfd_dec;
> -	struct resource *res;
>  	phandle rproc_phandle;
>  	enum mtk_vcodec_fw_type fw_type;
>  	int i, ret;
> @@ -244,14 +243,12 @@ static int mtk_vcodec_probe(struct platform_device *pdev)
>  		mtk_v4l2_debug(2, "reg[%d] base=%p", i, dev->reg_base[i]);
>  	}
>  
> -	res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
> -	if (res == NULL) {
> -		dev_err(&pdev->dev, "failed to get irq resource");
> -		ret = -ENOENT;
> +	ret = platform_get_irq(pdev, 0);
> +	if (ret < 0)
>  		goto err_res;
> -	}
>  
> -	dev->dec_irq = platform_get_irq(pdev, 0);
> +	dev->dec_irq = ret;
> +
>  	irq_set_status_flags(dev->dec_irq, IRQ_NOAUTOEN);
>  	ret = devm_request_irq(&pdev->dev, dev->dec_irq,
>  			mtk_vcodec_dec_irq_handler, 0, pdev->name, dev);
> diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c b/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c
> index aeaecb8d416e..86e70d826754 100644
> --- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c
> +++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c
> @@ -236,7 +236,6 @@ static int mtk_vcodec_probe(struct platform_device *pdev)
>  {
>  	struct mtk_vcodec_dev *dev;
>  	struct video_device *vfd_enc;
> -	struct resource *res;
>  	phandle rproc_phandle;
>  	enum mtk_vcodec_fw_type fw_type;
>  	int ret;
> @@ -280,14 +279,11 @@ static int mtk_vcodec_probe(struct platform_device *pdev)
>  		goto err_res;
>  	}
>  
> -	res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
> -	if (res == NULL) {
> -		dev_err(&pdev->dev, "failed to get irq resource");
> -		ret = -ENOENT;
> +	ret = platform_get_irq(pdev, 0);
> +	if (ret < 0)
>  		goto err_res;
> -	}
>  
> -	dev->enc_irq = platform_get_irq(pdev, 0);
> +	dev->enc_irq = ret;
>  	irq_set_status_flags(dev->enc_irq, IRQ_NOAUTOEN);
>  	ret = devm_request_irq(&pdev->dev, dev->enc_irq,
>  			       mtk_vcodec_enc_irq_handler,


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH v2 09/13] media: mtk-vcodec: Drop unnecessary call to platform_get_resource()
@ 2022-01-13 13:05     ` Hans Verkuil
  0 siblings, 0 replies; 36+ messages in thread
From: Hans Verkuil @ 2022-01-13 13:05 UTC (permalink / raw)
  To: Lad Prabhakar, linux-media, Mauro Carvalho Chehab, Tiffany Lin,
	Andrew-CT Chen, Matthias Brugger
  Cc: Rob Herring, Andy Shevchenko, Prabhakar, linux-arm-kernel,
	linux-mediatek, linux-kernel

Hi Prabhakar,

I'm skipping this patch since if I am not mistaken this patch fixes this as well
(as part of a larger overhaul):

https://patchwork.linuxtv.org/project/linux-media/patch/20220113041055.25213-9-yunfei.dong@mediatek.com/

I posted a PR for that series, so that's on the way in.

Please confirm so I can mark your patch as Superseded.

Regards,

	Hans

On 11/01/2022 01:23, Lad Prabhakar wrote:
> mtk_vcodec_probe() calls platform_get_resource(pdev, IORESOURCE_IRQ, ..)
> to check if IRQ resource exists and later calls platform_get_irq(pdev, ..)
> to get the actual IRQ.
> 
> This patch drops an unnecessary call to platform_get_resource() and
> checks the return value of platform_get_irq(pdev, ..) to check if the
> IRQ line is valid.
> 
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> ---
> v1->v2
> * No change.
> ---
>  .../media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c    | 11 ++++-------
>  .../media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c    | 10 +++-------
>  2 files changed, 7 insertions(+), 14 deletions(-)
> 
> diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c
> index 40c39e1e596b..1509c2a4de84 100644
> --- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c
> +++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c
> @@ -200,7 +200,6 @@ static int mtk_vcodec_probe(struct platform_device *pdev)
>  {
>  	struct mtk_vcodec_dev *dev;
>  	struct video_device *vfd_dec;
> -	struct resource *res;
>  	phandle rproc_phandle;
>  	enum mtk_vcodec_fw_type fw_type;
>  	int i, ret;
> @@ -244,14 +243,12 @@ static int mtk_vcodec_probe(struct platform_device *pdev)
>  		mtk_v4l2_debug(2, "reg[%d] base=%p", i, dev->reg_base[i]);
>  	}
>  
> -	res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
> -	if (res == NULL) {
> -		dev_err(&pdev->dev, "failed to get irq resource");
> -		ret = -ENOENT;
> +	ret = platform_get_irq(pdev, 0);
> +	if (ret < 0)
>  		goto err_res;
> -	}
>  
> -	dev->dec_irq = platform_get_irq(pdev, 0);
> +	dev->dec_irq = ret;
> +
>  	irq_set_status_flags(dev->dec_irq, IRQ_NOAUTOEN);
>  	ret = devm_request_irq(&pdev->dev, dev->dec_irq,
>  			mtk_vcodec_dec_irq_handler, 0, pdev->name, dev);
> diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c b/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c
> index aeaecb8d416e..86e70d826754 100644
> --- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c
> +++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c
> @@ -236,7 +236,6 @@ static int mtk_vcodec_probe(struct platform_device *pdev)
>  {
>  	struct mtk_vcodec_dev *dev;
>  	struct video_device *vfd_enc;
> -	struct resource *res;
>  	phandle rproc_phandle;
>  	enum mtk_vcodec_fw_type fw_type;
>  	int ret;
> @@ -280,14 +279,11 @@ static int mtk_vcodec_probe(struct platform_device *pdev)
>  		goto err_res;
>  	}
>  
> -	res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
> -	if (res == NULL) {
> -		dev_err(&pdev->dev, "failed to get irq resource");
> -		ret = -ENOENT;
> +	ret = platform_get_irq(pdev, 0);
> +	if (ret < 0)
>  		goto err_res;
> -	}
>  
> -	dev->enc_irq = platform_get_irq(pdev, 0);
> +	dev->enc_irq = ret;
>  	irq_set_status_flags(dev->enc_irq, IRQ_NOAUTOEN);
>  	ret = devm_request_irq(&pdev->dev, dev->enc_irq,
>  			       mtk_vcodec_enc_irq_handler,


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH v2 09/13] media: mtk-vcodec: Drop unnecessary call to platform_get_resource()
@ 2022-01-13 13:05     ` Hans Verkuil
  0 siblings, 0 replies; 36+ messages in thread
From: Hans Verkuil @ 2022-01-13 13:05 UTC (permalink / raw)
  To: Lad Prabhakar, linux-media, Mauro Carvalho Chehab, Tiffany Lin,
	Andrew-CT Chen, Matthias Brugger
  Cc: Rob Herring, Andy Shevchenko, Prabhakar, linux-arm-kernel,
	linux-mediatek, linux-kernel

Hi Prabhakar,

I'm skipping this patch since if I am not mistaken this patch fixes this as well
(as part of a larger overhaul):

https://patchwork.linuxtv.org/project/linux-media/patch/20220113041055.25213-9-yunfei.dong@mediatek.com/

I posted a PR for that series, so that's on the way in.

Please confirm so I can mark your patch as Superseded.

Regards,

	Hans

On 11/01/2022 01:23, Lad Prabhakar wrote:
> mtk_vcodec_probe() calls platform_get_resource(pdev, IORESOURCE_IRQ, ..)
> to check if IRQ resource exists and later calls platform_get_irq(pdev, ..)
> to get the actual IRQ.
> 
> This patch drops an unnecessary call to platform_get_resource() and
> checks the return value of platform_get_irq(pdev, ..) to check if the
> IRQ line is valid.
> 
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> ---
> v1->v2
> * No change.
> ---
>  .../media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c    | 11 ++++-------
>  .../media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c    | 10 +++-------
>  2 files changed, 7 insertions(+), 14 deletions(-)
> 
> diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c
> index 40c39e1e596b..1509c2a4de84 100644
> --- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c
> +++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c
> @@ -200,7 +200,6 @@ static int mtk_vcodec_probe(struct platform_device *pdev)
>  {
>  	struct mtk_vcodec_dev *dev;
>  	struct video_device *vfd_dec;
> -	struct resource *res;
>  	phandle rproc_phandle;
>  	enum mtk_vcodec_fw_type fw_type;
>  	int i, ret;
> @@ -244,14 +243,12 @@ static int mtk_vcodec_probe(struct platform_device *pdev)
>  		mtk_v4l2_debug(2, "reg[%d] base=%p", i, dev->reg_base[i]);
>  	}
>  
> -	res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
> -	if (res == NULL) {
> -		dev_err(&pdev->dev, "failed to get irq resource");
> -		ret = -ENOENT;
> +	ret = platform_get_irq(pdev, 0);
> +	if (ret < 0)
>  		goto err_res;
> -	}
>  
> -	dev->dec_irq = platform_get_irq(pdev, 0);
> +	dev->dec_irq = ret;
> +
>  	irq_set_status_flags(dev->dec_irq, IRQ_NOAUTOEN);
>  	ret = devm_request_irq(&pdev->dev, dev->dec_irq,
>  			mtk_vcodec_dec_irq_handler, 0, pdev->name, dev);
> diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c b/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c
> index aeaecb8d416e..86e70d826754 100644
> --- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c
> +++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c
> @@ -236,7 +236,6 @@ static int mtk_vcodec_probe(struct platform_device *pdev)
>  {
>  	struct mtk_vcodec_dev *dev;
>  	struct video_device *vfd_enc;
> -	struct resource *res;
>  	phandle rproc_phandle;
>  	enum mtk_vcodec_fw_type fw_type;
>  	int ret;
> @@ -280,14 +279,11 @@ static int mtk_vcodec_probe(struct platform_device *pdev)
>  		goto err_res;
>  	}
>  
> -	res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
> -	if (res == NULL) {
> -		dev_err(&pdev->dev, "failed to get irq resource");
> -		ret = -ENOENT;
> +	ret = platform_get_irq(pdev, 0);
> +	if (ret < 0)
>  		goto err_res;
> -	}
>  
> -	dev->enc_irq = platform_get_irq(pdev, 0);
> +	dev->enc_irq = ret;
>  	irq_set_status_flags(dev->enc_irq, IRQ_NOAUTOEN);
>  	ret = devm_request_irq(&pdev->dev, dev->enc_irq,
>  			       mtk_vcodec_enc_irq_handler,


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH v2 09/13] media: mtk-vcodec: Drop unnecessary call to platform_get_resource()
  2022-01-13 13:05     ` Hans Verkuil
  (?)
@ 2022-01-13 13:12       ` Lad, Prabhakar
  -1 siblings, 0 replies; 36+ messages in thread
From: Lad, Prabhakar @ 2022-01-13 13:12 UTC (permalink / raw)
  To: Hans Verkuil
  Cc: Lad Prabhakar, linux-media, Mauro Carvalho Chehab, Tiffany Lin,
	Andrew-CT Chen, Matthias Brugger, Rob Herring, Andy Shevchenko,
	LAK, moderated list:ARM/Mediatek SoC support, LKML

Hi Hans,

On Thu, Jan 13, 2022 at 1:05 PM Hans Verkuil <hverkuil-cisco@xs4all.nl> wrote:
>
> Hi Prabhakar,
>
> I'm skipping this patch since if I am not mistaken this patch fixes this as well
> (as part of a larger overhaul):
>
> https://patchwork.linuxtv.org/project/linux-media/patch/20220113041055.25213-9-yunfei.dong@mediatek.com/
>
> I posted a PR for that series, so that's on the way in.
>
> Please confirm so I can mark your patch as Superseded.
>
Ack.

Cheers,
Prabhakar

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH v2 09/13] media: mtk-vcodec: Drop unnecessary call to platform_get_resource()
@ 2022-01-13 13:12       ` Lad, Prabhakar
  0 siblings, 0 replies; 36+ messages in thread
From: Lad, Prabhakar @ 2022-01-13 13:12 UTC (permalink / raw)
  To: Hans Verkuil
  Cc: Lad Prabhakar, linux-media, Mauro Carvalho Chehab, Tiffany Lin,
	Andrew-CT Chen, Matthias Brugger, Rob Herring, Andy Shevchenko,
	LAK, moderated list:ARM/Mediatek SoC support, LKML

Hi Hans,

On Thu, Jan 13, 2022 at 1:05 PM Hans Verkuil <hverkuil-cisco@xs4all.nl> wrote:
>
> Hi Prabhakar,
>
> I'm skipping this patch since if I am not mistaken this patch fixes this as well
> (as part of a larger overhaul):
>
> https://patchwork.linuxtv.org/project/linux-media/patch/20220113041055.25213-9-yunfei.dong@mediatek.com/
>
> I posted a PR for that series, so that's on the way in.
>
> Please confirm so I can mark your patch as Superseded.
>
Ack.

Cheers,
Prabhakar

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH v2 09/13] media: mtk-vcodec: Drop unnecessary call to platform_get_resource()
@ 2022-01-13 13:12       ` Lad, Prabhakar
  0 siblings, 0 replies; 36+ messages in thread
From: Lad, Prabhakar @ 2022-01-13 13:12 UTC (permalink / raw)
  To: Hans Verkuil
  Cc: Lad Prabhakar, linux-media, Mauro Carvalho Chehab, Tiffany Lin,
	Andrew-CT Chen, Matthias Brugger, Rob Herring, Andy Shevchenko,
	LAK, moderated list:ARM/Mediatek SoC support, LKML

Hi Hans,

On Thu, Jan 13, 2022 at 1:05 PM Hans Verkuil <hverkuil-cisco@xs4all.nl> wrote:
>
> Hi Prabhakar,
>
> I'm skipping this patch since if I am not mistaken this patch fixes this as well
> (as part of a larger overhaul):
>
> https://patchwork.linuxtv.org/project/linux-media/patch/20220113041055.25213-9-yunfei.dong@mediatek.com/
>
> I posted a PR for that series, so that's on the way in.
>
> Please confirm so I can mark your patch as Superseded.
>
Ack.

Cheers,
Prabhakar

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2022-01-13 13:14 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-11  0:23 [PATCH v2 00/13] media: Use platform_get_irq*() variants to fetch IRQ's Lad Prabhakar
2022-01-11  0:23 ` [PATCH v2 01/13] media: vsp1: Use platform_get_irq() to get the interrupt Lad Prabhakar
2022-01-11  0:23 ` [PATCH v2 02/13] media: camss: Use platform_get_irq_byname() " Lad Prabhakar
2022-01-11  0:23 ` [PATCH v2 03/13] media: bdisp: Use platform_get_irq() " Lad Prabhakar
2022-01-11  0:23 ` [PATCH v2 04/13] media: s5p-mfc: " Lad Prabhakar
2022-01-11  0:23   ` Lad Prabhakar
2022-01-11  0:23 ` [PATCH v2 05/13] media: stm32-dma2d: " Lad Prabhakar
2022-01-11  0:23   ` Lad Prabhakar
2022-01-11  0:23 ` [PATCH v2 06/13] media: davinci: vpif: Use platform_get_irq_optional() " Lad Prabhakar
2022-01-11 10:25   ` Hans Verkuil
2022-01-11 10:43     ` Lad, Prabhakar
2022-01-11 10:45       ` Hans Verkuil
2022-01-11 19:30         ` Lad, Prabhakar
2022-01-11  0:23 ` [PATCH v2 07/13] media: exynos-gsc: Use platform_get_irq() " Lad Prabhakar
2022-01-11  0:23   ` Lad Prabhakar
2022-01-11  0:23 ` [PATCH v2 08/13] media: marvell-ccic: " Lad Prabhakar
2022-01-11  0:23 ` [PATCH v2 09/13] media: mtk-vcodec: Drop unnecessary call to platform_get_resource() Lad Prabhakar
2022-01-11  0:23   ` Lad Prabhakar
2022-01-11  0:23   ` Lad Prabhakar
2022-01-13 13:05   ` Hans Verkuil
2022-01-13 13:05     ` Hans Verkuil
2022-01-13 13:05     ` Hans Verkuil
2022-01-13 13:12     ` Lad, Prabhakar
2022-01-13 13:12       ` Lad, Prabhakar
2022-01-13 13:12       ` Lad, Prabhakar
2022-01-11  0:23 ` [PATCH v2 10/13] media: exynos4-is: Use platform_get_irq() to get the interrupt Lad Prabhakar
2022-01-11  0:23   ` Lad Prabhakar
2022-01-11  0:23 ` [PATCH v2 11/13] media: s5p-g2d: " Lad Prabhakar
2022-01-11  0:23   ` Lad Prabhakar
     [not found]   ` <CGME20220111144930eucas1p1d538f02d731983b1cd1b56472163eda4@eucas1p1.samsung.com>
2022-01-11 14:49     ` Lukasz Stelmach
2022-01-11 14:49       ` Lukasz Stelmach
2022-01-11  0:23 ` [PATCH v2 12/13] media: mtk-vpu: Drop unnecessary call to platform_get_resource() Lad Prabhakar
2022-01-11  0:23   ` Lad Prabhakar
2022-01-11  0:23   ` Lad Prabhakar
2022-01-11  0:23 ` [PATCH v2 13/13] media: coda: Use platform_get_irq() to get the interrupt Lad Prabhakar
2022-01-11  0:23   ` Lad Prabhakar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.