linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] drm/stm: ltdc: manage error cases in probe
@ 2019-04-24 14:03 Fabien Dessenne
  2019-04-24 14:03 ` [PATCH 1/2] drm/stm: ltdc: manage the get_irq probe defer case Fabien Dessenne
  2019-04-24 14:03 ` [PATCH 2/2] drm/stm: ltdc: return appropriate error code during probe Fabien Dessenne
  0 siblings, 2 replies; 7+ messages in thread
From: Fabien Dessenne @ 2019-04-24 14:03 UTC (permalink / raw)
  To: Yannick Fertre, Philippe Cornu, Benjamin Gaignard,
	Vincent Abriou, David Airlie, Daniel Vetter, Maxime Coquelin,
	Alexandre Torgue, dri-devel, linux-stm32, linux-arm-kernel,
	linux-kernel
  Cc: Fabien Dessenne

This patchset adds some check of the returned error code in probe.

Fabien Dessenne (2):
  drm/stm: ltdc: manage the get_irq probe defer case
  drm/stm: ltdc: return appropriate error code during probe

 drivers/gpu/drm/stm/ltdc.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

-- 
2.7.4


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

* [PATCH 1/2] drm/stm: ltdc: manage the get_irq probe defer case
  2019-04-24 14:03 [PATCH 0/2] drm/stm: ltdc: manage error cases in probe Fabien Dessenne
@ 2019-04-24 14:03 ` Fabien Dessenne
  2019-04-26 12:29   ` Philippe CORNU
  2019-04-24 14:03 ` [PATCH 2/2] drm/stm: ltdc: return appropriate error code during probe Fabien Dessenne
  1 sibling, 1 reply; 7+ messages in thread
From: Fabien Dessenne @ 2019-04-24 14:03 UTC (permalink / raw)
  To: Yannick Fertre, Philippe Cornu, Benjamin Gaignard,
	Vincent Abriou, David Airlie, Daniel Vetter, Maxime Coquelin,
	Alexandre Torgue, dri-devel, linux-stm32, linux-arm-kernel,
	linux-kernel
  Cc: Fabien Dessenne

Manage the -EPROBE_DEFER error case for the ltdc IRQ.

Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com>
---
 drivers/gpu/drm/stm/ltdc.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
index 566b0d8..521ba83 100644
--- a/drivers/gpu/drm/stm/ltdc.c
+++ b/drivers/gpu/drm/stm/ltdc.c
@@ -1174,6 +1174,9 @@ int ltdc_load(struct drm_device *ddev)
 
 	for (i = 0; i < MAX_IRQ; i++) {
 		irq = platform_get_irq(pdev, i);
+		if (irq == -EPROBE_DEFER)
+			goto err;
+
 		if (irq < 0)
 			continue;
 
-- 
2.7.4


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

* [PATCH 2/2] drm/stm: ltdc: return appropriate error code during probe
  2019-04-24 14:03 [PATCH 0/2] drm/stm: ltdc: manage error cases in probe Fabien Dessenne
  2019-04-24 14:03 ` [PATCH 1/2] drm/stm: ltdc: manage the get_irq probe defer case Fabien Dessenne
@ 2019-04-24 14:03 ` Fabien Dessenne
  2019-04-26 12:30   ` Philippe CORNU
  1 sibling, 1 reply; 7+ messages in thread
From: Fabien Dessenne @ 2019-04-24 14:03 UTC (permalink / raw)
  To: Yannick Fertre, Philippe Cornu, Benjamin Gaignard,
	Vincent Abriou, David Airlie, Daniel Vetter, Maxime Coquelin,
	Alexandre Torgue, dri-devel, linux-stm32, linux-arm-kernel,
	linux-kernel
  Cc: Fabien Dessenne

During probe, return the "clk_get" error value instead of -ENODEV.

Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com>
---
 drivers/gpu/drm/stm/ltdc.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
