linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: dri-devel@lists.freedesktop.org,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <maxime.ripard@bootlin.com>,
	Sean Paul <sean@poorly.run>
Cc: linux-arm-kernel@lists.infradead.org,
	Linus Walleij <linus.walleij@linaro.org>,
	Rob Clark <robdclark@gmail.com>,
	linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org
Subject: [PATCH 7/7] RFT: drm/msm/hdmi: Do not initialize HPD line value
Date: Sat, 29 Jun 2019 14:59:33 +0200	[thread overview]
Message-ID: <20190629125933.679-7-linus.walleij@linaro.org> (raw)
In-Reply-To: <20190629125933.679-1-linus.walleij@linaro.org>

After untangling the MSM HDMI GPIO code we see that the code
is deliberately setting the output value of the HPD (hot plug
detect) line to high, even though it is being used as input
which is of course the only viable use of a HPD pin.

This seems dubious: GPIO lines set up as input will have high
impedance (tristate) and the typical electronic construction
involves this line being used with a pull-down resistor around
10KOhm to keep it low (this is sometimes part of a levelshifter
component) and then an inserted connector will pull it up to
VDD and this asserts the HPD signal, as can be seen from the
code reading the HPD GPIO.

Stop try driving a value to the HPD input GPIO.

Cc: Rob Clark <robdclark@gmail.com>
Cc: Sean Paul <sean@poorly.run>
Cc: linux-arm-msm@vger.kernel.org
Cc: freedreno@lists.freedesktop.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/gpu/drm/msm/hdmi/hdmi_connector.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_connector.c b/drivers/gpu/drm/msm/hdmi/hdmi_connector.c
index 89c64cc85027..ecbcd8638b66 100644
--- a/drivers/gpu/drm/msm/hdmi/hdmi_connector.c
+++ b/drivers/gpu/drm/msm/hdmi/hdmi_connector.c
@@ -87,7 +87,7 @@ static int gpio_config(struct hdmi *hdmi, bool on)
 			struct hdmi_gpio_data gpio = config->gpios[i];
 
 			/* The value indicates the value for turning things on */
-			if (gpio.gpiod)
+			if (gpio.gpiod && gpio.output)
 				gpiod_set_value_cansleep(gpio.gpiod, gpio.value);
 		}
 
-- 
2.20.1


  parent reply	other threads:[~2019-06-29 13:02 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-29 12:59 [PATCH 1/7] drm/msm/mdp4: Drop unused GPIO include Linus Walleij
2019-06-29 12:59 ` [PATCH 2/7] drm/msm/dsi: Drop unused GPIO includes Linus Walleij
2019-06-29 12:59 ` [PATCH 3/7] drm/msm/dpu: Drop unused GPIO code Linus Walleij
2019-06-29 12:59 ` [PATCH 4/7] gpio: of: Support some legacy Qualcomm HDMI bindings Linus Walleij
2019-06-30 13:26   ` Rob Clark
2019-06-30 15:18     ` Linus Walleij
2019-06-30 15:25       ` Rob Clark
2019-06-29 12:59 ` [PATCH 5/7] drm/msm/hdmi: Convert to use GPIO descriptors Linus Walleij
2019-06-29 12:59 ` [PATCH 6/7] RFT: drm/msm/hdmi: Bring up HDMI connector OFF Linus Walleij
2019-06-29 12:59 ` Linus Walleij [this message]
2019-07-28 10:02 ` [PATCH 1/7] drm/msm/mdp4: Drop unused GPIO include Linus Walleij
2019-08-05  9:01   ` Linus Walleij
2019-08-13  0:22 ` Brian Masney

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=20190629125933.679-7-linus.walleij@linaro.org \
    --to=linus.walleij@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=maxime.ripard@bootlin.com \
    --cc=robdclark@gmail.com \
    --cc=sean@poorly.run \
    /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).