Skip to contentSkip to conversation

drm/tegra: return with probe defer if GPIO subsystem is not ready

PATCH In review Stefan Agner 2 participants 6 messages Jul 26, 2018 – Jul 26, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/tegra: return with probe defer if GPIO subsystem is not ready

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

---
 drivers/gpu/drm/tegra/output.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/tegra/output.c +3 -1
index ffe34bd0bb9d..4bcefe455afd 100644
@@ -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,
Signature · 6 lines
2.18.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw
Quoted 5 lines · Stefan Agner

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

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

--
Stefan

Quoted 19 lines
---
 drivers/gpu/drm/tegra/output.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/tegra/output.c +3 -1
index ffe34bd0bb9d..4bcefe455afd 100644
@@ -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 lore raw

Hi Thierry, Hi Dave,

Quoted 8 lines · Stefan Agner
Quoted 5 lines · Stefan Agner

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

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

Quoted 23 lines

--
Stefan

Quoted 19 lines
---
 drivers/gpu/drm/tegra/output.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/tegra/output.c +3 -1
index ffe34bd0bb9d..4bcefe455afd 100644
@@ -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,
#3 lore raw

26.07.2019 17:23, Stefan Agner пишет:

Quoted 7 lines

Hi Thierry, Hi Dave,

Quoted 4 lines · Stefan Agner
Quoted 3 lines · Stefan Agner

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

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

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

#4 lore raw
Quoted 13 lines · Dmitry Osipenko

26.07.2019 17:23, Stefan Agner пишет:

Quoted 12 lines

Hi Thierry, Hi Dave,

Quoted 8 lines · Stefan Agner
Quoted 5 lines · Stefan Agner

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

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

Quoted 8 lines
Quoted 1 line

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
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#5 lore raw

26.07.2019 17:57, Stefan Agner пишет:

Quoted 20 lines · Dmitry Osipenko
Quoted 19 lines

26.07.2019 17:23, Stefan Agner пишет:

Quoted 7 lines

Hi Thierry, Hi Dave,

Quoted 4 lines · Stefan Agner
Quoted 3 lines · Stefan Agner

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

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

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].

Quoted 5 lines
Quoted 2 lines

[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.