From: Jose Abreu <Jose.Abreu@synopsys.com>
To: dri-devel@lists.freedesktop.org
Cc: Jose Abreu <Jose.Abreu@synopsys.com>,
Carlos Palminha <CARLOS.PALMINHA@synopsys.com>,
Archit Taneja <architt@codeaurora.org>,
David Airlie <airlied@linux.ie>,
Russell King <rmk+kernel@arm.linux.org.uk>,
Fabio Estevam <fabio.estevam@freescale.com>,
Daniel Vetter <daniel.vetter@ffwll.ch>,
Takashi Iwai <tiwai@suse.de>,
Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>,
Thierry Reding <treding@nvidia.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH 2/3 v3] drm: bridge/dw-hdmi: Enable ISCR1, ISCR2 and ACP packets
Date: Thu, 4 Aug 2016 11:44:50 +0100 [thread overview]
Message-ID: <24dfd753e075c70d7b9b429b2d5f42ce9b1562a1.1470306826.git.joabreu@synopsys.com> (raw)
In-Reply-To: <cover.1470306826.git.joabreu@synopsys.com>
In-Reply-To: <cover.1470306826.git.joabreu@synopsys.com>
Currently ISCR and ACP packets are not being sent causing
HDMI compliance tests like CTS 7-19 HDMI 1.4b to fail.
With this pacth the mentioned packets are activated when
needed.
Verified using HDMI compliance equipment.
Signed-off-by: Jose Abreu <joabreu@synopsys.com>
Cc: Carlos Palminha <palminha@synopsys.com>
Cc: Archit Taneja <architt@codeaurora.org>
Cc: David Airlie <airlied@linux.ie>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Cc: Thierry Reding <treding@nvidia.com>
Cc: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
---
This patch was only introduced in v3.
drivers/gpu/drm/bridge/dw-hdmi.c | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/drivers/gpu/drm/bridge/dw-hdmi.c b/drivers/gpu/drm/bridge/dw-hdmi.c
index b5fac27..9122a20 100644
--- a/drivers/gpu/drm/bridge/dw-hdmi.c
+++ b/drivers/gpu/drm/bridge/dw-hdmi.c
@@ -127,6 +127,7 @@ struct dw_hdmi {
void __iomem *regs;
bool sink_is_hdmi;
bool sink_has_audio;
+ bool sink_supports_ai;
struct mutex mutex; /* for state below and previous_mode */
enum drm_connector_force force; /* mutex-protected force state */
@@ -216,6 +217,21 @@ static void hdmi_set_cts_n(struct dw_hdmi *hdmi, unsigned int cts,
hdmi_writeb(hdmi, (n >> 8) & 0xff, HDMI_AUD_N2);
hdmi_writeb(hdmi, n & 0xff, HDMI_AUD_N1);
+ /* Set ISCR1, ISCR2, and ACP packets to automatic scheduling */
+ if (hdmi->sink_supports_ai) {
+ dev_dbg(hdmi->dev, "sink supports AI packets\n");
+ hdmi_writeb(hdmi, 0x06, HDMI_FC_ISCR1_0);
+ hdmi_writeb(hdmi, 0x03, HDMI_FC_DATAUTO0);
+ hdmi_writeb(hdmi, 0x01, HDMI_FC_DATAUTO1);
+ hdmi_writeb(hdmi, 0x11, HDMI_FC_DATAUTO2);
+ } else {
+ dev_dbg(hdmi->dev, "sink does not support AI packets\n");
+ hdmi_writeb(hdmi, 0x00, HDMI_FC_ISCR1_0);
+ hdmi_writeb(hdmi, 0x00, HDMI_FC_DATAUTO0);
+ hdmi_writeb(hdmi, 0x00, HDMI_FC_DATAUTO1);
+ hdmi_writeb(hdmi, 0x00, HDMI_FC_DATAUTO2);
+ }
+
/* Set Frame Composer Audio Sample sampling frequency */
if (hdmi->dev_type == DWC_HDMI) {
u8 val = 0x0;
@@ -1474,8 +1490,13 @@ static int dw_hdmi_connector_get_modes(struct drm_connector *connector)
/* Store the ELD */
drm_edid_to_eld(connector, edid);
kfree(edid);
+
+ hdmi->sink_supports_ai = connector->eld[5] & (0x1 << 1);
} else {
dev_dbg(hdmi->dev, "failed to get edid\n");
+ hdmi->sink_is_hdmi = false;
+ hdmi->sink_has_audio = false;
+ hdmi->sink_supports_ai = false;
}
return ret;
--
2.1.4
next prev parent reply other threads:[~2016-08-04 10:46 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-04 10:44 [PATCH 0/3 v3] drm: bridge/dw-hdmi: Fixes for dw-hdmi and DWC support Jose Abreu
2016-08-04 10:44 ` [PATCH 1/3 v3] drm: bridge/dw-hdmi: Add support for DWC Phy Jose Abreu
2016-08-04 10:44 ` Jose Abreu [this message]
2016-08-04 15:32 ` [PATCH 2/3 v3] drm: bridge/dw-hdmi: Enable ISCR1, ISCR2 and ACP packets Russell King - ARM Linux
2016-08-04 16:18 ` Jose Abreu
2016-08-04 10:44 ` [PATCH 3/3 v3] drm: bridge/dw-hdmi: Move edid reading to .detect() callback Jose Abreu
2016-08-04 10:47 ` Russell King - ARM Linux
2016-08-04 13:58 ` Jose Abreu
2016-08-04 14:31 ` Russell King - ARM Linux
2016-08-04 14:57 ` Jose Abreu
2016-08-04 15:04 ` Russell King - ARM Linux
2016-08-04 17:13 ` Jose Abreu
2016-08-04 23:01 ` Russell King - ARM Linux
2016-08-05 8:06 ` Daniel Vetter
2016-08-05 8:13 ` Chris Wilson
2016-08-08 16:25 ` Jose Abreu
2016-08-09 6:09 ` Daniel Vetter
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=24dfd753e075c70d7b9b429b2d5f42ce9b1562a1.1470306826.git.joabreu@synopsys.com \
--to=jose.abreu@synopsys.com \
--cc=CARLOS.PALMINHA@synopsys.com \
--cc=airlied@linux.ie \
--cc=architt@codeaurora.org \
--cc=daniel.vetter@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=fabio.estevam@freescale.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rmk+kernel@arm.linux.org.uk \
--cc=tiwai@suse.de \
--cc=treding@nvidia.com \
--cc=vladimir_zapolskiy@mentor.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
all inboxes | Powered by JetHome®