public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH 1/4] drm/i915/vlv: write the port field in the per-pipe DIP control reg
@ 2014-04-02 17:08 Jesse Barnes
  2014-04-02 17:08 ` [PATCH 2/4] drm/i915/vlv: disable AVI infoframe emission when writing infoframes Jesse Barnes
                   ` (4 more replies)
  0 siblings, 5 replies; 24+ messages in thread
From: Jesse Barnes @ 2014-04-02 17:08 UTC (permalink / raw)
  To: intel-gfx

In case we end up bouncing these around between ports.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
---
 drivers/gpu/drm/i915/intel_hdmi.c |   12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index b0413e1..ee892a4 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -557,10 +557,12 @@ static void vlv_set_infoframes(struct drm_encoder *encoder,
 			       struct drm_display_mode *adjusted_mode)
 {
 	struct drm_i915_private *dev_priv = encoder->dev->dev_private;
+	struct intel_digital_port *intel_dig_port = enc_to_dig_port(encoder);
 	struct intel_crtc *intel_crtc = to_intel_crtc(encoder->crtc);
 	struct intel_hdmi *intel_hdmi = enc_to_intel_hdmi(encoder);
 	u32 reg = VLV_TVIDEO_DIP_CTL(intel_crtc->pipe);
 	u32 val = I915_READ(reg);
+	u32 port = VIDEO_DIP_PORT(intel_dig_port->port);
 
 	assert_hdmi_port_disabled(intel_hdmi);
 
@@ -576,6 +578,16 @@ static void vlv_set_infoframes(struct drm_encoder *encoder,
 		return;
 	}
 
+	if (port != (val & VIDEO_DIP_PORT_MASK)) {
+		if (val & VIDEO_DIP_ENABLE) {
+			val &= ~VIDEO_DIP_ENABLE;
+			I915_WRITE(reg, val);
+			POSTING_READ(reg);
+		}
+		val &= ~VIDEO_DIP_PORT_MASK;
+		val |= port;
+	}
+
 	val |= VIDEO_DIP_ENABLE;
 	val &= ~(VIDEO_DIP_ENABLE_VENDOR | VIDEO_DIP_ENABLE_GAMUT |
 		 VIDEO_DIP_ENABLE_GCP);
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2014-04-09 12:48 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-02 17:08 [PATCH 1/4] drm/i915/vlv: write the port field in the per-pipe DIP control reg Jesse Barnes
2014-04-02 17:08 ` [PATCH 2/4] drm/i915/vlv: disable AVI infoframe emission when writing infoframes Jesse Barnes
2014-04-03 10:33   ` Ville Syrjälä
2014-04-02 17:08 ` [PATCH 3/4] drm/i915: enable HDMI mode on VLV when an HDMI sink is detected Jesse Barnes
2014-04-03 10:30   ` Ville Syrjälä
2014-04-02 17:08 ` [PATCH 4/4] drm/i915: move infoframe setting to after port enable Jesse Barnes
2014-04-03  7:41   ` Jani Nikula
2014-04-03 10:31   ` Ville Syrjälä
2014-04-03 15:19   ` Daniel Vetter
2014-04-03 16:49     ` Jesse Barnes
2014-04-03 20:55       ` Daniel Vetter
2014-04-03 21:00         ` Jesse Barnes
2014-04-04 21:11   ` Paulo Zanoni
2014-04-05 15:18     ` Daniel Vetter
2014-04-04 21:38   ` [PATCH] drm/i915: move infoframe setting to after pll enable v2 Jesse Barnes
2014-04-04 21:59     ` Paulo Zanoni
2014-04-04 22:12     ` Jesse Barnes
2014-04-05 15:21       ` Daniel Vetter
2014-04-05 18:51         ` Jesse Barnes
2014-04-05 18:51       ` [PATCH] drm/i915: move infoframe setting to after pll enable v3 Jesse Barnes
2014-04-07 12:54         ` Paulo Zanoni
2014-04-09 12:48           ` Daniel Vetter
2014-04-02 17:10 ` [PATCH 1/4] drm/i915/vlv: write the port field in the per-pipe DIP control reg Jesse Barnes
2014-04-04 19:25 ` Ville Syrjälä

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox