[PATCH 7/7] RFT: drm/msm/hdmi: Do not initialize HPD line value
Linus Walleij
linus.walleij at linaro.org
Sat Jun 29 12:59:33 UTC 2019
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 at gmail.com>
Cc: Sean Paul <sean at poorly.run>
Cc: linux-arm-msm at vger.kernel.org
Cc: freedreno at lists.freedesktop.org
Signed-off-by: Linus Walleij <linus.walleij at 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
More information about the dri-devel
mailing list