From: Archit Taneja <architt@codeaurora.org>
To: robdclark@gmail.com
Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
arnd@arndb.de
Subject: [PATCH v3 02/10] drm/msm/hdmi: Fix connector detect when there is no HPD gpio
Date: Thu, 25 Feb 2016 11:22:37 +0530 [thread overview]
Message-ID: <1456379565-15045-3-git-send-email-architt@codeaurora.org> (raw)
In-Reply-To: <1456379565-15045-1-git-send-email-architt@codeaurora.org>
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>
---
drivers/gpu/drm/msm/hdmi/hdmi_connector.c | 9 +++++++++
1 file changed, 9 insertions(+)
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);
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2016-02-25 5:52 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-25 5:52 [PATCH v3 00/10] drm/msm/hdmi: HDMI support on MSM8996 Archit Taneja
2016-02-25 5:52 ` [PATCH v3 01/10] drm/msm/hdmi: Clean up connector gpio usage Archit Taneja
2016-02-25 5:52 ` Archit Taneja [this message]
2016-02-25 5:52 ` [PATCH v3 03/10] drm/msm/hdmi: Create a separate HDMI PHY driver Archit Taneja
2016-02-25 5:52 ` [PATCH v3 04/10] drm/msm/hdmi: Manage HDMI PLL through " Archit Taneja
2016-02-25 5:52 ` [PATCH v3 05/10] drm/msm/hdmi: Make HDMI core get its PHY Archit Taneja
2016-02-25 5:52 ` [PATCH v3 06/10] drm/msm/hdmi: Convert PHY files according to new design Archit Taneja
2016-02-25 5:52 ` [PATCH v3 07/10] drm/msm/hdmi: Update generated headers to split PHY/PLL offsets Archit Taneja
2016-02-25 5:52 ` [PATCH v3 08/10] drm/msm/hdmi: Update generated headers for HDMI 8996 PHY Archit Taneja
2016-02-25 5:52 ` [PATCH v3 09/10] drm/msm/hdmi: HDMI 8996 PHY/PLL support Archit Taneja
2016-02-25 5:52 ` [PATCH v3 10/10] dt-bindings: msm/hdmi: Add HDMI PHY bindings Archit Taneja
2016-03-02 17:41 ` Rob Herring
2016-02-25 8:39 ` [PATCH v3 00/10] drm/msm/hdmi: HDMI support on MSM8996 Arnd Bergmann
2016-02-25 8:47 ` Archit Taneja
2016-02-25 9:03 ` Archit Taneja
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=1456379565-15045-3-git-send-email-architt@codeaurora.org \
--to=architt@codeaurora.org \
--cc=arnd@arndb.de \
--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).