All of lore.kernel.org
 help / color / mirror / Atom feed
From: Inki Dae <inki.dae@samsung.com>
To: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>,
	Joonyoung Shim <jy0922.shim@samsung.com>,
	Seung-Woo Kim <sw0312.kim@samsung.com>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
	Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>,
	dri-devel@lists.freedesktop.org,
	linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org
Cc: Rob Herring <robh+dt@kernel.org>,
	linux-kernel@vger.kernel.org,
	Prabhakar <prabhakar.csengg@gmail.com>
Subject: Re: [PATCH 2/5] drm/exynos: mixer: Use platform_get_irq() to get the interrupt
Date: Fri, 14 Jan 2022 20:20:05 +0900	[thread overview]
Message-ID: <a95b74fd-7118-b0fe-26b9-4665c719f1a0@samsung.com> (raw)
In-Reply-To: <20211222190134.24866-3-prabhakar.mahadev-lad.rj@bp.renesas.com>

Hi Lad Prabhakar,

21. 12. 23. 오전 4:01에 Lad Prabhakar 이(가) 쓴 글:
> 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 bypassed the hierarchical setup and messed 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>
> ---
> Hi,
> 
> Ideally I would expect the mixer_resources_init() to be called from probe
> instead from the bind callback. If platform_get_irq() returns -EPROBE_DEFER
> the bind callback will fail :(

If the bind callback failed then probe function of exynos drm driver will call -EPROBE_DEFER like below so it must be no problem :),
--------------------------------------------
in exynos_drm_platform_probe function
    component_master_add_with_match()

in component_master_add_with_match function
    try_to_bring_up_master()

Thanks,
Inki Dae

> 
> Cheers,
> Prabhakar
> ---
>  drivers/gpu/drm/exynos/exynos_mixer.c | 14 ++++++--------
>  1 file changed, 6 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c
> index 41c54f1f60bc..e5204be86093 100644
> --- a/drivers/gpu/drm/exynos/exynos_mixer.c
> +++ b/drivers/gpu/drm/exynos/exynos_mixer.c
> @@ -809,19 +809,17 @@ static int mixer_resources_init(struct mixer_context *mixer_ctx)
>  		return -ENXIO;
>  	}
>  
> -	res = platform_get_resource(mixer_ctx->pdev, IORESOURCE_IRQ, 0);
> -	if (res == NULL) {
> -		dev_err(dev, "get interrupt resource failed.\n");
> -		return -ENXIO;
> -	}
> +	ret = platform_get_irq(mixer_ctx->pdev, 0);
> +	if (ret < 0)
> +		return ret;
> +	mixer_ctx->irq = ret;
>  
> -	ret = devm_request_irq(dev, res->start, mixer_irq_handler,
> -						0, "drm_mixer", mixer_ctx);
> +	ret = devm_request_irq(dev, mixer_ctx->irq, mixer_irq_handler,
> +			       0, "drm_mixer", mixer_ctx);
>  	if (ret) {
>  		dev_err(dev, "request interrupt failed.\n");
>  		return ret;
>  	}
> -	mixer_ctx->irq = res->start;
>  
>  	return 0;
>  }
> 

WARNING: multiple messages have this Message-ID (diff)
From: Inki Dae <inki.dae@samsung.com>
To: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>,
	Joonyoung Shim <jy0922.shim@samsung.com>,
	Seung-Woo Kim <sw0312.kim@samsung.com>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
	Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>,
	dri-devel@lists.freedesktop.org,
	linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org
Cc: Prabhakar <prabhakar.csengg@gmail.com>,
	Rob Herring <robh+dt@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/5] drm/exynos: mixer: Use platform_get_irq() to get the interrupt
Date: Fri, 14 Jan 2022 20:20:05 +0900	[thread overview]
Message-ID: <a95b74fd-7118-b0fe-26b9-4665c719f1a0@samsung.com> (raw)
In-Reply-To: <20211222190134.24866-3-prabhakar.mahadev-lad.rj@bp.renesas.com>

