All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/tegra: return with probe defer if GPIO subsystem is not ready
@ 2018-07-26 13:36 ` Stefan Agner
  0 siblings, 0 replies; 8+ messages in thread
From: Stefan Agner @ 2018-07-26 13:36 UTC (permalink / raw)
  To: thierry.reding, airlied; +Cc: linux-tegra, linux-kernel, dri-devel, jonathanh

If the GPIO subsystem is not ready make sure to return -EPROBE_DEFER
instead of silently continuing without HPD.

Reported-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
 drivers/gpu/drm/tegra/output.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/tegra/output.c b/drivers/gpu/drm/tegra/output.c
index ffe34bd0bb9d..4bcefe455afd 100644
--- a/drivers/gpu/drm/tegra/output.c
+++ b/drivers/gpu/drm/tegra/output.c
@@ -133,7 +133,9 @@ int tegra_output_probe(struct tegra_output *output)
 	output->hpd_gpio = of_get_named_gpio_flags(output->of_node,
 						   "nvidia,hpd-gpio", 0,
 						   &output->hpd_gpio_flags);
-	if (gpio_is_valid(output->hpd_gpio)) {
+	if (output->hpd_gpio == -EPROBE_DEFER) {
+		return -EPROBE_DEFER;
+	} else if (gpio_is_valid(output->hpd_gpio)) {
 		unsigned long flags;
 
 		err = gpio_request_one(output->hpd_gpio, GPIOF_DIR_IN,
-- 
2.18.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH] drm/tegra: return with probe defer if GPIO subsystem is not ready
@ 2018-07-26 13:36 ` Stefan Agner
  0 siblings, 0 replies; 8+ messages in thread
From: Stefan Agner @ 2018-07-26 13:36 UTC (permalink / raw)
  To: thierry.reding, airlied
  Cc: jonathanh, dri-devel, linux-tegra, linux-kernel, Stefan Agner

If the GPIO subsystem is not ready make sure to return -EPROBE_DEFER
instead of silently continuing without HPD.

Reported-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
 drivers/gpu/drm/tegra/output.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/tegra/output.c b/drivers/gpu/drm/tegra/output.c
index ffe34bd0bb9d..4bcefe455afd 100644
--- a/drivers/gpu/drm/tegra/output.c
+++ b/drivers/gpu/drm/tegra/output.c
@@ -133,7 +133,9 @@ int tegra_output_probe(struct tegra_output *output)
 	output->hpd_gpio = of_get_named_gpio_flags(output->of_node,
 						   "nvidia,hpd-gpio", 0,
 						   &output->hpd_gpio_flags);
