aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinaro CI <ci_notify@linaro.org>2018-04-20 21:05:29 +0000
committerLinaro CI <ci_notify@linaro.org>2018-04-20 21:05:29 +0000
commit47accf25a39694ee93e90080f8bcae3427f6a0d6 (patch)
tree73ee80c8f94ecd70cb574b2824cb3252277c05e5
parent629c55c5207a20f805b66f90e9db1f4a5ba8f0fe (diff)
parentf90780aed1f305e495d39d4171851b7acb38bed2 (diff)
Merge remote-tracking branch 'drm-msm/v4.15/tracking-qcomlt-drm-msm' into integration-linux-qcomlt
-rw-r--r--drivers/gpu/drm/msm/hdmi/hdmi.c3
-rw-r--r--drivers/gpu/drm/msm/hdmi/hdmi.h3
-rw-r--r--drivers/gpu/drm/msm/hdmi/hdmi_connector.c10
3 files changed, 14 insertions, 2 deletions
diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.c b/drivers/gpu/drm/msm/hdmi/hdmi.c
index e63dc0fb55f8..747f69f8321a 100644
--- a/drivers/gpu/drm/msm/hdmi/hdmi.c
+++ b/drivers/gpu/drm/msm/hdmi/hdmi.c
@@ -39,6 +39,8 @@ void msm_hdmi_set_mode(struct hdmi *hdmi, bool power_on)
}
} else {
ctrl = HDMI_CTRL_HDMI;
+ if (hdmi->config->keep_ctrl_on)
+ ctrl |= HDMI_CTRL_ENABLE;
}
hdmi_write(hdmi, REG_HDMI_CTRL, ctrl);
@@ -406,6 +408,7 @@ static struct hdmi_platform_config hdmi_tx_8996_config = {
HDMI_CFG(pwr_clk, 8x74),
HDMI_CFG(hpd_clk, 8x74),
.hpd_freq = hpd_clk_freq_8x74,
+ .keep_ctrl_on = true,
};
static const struct {
diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.h b/drivers/gpu/drm/msm/hdmi/hdmi.h
index accc9a61611d..57795fc13468 100644
--- a/drivers/gpu/drm/msm/hdmi/hdmi.h
+++ b/drivers/gpu/drm/msm/hdmi/hdmi.h
@@ -121,6 +121,9 @@ struct hdmi_platform_config {
/* gpio's: */
struct hdmi_gpio_data gpios[HDMI_MAX_NUM_GPIO];
+
+ /* caps, etc. */
+ bool keep_ctrl_on;
};
void msm_hdmi_set_mode(struct hdmi *hdmi, bool power_on);
diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_connector.c b/drivers/gpu/drm/msm/hdmi/hdmi_connector.c
index c0848dfedd50..ffe7e7218d39 100644
--- a/drivers/gpu/drm/msm/hdmi/hdmi_connector.c
+++ b/drivers/gpu/drm/msm/hdmi/hdmi_connector.c
@@ -223,6 +223,13 @@ static int hpd_enable(struct hdmi_connector *hdmi_connector)
HDMI_HPD_CTRL_ENABLE | hpd_ctrl);
spin_unlock_irqrestore(&hdmi->reg_lock, flags);
+ /*
+ * wait for a bit so that HPD is sensed if there is a cable already
+ * connected. Returning early will result in someone calling the
+ * connnector func's detect() callback too early
+ */
+ msleep(15);
+
return 0;
fail:
@@ -465,8 +472,7 @@ struct drm_connector *msm_hdmi_connector_init(struct hdmi *hdmi)
DRM_MODE_CONNECTOR_HDMIA);
drm_connector_helper_add(connector, &msm_hdmi_connector_helper_funcs);
- connector->polled = DRM_CONNECTOR_POLL_CONNECT |
- DRM_CONNECTOR_POLL_DISCONNECT;
+ connector->polled = DRM_CONNECTOR_POLL_HPD;
connector->interlace_allowed = 0;
connector->doublescan_allowed = 0;