From 3eb225d2861be738327532325fed8d2496f82b88 Mon Sep 17 00:00:00 2001 From: Sean Paul Date: Mon, 19 Nov 2012 14:49:29 -0500 Subject: [PATCH] drm/exynos: dp: Check hp gpio in hp detect function Check the hotplug gpio in the hpd function so we know when it's asserted. This fixes the return value of the is_connected callback. BUG=chrome-os-partner:16280 TEST=None Change-Id: I1ab0c7d830ecdc7b7f38ffd81895038978e4e57a Signed-off-by: Sean Paul Reviewed-on: https://gerrit.chromium.org/gerrit/38319 Reviewed-by: Vincent Palatin --- drivers/gpu/drm/exynos/exynos_dp_core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/exynos/exynos_dp_core.c b/drivers/gpu/drm/exynos/exynos_dp_core.c index 0f0240409aa8..b81f510b9427 100644 --- a/drivers/gpu/drm/exynos/exynos_dp_core.c +++ b/drivers/gpu/drm/exynos/exynos_dp_core.c @@ -58,6 +58,9 @@ static int exynos_dp_detect_hpd(struct exynos_dp_device *dp) { int timeout_loop = 0; + if (gpio_is_valid(dp->hpd_gpio)) + return !gpio_get_value(dp->hpd_gpio); + while (exynos_dp_get_plug_in_status(dp) != 0) { timeout_loop++; if (DP_TIMEOUT_LOOP_COUNT < timeout_loop) { -- 2.20.1