-	if (gpio_is_valid(output->hpd_gpio)) {
+	if (output->hpd_gpio == -EPROBE_DEFER) {
+		return -EPROBE_DEFER;
+	} else if (gpio_is_valid(output->hpd_gpio)) {
 		unsigned long flags;
 
 		err = gpio_request_one(output->hpd_gpio, GPIOF_DIR_IN,
-- 
2.18.0


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

* Re: [PATCH] drm/tegra: return with probe defer if GPIO subsystem is not ready
  2018-07-26 13:36 ` Stefan Agner
  (?)
@ 2018-09-06 23:31 ` Stefan Agner
  2019-07-26 14:23   ` Stefan Agner
  -1 siblings, 1 reply; 8+ messages in thread
From: Stefan Agner @ 2018-09-06 23:31 UTC (permalink / raw)
  To: thierry.reding, airlied; +Cc: jonathanh, dri-devel, linux-tegra, linux-kernel

On 26.07.2018 06:36, Stefan Agner wrote:
> If the GPIO subsystem is not ready make sure to return -EPROBE_DEFER
> instead of silently continuing without HPD.
> 
> Reported-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
> Signed-off-by: Stefan Agner <stefan@agner.ch>

I think this did not get merged yet, any chance to get it in?

--
Stefan

> ---
>  drivers/gpu/drm/tegra/output.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/tegra/output.c b/drivers/gpu/drm/tegra/output.c
> index ffe34bd0bb9d..4bcefe455afd 100644
> --- a/drivers/gpu/drm/tegra/output.c
> +++ b/drivers/gpu/drm/tegra/output.c
> @@ -133,7 +133,9 @@ int tegra_output_probe(struct tegra_output *output)
>  	output->hpd_gpio = of_get_named_gpio_flags(output->of_node,
>  						   "nvidia,hpd-gpio", 0,
>  						   &output->hpd_gpio_flags);
> -	if (gpio_is_valid(output->hpd_gpio)) {
> +	if (output->hpd_gpio == -EPROBE_DEFER) {
> +		return -EPROBE_DEFER;
> +	} else if (gpio_is_valid(output->hpd_gpio)) {
>  		unsigned long flags;
>  
>  		err = gpio_request_one(output->hpd_gpio, GPIOF_DIR_IN,

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

* Re: [PATCH] drm/tegra: return with probe defer if GPIO subsystem is not ready
  2018-09-06 23:31 ` Stefan Agner
@ 2019-07-26 14:23   ` Stefan Agner
  2019-07-26 14:46     ` Dmitry Osipenko
  0 siblings, 1 reply; 8+ messages in thread
From: Stefan Agner @ 2019-07-26 14:23 UTC (permalink / raw)
  To: thierry.reding, airlied; +Cc: jonathanh, dri-devel, linux-tegra, linux-kernel

Hi Thierry, Hi Dave,

On 2018-09-07 01:31, Stefan Agner wrote:
> On 26.07.2018 06:36, Stefan Agner wrote:
>> If the GPIO subsystem is not ready make sure to return -EPROBE_DEFER
>> instead of silently continuing without HPD.
>>
>> Reported-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
>> Signed-off-by: Stefan Agner <stefan@agner.ch>
> 
> I think this did not get merged yet, any chance to get it in?

Any chance to get this in in the next merge window?

--
Stefan

> 
> --
> Stefan
> 
>> ---
>>  drivers/gpu/drm/tegra/output.c | 4 +++-
>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/tegra/output.c b/drivers/gpu/drm/tegra/output.c
>> index ffe34bd0bb9d..4bcefe455afd 100644
>> --- a/drivers/gpu/drm/tegra/output.c
>> +++ b/drivers/gpu/drm/tegra/output.c
>> @@ -133,7 +133,9 @@ int tegra_output_probe(struct tegra_output *output)
>>  	output->hpd_gpio = of_get_named_gpio_flags(output->of_node,
>>  						   "nvidia,hpd-gpio", 0,
>>  						   &output->hpd_gpio_flags);
>> -	if (gpio_is_valid(output->hpd_gpio)) {
>> +	if (output->hpd_gpio == -EPROBE_DEFER) {
>> +		return -EPROBE_DEFER;
>> +	} else if (gpio_is_valid(output->hpd_gpio)) {
>>  		unsigned long flags;
>>
>>  		err = gpio_request_one(output->hpd_gpio, GPIOF_DIR_IN,

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

* Re: [PATCH] drm/tegra: return with probe defer if GPIO subsystem is not ready
  2019-07-26 14:23   ` Stefan Agner
@ 2019-07-26 14:46     ` Dmitry Osipenko
  2019-07-26 14:57         ` Stefan Agner
  0 siblings, 1 reply; 8+ messages in thread
From: Dmitry Osipenko @ 2019-07-26 14:46 UTC (permalink / raw)
  To: Stefan Agner, thierry.reding
  Cc: airlied, jonathanh, dri-devel, linux-tegra, linux-kernel

26.07.2019 17:23, Stefan Agner пишет:
> Hi Thierry, Hi Dave,
> 
> On 2018-09-07 01:31, Stefan Agner wrote:
>> On 26.07.2018 06:36, Stefan Agner wrote:
>>> If the GPIO subsystem is not ready make sure to return -EPROBE_DEFER
>>> instead of silently continuing without HPD.
>>>
>>> Reported-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
>>> Signed-off-by: Stefan Agner <stefan@agner.ch>
>>
>> I think this did not get merged yet, any chance to get it in?
> 
> Any chance to get this in in the next merge window?

The patch isn't relevant anymore (since v5.3) because the code was
changed and now propagates the proper error code in a case of error,
please see [1].

[1]
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v5.3-rc1&id=bbad640709fd43ff77b8838c409c977c0b28430c

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

* Re: [PATCH] drm/tegra: return with probe defer if GPIO subsystem is not ready
  2019-07-26 14:46     ` Dmitry Osipenko
@ 2019-07-26 14:57         ` Stefan Agner
  0 siblings, 0 replies; 8+ messages in thread
From: Stefan Agner @ 2019-07-26 14:57 UTC (permalink / raw)
  To: Dmitry Osipenko
  Cc: airlied, linux-kernel, dri-devel, jonathanh, thierry.reding, linux-tegra

On 2019-07-26 16:46, Dmitry Osipenko wrote:
> 26.07.2019 17:23, Stefan Agner пишет:
>> Hi Thierry, Hi Dave,
>>
>> On 2018-09-07 01:31, Stefan Agner wrote:
>>> On 26.07.2018 06:36, Stefan Agner wrote:
>>>> If the GPIO subsystem is not ready make sure to return -EPROBE_DEFER
>>>> instead of silently continuing without HPD.
>>>>
>>>> Reported-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
>>>> Signed-off-by: Stefan Agner <stefan@agner.ch>
>>>
>>> I think this did not get merged yet, any chance to get it in?
>>
>> Any chance to get this in in the next merge window?
> 
> The patch isn't relevant anymore (since v5.3) because the code was
> changed and now propagates the proper error code in a case of error,
> please see [1].
> 
> [1]
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v5.3-rc1&id=bbad640709fd43ff77b8838c409c977c0b28430c

Oh I see, I accidentally checked in Linux 5.2. Sorry for the noise and
thanks for the link!

--
Stefan
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH] drm/tegra: return with probe defer if GPIO subsystem is not ready
@ 2019-07-26 14:57         ` Stefan Agner
  0 siblings, 0 replies; 8+ messages in thread
From: Stefan Agner @ 2019-07-26 14:57 UTC (permalink / raw)
  To: Dmitry Osipenko
  Cc: thierry.reding, airlied, jonathanh, dri-devel, linux-tegra, linux-kernel

On 2019-07-26 16:46, Dmitry Osipenko wrote:
> 26.07.2019 17:23, Stefan Agner пишет:
>> Hi Thierry, Hi Dave,
>>
>> On 2018-09-07 01:31, Stefan Agner wrote:
>>> On 26.07.2018 06:36, Stefan Agner wrote:
>>>> If the GPIO subsystem is not ready make sure to return -EPROBE_DEFER
>>>> instead of silently continuing without HPD.
>>>>
>>>> Reported-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
>>>> Signed-off-by: Stefan Agner <stefan@agner.ch>
>>>
>>> I think this did not get merged yet, any chance to get it in?
>>
>> Any chance to get this in in the next merge window?
> 
> The patch isn't relevant anymore (since v5.3) because the code was
> changed and now propagates the proper error code in a case of error,
> please see [1].
> 
> [1]
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v5.3-rc1&id=bbad640709fd43ff77b8838c409c977c0b28430c

Oh I see, I accidentally checked in Linux 5.2. Sorry for the noise and
thanks for the link!

--
Stefan

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

* Re: [PATCH] drm/tegra: return with probe defer if GPIO subsystem is not ready
  2019-07-26 14:57         ` Stefan Agner
  (?)
@ 2019-07-26 15:00         ` Dmitry Osipenko
  -1 siblings, 0 replies; 8+ messages in thread
From: Dmitry Osipenko @ 2019-07-26 15:00 UTC (permalink / raw)
  To: Stefan Agner
  Cc: thierry.reding, airlied, jonathanh, dri-devel, linux-tegra, linux-kernel

26.07.2019 17:57, Stefan Agner пишет:
> On 2019-07-26 16:46, Dmitry Osipenko wrote:
>> 26.07.2019 17:23, Stefan Agner пишет:
>>> Hi Thierry, Hi Dave,
>>>
>>> On 2018-09-07 01:31, Stefan Agner wrote:
>>>> On 26.07.2018 06:36, Stefan Agner wrote:
>>>>> If the GPIO subsystem is not ready make sure to return -EPROBE_DEFER
>>>>> instead of silently continuing without HPD.
>>>>>
>>>>> Reported-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
>>>>> Signed-off-by: Stefan Agner <stefan@agner.ch>
>>>>
>>>> I think this did not get merged yet, any chance to get it in?
>>>
>>> Any chance to get this in in the next merge window?
>>
>> The patch isn't relevant anymore (since v5.3) because the code was
>> changed and now propagates the proper error code in a case of error,
>> please see [1].
>>
>> [1]
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v5.3-rc1&id=bbad640709fd43ff77b8838c409c977c0b28430c
> 
> Oh I see, I accidentally checked in Linux 5.2. Sorry for the noise and
> thanks for the link!

No problems, you're welcome.

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

end of thread, other threads:[~2019-07-26 15:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-26 13:36 [PATCH] drm/tegra: return with probe defer if GPIO subsystem is not ready Stefan Agner
2018-07-26 13:36 ` Stefan Agner
2018-09-06 23:31 ` Stefan Agner
2019-07-26 14:23   ` Stefan Agner
2019-07-26 14:46     ` Dmitry Osipenko
2019-07-26 14:57       ` Stefan Agner
2019-07-26 14:57         ` Stefan Agner
2019-07-26 15:00         ` Dmitry Osipenko

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.