From: Stefan Agner <stefan@agner.ch>
To: thierry.reding@gmail.com, airlied@linux.ie
Cc: linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org,
dri-devel@lists.freedesktop.org, jonathanh@nvidia.com
Subject: [PATCH] drm/tegra: return with probe defer if GPIO subsystem is not ready
Date: Thu, 26 Jul 2018 15:36:06 +0200 [thread overview]
Message-ID: <20180726133606.14587-1-stefan@agner.ch> (raw)
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
next reply other threads:[~2018-07-26 13:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-26 13:36 Stefan Agner [this message]
2018-09-06 23:31 ` [PATCH] drm/tegra: return with probe defer if GPIO subsystem is not ready 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 15:00 ` Dmitry Osipenko
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=20180726133606.14587-1-stefan@agner.ch \
--to=stefan@agner.ch \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=jonathanh@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=thierry.reding@gmail.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 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).