Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1456322
| From | Jose Abreu <Jose.Abreu@synopsys.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 2/3 v3] drm: bridge/dw-hdmi: Enable ISCR1, ISCR2 and ACP packets |
| Date | 2016-08-04 12:50 +0200 |
| Message-ID | <s2onT-7Kf-5@gated-at.bofh.it> (permalink) |
| References | <s2onT-7Kf-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH 2/3 v3] drm: bridge/dw-hdmi: Enable ISCR1, ISCR2 and ACP packets Jose Abreu <Jose.Abreu@synopsys.com> - 2016-08-04 12:50 +0200
Re: [PATCH 2/3 v3] drm: bridge/dw-hdmi: Enable ISCR1, ISCR2 and ACP packets Russell King - ARM Linux <linux@armlinux.org.uk> - 2016-08-04 17:40 +0200
Re: [PATCH 2/3 v3] drm: bridge/dw-hdmi: Enable ISCR1, ISCR2 and ACP packets Jose Abreu <Jose.Abreu@synopsys.com> - 2016-08-04 18:20 +0200
csiph-web