linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Archit Taneja <architt@codeaurora.org>
To: robdclark@gmail.com
Cc: dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org,
	Archit Taneja <architt@codeaurora.org>
Subject: [PATCH 1/6] drm/msm/hdmi: Keep the HDMI_CTRL_ENABLE bitfield always on for 8x96
Date: Fri, 27 Oct 2017 16:27:27 +0530	[thread overview]
Message-ID: <20171027105732.19235-2-architt@codeaurora.org> (raw)
In-Reply-To: <20171027105732.19235-1-architt@codeaurora.org>

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@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

  reply	other threads:[~2017-10-27 10:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-27 10:57 [PATCH 0/6] drm/msm: Misc fixes and improvements Archit Taneja
2017-10-27 10:57 ` Archit Taneja [this message]
2017-10-27 10:57 ` [PATCH 2/6] drm/msm/hdmi: Switch to DRM_CONNECTOR_POLL_HPD Archit Taneja
2017-10-27 10:57 ` [PATCH 3/6] drm/msm/mdp5: Prepare mdp5_pipe_assign for some rework Archit Taneja
2017-10-27 10:57 ` [PATCH 4/6] drm/msm/mdp5: Update mdp5_pipe_assign to spit out both planes Archit Taneja
2017-10-27 10:57 ` [PATCH 5/6] drm/msm/mdp5: mdp5_crtc: Restore cursor state only if LM cursors are enabled Archit Taneja
2017-10-27 10:57 ` [PATCH 6/6] drm/msm/mdp5: Don't use async plane update path if plane visibility changes Archit Taneja
2017-11-01 11:26   ` Gustavo Padovan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171027105732.19235-2-architt@codeaurora.org \
    --to=architt@codeaurora.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=robdclark@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).