]> git.karo-electronics.de Git - linux-beck.git/commitdiff
drm/i915: set the DIP port on ibx_write_infoframe
authorPaulo Zanoni <paulo.r.zanoni@intel.com>
Fri, 4 May 2012 20:18:26 +0000 (17:18 -0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 8 May 2012 12:26:45 +0000 (14:26 +0200)
Just like Gen 4, IBX has a "Port Select" field on the DIP register,
but the ports are different.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_reg.h
drivers/gpu/drm/i915/intel_hdmi.c

index ce6e64dd00ff79a5cef0b180a108243a7ece9b07..4a97db25cd348ef749907d62ee06c676f601e057 100644 (file)
 #define   VIDEO_DIP_ENABLE             (1 << 31)
 #define   VIDEO_DIP_PORT_B             (1 << 29)
 #define   VIDEO_DIP_PORT_C             (2 << 29)
+#define   VIDEO_DIP_PORT_D             (3 << 29)
 #define   VIDEO_DIP_PORT_MASK          (3 << 29)
 #define   VIDEO_DIP_ENABLE_AVI         (1 << 21)
 #define   VIDEO_DIP_ENABLE_VENDOR      (2 << 21)
index 539073ec56bd63ddb609eebdf850387383e93ce4..9902904de2ce7af9151ef710e859fa302e71590a 100644 (file)
@@ -178,10 +178,26 @@ static void ibx_write_infoframe(struct drm_encoder *encoder,
        struct drm_i915_private *dev_priv = dev->dev_private;
        struct drm_crtc *crtc = encoder->crtc;
        struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
+       struct intel_hdmi *intel_hdmi = enc_to_intel_hdmi(encoder);
        int reg = TVIDEO_DIP_CTL(intel_crtc->pipe);
        unsigned i, len = DIP_HEADER_SIZE + frame->len;
        u32 val = I915_READ(reg);
 
+       val &= ~VIDEO_DIP_PORT_MASK;
+       switch (intel_hdmi->sdvox_reg) {
+       case HDMIB:
+               val |= VIDEO_DIP_PORT_B;
+               break;
+       case HDMIC:
+               val |= VIDEO_DIP_PORT_C;
+               break;
+       case HDMID:
+               val |= VIDEO_DIP_PORT_D;
+               break;
+       default:
+               return;
+       }
+
        intel_wait_for_vblank(dev, intel_crtc->pipe);
 
        val &= ~(VIDEO_DIP_SELECT_MASK | 0xf); /* clear DIP data offset */