Hi Lad Prabhakar,

21. 12. 23. 오전 4:01에 Lad Prabhakar 이(가) 쓴 글:
> 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 bypassed the hierarchical setup and messed 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>
> ---
> Hi,
> 
> Ideally I would expect the mixer_resources_init() to be called from probe
> instead from the bind callback. If platform_get_irq() returns -EPROBE_DEFER
> the bind callback will fail :(

If the bind callback failed then probe function of exynos drm driver will call -EPROBE_DEFER like below so it must be no problem :),
--------------------------------------------
in exynos_drm_platform_probe function
    component_master_add_with_match()

in component_master_add_with_match function
    try_to_bring_up_master()

Thanks,
Inki Dae

> 
> Cheers,
> Prabhakar
> ---
>  drivers/gpu/drm/exynos/exynos_mixer.c | 14 ++++++--------
>  1 file changed, 6 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c
> index 41c54f1f60bc..e5204be86093 100644
> --- a/drivers/gpu/drm/exynos/exynos_mixer.c
> +++ b/drivers/gpu/drm/exynos/exynos_mixer.c
> @@ -809,19 +809,17 @@ static int mixer_resources_init(struct mixer_context *mixer_ctx)
>  		return -ENXIO;
>  	}
>  
> -	res = platform_get_resource(mixer_ctx->pdev, IORESOURCE_IRQ, 0);
> -	if (res == NULL) {
> -		dev_err(dev, "get interrupt resource failed.\n");
> -		return -ENXIO;
> -	}
> +	ret = platform_get_irq(mixer_ctx->pdev, 0);
> +	if (ret < 0)
> +		return ret;
> +	mixer_ctx->irq = ret;
>  
> -	ret = devm_request_irq(dev, res->start, mixer_irq_handler,
> -						0, "drm_mixer", mixer_ctx);
> +	ret = devm_request_irq(dev, mixer_ctx->irq, mixer_irq_handler,
> +			       0, "drm_mixer", mixer_ctx);
>  	if (ret) {
>  		dev_err(dev, "request interrupt failed.\n");
>  		return ret;
>  	}
> -	mixer_ctx->irq = res->start;
>  
>  	return 0;
>  }
> 

WARNING: multiple messages have this Message-ID (diff)
From: Inki Dae <inki.dae@samsung.com>
To: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>,
	Joonyoung Shim <jy0922.shim@samsung.com>,
	Seung-Woo Kim <sw0312.kim@samsung.com>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
	Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>,
	dri-devel@lists.freedesktop.org,
	linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org
Cc: Rob Herring <robh+dt@kernel.org>,
	linux-kernel@vger.kernel.org,
	Prabhakar <prabhakar.csengg@gmail.com>
Subject: Re: [PATCH 2/5] drm/exynos: mixer: Use platform_get_irq() to get the interrupt
Date: Fri, 14 Jan 2022 20:20:05 +0900	[thread overview]
Message-ID: <a95b74fd-7118-b0fe-26b9-4665c719f1a0@samsung.com> (raw)
In-Reply-To: <20211222190134.24866-3-prabhakar.mahadev-lad.rj@bp.renesas.com>

Hi Lad Prabhakar,

21. 12. 23. 오전 4:01에 Lad Prabhakar 이(가) 쓴 글:
> 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 bypassed the hierarchical setup and messed 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>
> ---
> Hi,
> 
> Ideally I would expect the mixer_resources_init() to be called from probe
> instead from the bind callback. If platform_get_irq() returns -EPROBE_DEFER
> the bind callback will fail :(

If the bind callback failed then probe function of exynos drm driver will call -EPROBE_DEFER like below so it must be no problem :),
--------------------------------------------
in exynos_drm_platform_probe function
    component_master_add_with_match()

in component_master_add_with_match function
    try_to_bring_up_master()

Thanks,
Inki Dae

