diff options
author | Archit Taneja <architt@codeaurora.org> | 2016-02-25 11:22:37 +0530 |
---|---|---|
committer | Rob Clark <robdclark@gmail.com> | 2016-02-29 09:48:30 -0500 |
commit | c95ea16254c7affa1654804c8542d1f054a40f9f (patch) | |
tree | 4aca44d87da346803f54ae0dc24fa4e747b1bfe5 /drivers/gpu/drm/msm/hdmi | |
parent | dc50f782c99a48bf49c0ca3e3f407f207d303d81 (diff) | |
download | op-kernel-dev-c95ea16254c7affa1654804c8542d1f054a40f9f.zip op-kernel-dev-c95ea16254c7affa1654804c8542d1f054a40f9f.tar.gz |
drm/msm/hdmi: Fix connector detect when there is no HPD gpio
Some platforms may not have a HPD gpio line to detect Hot Plug signal from
the connector. They need to rely only on reading REG_HDMI_HPD_INT_STATUS
for HPD.
Modify hdmi_connector_detect logic such that it checks for HPD only using
the status register if there is no HPD gpio.
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/msm/hdmi')
-rw-r--r-- | drivers/gpu/drm/msm/hdmi/hdmi_connector.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_connector.c b/drivers/gpu/drm/msm/hdmi/hdmi_connector.c index deec1f9..3973d46 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi_connector.c +++ b/drivers/gpu/drm/msm/hdmi/hdmi_connector.c @@ -301,9 +301,18 @@ static enum drm_connector_status hdmi_connector_detect( { struct hdmi_connector *hdmi_connector = to_hdmi_connector(connector); struct hdmi *hdmi = hdmi_connector->hdmi; + const struct hdmi_platform_config *config = hdmi->config; + struct hdmi_gpio_data hpd_gpio = config->gpios[HPD_GPIO_INDEX]; enum drm_connector_status stat_gpio, stat_reg; int retry = 20; + /* + * some platforms may not have hpd gpio. Rely only on the status + * provided by REG_HDMI_HPD_INT_STATUS in this case. + */ + if (hpd_gpio.num == -1) + return detect_reg(hdmi); + do { stat_gpio = detect_gpio(hdmi); stat_reg = detect_reg(hdmi); |