index 521ba83..97912e2 100644
--- a/drivers/gpu/drm/stm/ltdc.c
+++ b/drivers/gpu/drm/stm/ltdc.c
@@ -1145,8 +1145,9 @@ int ltdc_load(struct drm_device *ddev)
 
 	ldev->pixel_clk = devm_clk_get(dev, "lcd");
 	if (IS_ERR(ldev->pixel_clk)) {
-		DRM_ERROR("Unable to get lcd clock\n");
-		return -ENODEV;
+		if (PTR_ERR(ldev->pixel_clk) != -EPROBE_DEFER)
+			DRM_ERROR("Unable to get lcd clock\n");
+		return PTR_ERR(ldev->pixel_clk);
 	}
 
 	if (clk_prepare_enable(ldev->pixel_clk)) {
-- 
2.7.4


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

* Re: [PATCH 1/2] drm/stm: ltdc: manage the get_irq probe defer case
  2019-04-24 14:03 ` [PATCH 1/2] drm/stm: ltdc: manage the get_irq probe defer case Fabien Dessenne
@ 2019-04-26 12:29   ` Philippe CORNU
  2019-05-06  7:25     ` Benjamin Gaignard
  0 siblings, 1 reply; 7+ messages in thread
From: Philippe CORNU @ 2019-04-26 12:29 UTC (permalink / raw)
  To: Fabien DESSENNE, Yannick FERTRE, Benjamin Gaignard,
	Vincent ABRIOU, David Airlie, Daniel Vetter, Maxime Coquelin,
	Alexandre TORGUE, dri-devel, linux-stm32, linux-arm-kernel,
	linux-kernel

Hi Fabien,
and thank you for your patch,

Acked-by: Philippe Cornu <philippe.cornu@st.com>

Philippe :-)

On 4/24/19 4:03 PM, Fabien Dessenne wrote:
> Manage the -EPROBE_DEFER error case for the ltdc IRQ.
> 
> Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com>
> ---
>   drivers/gpu/drm/stm/ltdc.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
> index 566b0d8..521ba83 100644
> --- a/drivers/gpu/drm/stm/ltdc.c
> +++ b/drivers/gpu/drm/stm/ltdc.c
> @@ -1174,6 +1174,9 @@ int ltdc_load(struct drm_device *ddev)
>   
>   	for (i = 0; i < MAX_IRQ; i++) {
>   		irq = platform_get_irq(pdev, i);
> +		if (irq == -EPROBE_DEFER)
> +			goto err;
> +
>   		if (irq < 0)
>   			continue;
>   
> 

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

* Re: [PATCH 2/2] drm/stm: ltdc: return appropriate error code during probe
  2019-04-24 14:03 ` [PATCH 2/2] drm/stm: ltdc: return appropriate error code during probe Fabien Dessenne
@ 2019-04-26 12:30   ` Philippe CORNU
  2019-05-06  7:25     ` Benjamin Gaignard
  0 siblings, 1 reply; 7+ messages in thread
From: Philippe CORNU @ 2019-04-26 12:30 UTC (permalink / raw)
  To: Fabien DESSENNE, Yannick FERTRE, Benjamin Gaignard,
	Vincent ABRIOU, David Airlie, Daniel Vetter, Maxime Coquelin,
	Alexandre TORGUE, dri-devel, linux-stm32, linux-arm-kernel,
	linux-kernel

Hi Fabien,
and thank you for your patch,

Acked-by: Philippe Cornu <philippe.cornu@st.com>

Philippe :-)

On 4/24/19 4:03 PM, Fabien Dessenne wrote:
> During probe, return the "clk_get" error value instead of -ENODEV.
> 
> Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com>
> ---
>   drivers/gpu/drm/stm/ltdc.c | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
> index 521ba83..97912e2 100644
> --- a/drivers/gpu/drm/stm/ltdc.c
> +++ b/drivers/gpu/drm/stm/ltdc.c
> @@ -1145,8 +1145,9 @@ int ltdc_load(struct drm_device *ddev)
>   
>   	ldev->pixel_clk = devm_clk_get(dev, "lcd");
>   	if (IS_ERR(ldev->pixel_clk)) {
> -		DRM_ERROR("Unable to get lcd clock\n");
> -		return -ENODEV;
> +		if (PTR_ERR(ldev->pixel_clk) != -EPROBE_DEFER)
> +			DRM_ERROR("Unable to get lcd clock\n");
> +		return PTR_ERR(ldev->pixel_clk);
>   	}
>   
>   	if (clk_prepare_enable(ldev->pixel_clk)) {
> 

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

* Re: [PATCH 1/2] drm/stm: ltdc: manage the get_irq probe defer case
  2019-04-26 12:29   ` Philippe CORNU
@ 2019-05-06  7:25     ` Benjamin Gaignard
  0 siblings, 0 replies; 7+ messages in thread
From: Benjamin Gaignard @ 2019-05-06  7:25 UTC (permalink / raw)
  To: Philippe CORNU
  Cc: Fabien DESSENNE, Yannick FERTRE, Vincent ABRIOU, David Airlie,
	Daniel Vetter, Maxime Coquelin, Alexandre TORGUE, dri-devel,
	linux-stm32, linux-arm-kernel, linux-kernel

Le ven. 26 avr. 2019 à 14:30, Philippe CORNU <philippe.cornu@st.com> a écrit :
>
> Hi Fabien,
> and thank you for your patch,
>
> Acked-by: Philippe Cornu <philippe.cornu@st.com>
>
> Philippe :-)
>
> On 4/24/19 4:03 PM, Fabien Dessenne wrote:
> > Manage the -EPROBE_DEFER error case for the ltdc IRQ.
> >
> > Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com>