> 
> Cheers,
> Prabhakar
> ---
>  drivers/gpu/drm/exynos/exynos_mixer.c | 14 ++++++--------
>  1 file changed, 6 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c
> index 41c54f1f60bc..e5204be86093 100644
> --- a/drivers/gpu/drm/exynos/exynos_mixer.c
> +++ b/drivers/gpu/drm/exynos/exynos_mixer.c
> @@ -809,19 +809,17 @@ static int mixer_resources_init(struct mixer_context *mixer_ctx)
>  		return -ENXIO;
>  	}
>  
> -	res = platform_get_resource(mixer_ctx->pdev, IORESOURCE_IRQ, 0);
> -	if (res == NULL) {
> -		dev_err(dev, "get interrupt resource failed.\n");
> -		return -ENXIO;
> -	}
> +	ret = platform_get_irq(mixer_ctx->pdev, 0);
> +	if (ret < 0)
> +		return ret;
> +	mixer_ctx->irq = ret;
>  
> -	ret = devm_request_irq(dev, res->start, mixer_irq_handler,
> -						0, "drm_mixer", mixer_ctx);
> +	ret = devm_request_irq(dev, mixer_ctx->irq, mixer_irq_handler,
> +			       0, "drm_mixer", mixer_ctx);
>  	if (ret) {
>  		dev_err(dev, "request interrupt failed.\n");
>  		return ret;
>  	}
> -	mixer_ctx->irq = res->start;
>  
>  	return 0;
>  }
> 

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

  reply	other threads:[~2022-01-14 11:08 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20211222190157epcas1p1d556269940101a49ab245a4f1d7d45c0@epcas1p1.samsung.com>
2021-12-22 19:01 ` [PATCH 0/5] drm/exynos: Use platform_get_irq*() variants to fetch IRQ's Lad Prabhakar
2021-12-22 19:01   ` Lad Prabhakar
2021-12-22 19:01   ` Lad Prabhakar
2021-12-22 19:01   ` [PATCH 1/5] drm/exynos/exynos7_drm_decon: Use platform_get_irq_byname() to get the interrupt Lad Prabhakar
2021-12-22 19:01     ` Lad Prabhakar
2021-12-22 19:01     ` Lad Prabhakar
2021-12-22 19:01   ` [PATCH 2/5] drm/exynos: mixer: Use platform_get_irq() " Lad Prabhakar
2021-12-22 19:01     ` Lad Prabhakar
2021-12-22 19:01     ` Lad Prabhakar
2022-01-14 11:20     ` Inki Dae [this message]
2022-01-14 11:20       ` Inki Dae
2022-01-14 11:20       ` Inki Dae
2022-01-15  1:40       ` Lad, Prabhakar
2022-01-15  1:40         ` Lad, Prabhakar
2022-01-15  1:40         ` Lad, Prabhakar
2021-12-22 19:01   ` [PATCH 3/5] drm/exynos/exynos_drm_fimd: Use platform_get_irq_byname() " Lad Prabhakar
2021-12-22 19:01     ` Lad Prabhakar
2021-12-22 19:01     ` Lad Prabhakar
2021-12-22 19:01   ` [PATCH 4/5] drm/exynos/fimc: Use platform_get_irq() " Lad Prabhakar
2021-12-22 19:01     ` Lad Prabhakar
2021-12-22 19:01     ` Lad Prabhakar
2021-12-22 19:01   ` [PATCH 5/5] drm/exynos: gsc: " Lad Prabhakar
2021-12-22 19:01     ` Lad Prabhakar
2021-12-22 19:01     ` Lad Prabhakar
2022-01-14 11:47   ` [PATCH 0/5] drm/exynos: Use platform_get_irq*() variants to fetch IRQ's Inki Dae
2022-01-14 11:47     ` Inki Dae
2022-01-14 11:47     ` Inki Dae

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a95b74fd-7118-b0fe-26b9-4665c719f1a0@samsung.com \
    --to=inki.dae@samsung.com \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jy0922.shim@samsung.com \
    --cc=krzysztof.kozlowski@canonical.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=prabhakar.csengg@gmail.com \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=robh+dt@kernel.org \
    --cc=sw0312.kim@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.