From: Archit Taneja <architt@codeaurora.org>
To: robdclark@gmail.com
Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
Archit Taneja <architt@codeaurora.org>
Subject: [PATCH 05/13] drm/msm/hdmi: Fix connector detect when there is no hpd gpio
Date: Thu, 21 Jan 2016 12:39:33 +0530 [thread overview]
Message-ID: <1453360181-31738-6-git-send-email-architt@codeaurora.org> (raw)
In-Reply-To: <1453360181-31738-1-git-send-email-architt@codeaurora.org>
Some platforms may not have a hpd gpio line to detect hpd. 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 9d17310f..d2e818e2 100644
--- a/drivers/gpu/drm/msm/hdmi/hdmi_connector.c
+++ b/drivers/gpu/drm/msm/hdmi/hdmi_connector.c
@@ -300,9 +300,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
next prev parent reply other threads:[~2016-01-21 7:10 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-21 7:09 [PATCH 00/13] drm/msm/hdmi: HDMI support on MSM8996 Archit Taneja
2016-01-21 7:09 ` [PATCH 01/13] drm/msm/dsi: Create separate Makefile/Kconfig Archit Taneja
2016-01-21 7:09 ` [PATCH 02/13] drm/msm/hdmi: " Archit Taneja
2016-01-21 7:09 ` [PATCH 03/13] drm/msm/edp: " Archit Taneja
2016-01-21 7:09 ` [PATCH 04/13] drm/msm/hdmi: Clean up connector gpio usage Archit Taneja
2016-01-21 7:09 ` Archit Taneja [this message]
2016-01-21 7:09 ` [PATCH 06/13] drm/msm/hdmi: Update generated headers to split PHY/PLL offsets Archit Taneja
2016-01-21 7:09 ` [PATCH 07/13] drm/msm/hdmi: Create a separate hdmi phy driver Archit Taneja
2016-01-21 7:09 ` [PATCH 08/13] drm/msm/hdmi: Make hdmi core get its phy Archit Taneja
2016-01-21 7:09 ` [PATCH 09/13] drm/msm/hdmi: Manage hdmi PLL through phy driver Archit Taneja
2016-01-21 7:09 ` [PATCH 10/13] drm/msm/hdmi: Convert phy files according to new design Archit Taneja
2016-01-21 7:09 ` [PATCH 11/13] drm/msm/hdmi: Update generated headers for hdmi 8996 phy Archit Taneja
2016-01-21 7:09 ` [PATCH 12/13] drm/msm/hdmi: HDMI 8996 PHY/PLL support Archit Taneja
2016-01-21 7:09 ` [PATCH 13/13] dt/bindings: drm/msm/hdmi: Add hdmi phy bindings Archit Taneja
2016-01-21 23:26 ` Rob Herring
2016-01-25 7:40 ` 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=1453360181-31738-6-git-send-email-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.