Applied on drm-misc-next.
Thanks,
Benjamin

> > ---
> >   drivers/gpu/drm/stm/ltdc.c | 3 +++
> >   1 file changed, 3 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
> > index 566b0d8..521ba83 100644
> > --- a/drivers/gpu/drm/stm/ltdc.c
> > +++ b/drivers/gpu/drm/stm/ltdc.c
> > @@ -1174,6 +1174,9 @@ int ltdc_load(struct drm_device *ddev)
> >
> >       for (i = 0; i < MAX_IRQ; i++) {
> >               irq = platform_get_irq(pdev, i);
> > +             if (irq == -EPROBE_DEFER)
> > +                     goto err;
> > +
> >               if (irq < 0)
> >                       continue;
> >
> >

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

* Re: [PATCH 2/2] drm/stm: ltdc: return appropriate error code during probe
  2019-04-26 12:30   ` Philippe CORNU
@ 2019-05-06  7:25     ` Benjamin Gaignard
  0 siblings, 0 replies; 7+ messages in thread
From: Benjamin Gaignard @ 2019-05-06  7:25 UTC (permalink / raw)
  To: Philippe CORNU
  Cc: Fabien DESSENNE, Yannick FERTRE, Vincent ABRIOU, David Airlie,
	Daniel Vetter, Maxime Coquelin, Alexandre TORGUE, dri-devel,
	linux-stm32, linux-arm-kernel, linux-kernel

Le ven. 26 avr. 2019 à 14:30, Philippe CORNU <philippe.cornu@st.com> a écrit :
>
> Hi Fabien,
> and thank you for your patch,
>
> Acked-by: Philippe Cornu <philippe.cornu@st.com>
>
> Philippe :-)
>
> On 4/24/19 4:03 PM, Fabien Dessenne wrote:
> > During probe, return the "clk_get" error value instead of -ENODEV.
> >
> > Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com>

Applied on drm-misc-next.
Thanks,
Benjamin

> > ---
> >   drivers/gpu/drm/stm/ltdc.c | 5 +++--
> >   1 file changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
> > index 521ba83..97912e2 100644
> > --- a/drivers/gpu/drm/stm/ltdc.c
> > +++ b/drivers/gpu/drm/stm/ltdc.c
> > @@ -1145,8 +1145,9 @@ int ltdc_load(struct drm_device *ddev)
> >
> >       ldev->pixel_clk = devm_clk_get(dev, "lcd");
> >       if (IS_ERR(ldev->pixel_clk)) {
> > -             DRM_ERROR("Unable to get lcd clock\n");
> > -             return -ENODEV;
> > +             if (PTR_ERR(ldev->pixel_clk) != -EPROBE_DEFER)
> > +                     DRM_ERROR("Unable to get lcd clock\n");
> > +             return PTR_ERR(ldev->pixel_clk);
> >       }
> >
> >       if (clk_prepare_enable(ldev->pixel_clk)) {
> >

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

end of thread, other threads:[~2019-05-06  7:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-24 14:03 [PATCH 0/2] drm/stm: ltdc: manage error cases in probe Fabien Dessenne
2019-04-24 14:03 ` [PATCH 1/2] drm/stm: ltdc: manage the get_irq probe defer case Fabien Dessenne
2019-04-26 12:29   ` Philippe CORNU
2019-05-06  7:25     ` Benjamin Gaignard
2019-04-24 14:03 ` [PATCH 2/2] drm/stm: ltdc: return appropriate error code during probe Fabien Dessenne
2019-04-26 12:30   ` Philippe CORNU
2019-05-06  7:25     ` Benjamin Gaignard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).