[PATCH 1/6] drm/msm/hdmi: Keep the HDMI_CTRL_ENABLE bitfield always on for 8x96

Archit Taneja architt at codeaurora.org
Fri Oct 27 10:57:27 UTC 2017


The ENABLE field in REG_HDMI_CTRL is required to be set to detect hot plug
events on 8x96. We don't get any HPD interrupts when HDMI bridge is
disabled.

Keep it always on. Downstream also seems to do the same thing. Restrict
this quirk only to 8x96, since we're not entirely sure whether this is
a legitimate fix for other platforms or not.

Signed-off-by: Archit Taneja <architt at codeaurora.org>
---
 drivers/gpu/drm/msm/hdmi/hdmi.c | 3 +++
 drivers/gpu/drm/msm/hdmi/hdmi.h | 3 +++
 2 files changed, 6 insertions(+)

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..64291551fff6 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];
+
+	/* quirks, etc. */
+	bool keep_ctrl_on;
 };
 
 void msm_hdmi_set_mode(struct hdmi *hdmi, bool power_on);
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation



More information about the dri-devel mailing list