From: Sean Paul Date: Thu, 3 Apr 2014 15:11:03 +0000 (+0530) Subject: drm/exynos: Read hpd gpio in is_connected callback X-Git-Tag: firefly_0821_release~176^2~3773^2~17^2~40 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5137c8ca4be8cd54c1bc74bc1f163a57c7871b38;p=firefly-linux-kernel-4.4.55.git drm/exynos: Read hpd gpio in is_connected callback This patch adds a gpio read of hpd during the is_connected callback. This fixes the case where hdmi is off going into suspend and the cable is plugged in while suspended. In this case, the hpd interrupt does not fire and is_connected will return false. Signed-off-by: Sean Paul Signed-off-by: Rahul Sharma Signed-off-by: Inki Dae --- diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c index f1bdf991111c..13c783a2ee01 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c @@ -805,6 +805,8 @@ static enum drm_connector_status hdmi_detect(struct drm_connector *connector, { struct hdmi_context *hdata = ctx_from_connector(connector); + hdata->hpd = gpio_get_value(hdata->hpd_gpio); + return hdata->hpd ? connector_status_connected : connector_status_disconnected; }