summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDongwoo Lee <dwoo08.lee@samsung.com>2017-10-23 09:47:19 +0900
committerDongwoo Lee <dwoo08.lee@samsung.com>2017-10-24 15:42:46 +0900
commitad265f50eb4621de76a13be7d520ea9a1689a417 (patch)
tree841c305b1cc09af9881552f30a3e248948b136f4
parent13f2ed4724423ea01b65de35fc023ec68b1ee5a0 (diff)
downloadlinux-exynos-ad265f50eb4621de76a13be7d520ea9a1689a417.tar.gz
linux-exynos-ad265f50eb4621de76a13be7d520ea9a1689a417.tar.bz2
linux-exynos-ad265f50eb4621de76a13be7d520ea9a1689a417.zip
Since commit 38b49e08, hdmi driver can notify the connection state via extcon framework. However, if hdmi cable is already connected before the system boot, there is no interrupt for hdmi connection, and thus it cannot be informed to userspace. To prevent the situation that cable is connected, but uninformed in userspace, this patch makes hdmi driver check the plugged state and notifies it explicitly at probing. Change-Id: I432f30df4effef27c7f393a4659c02cc035d5e6d Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
-rw-r--r--drivers/gpu/drm/exynos/exynos_hdmi.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
index 06f8d9efbfaf..d0759fae10e9 100644
--- a/drivers/gpu/drm/exynos/exynos_hdmi.c
+++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
@@ -1988,6 +1988,7 @@ static int hdmi_extcon_init(struct hdmi_context *hdata)
{
struct device *dev = hdata->dev;
struct extcon_dev *edev;
+ enum drm_connector_status plug;
int ret;
edev = devm_extcon_dev_allocate(dev, extcon_cable_list);
@@ -2000,6 +2001,11 @@ static int hdmi_extcon_init(struct hdmi_context *hdata)
hdata->edev = edev;
+ /* Notify the plugged state when hdmi is already connected */
+ plug = hdmi_detect(&hdata->connector, false);
+ if (plug == connector_status_connected)
+ extcon_set_cable_state(edev, "HDMI", 1);
+
return 0;
}