]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
drm/i915: don't write 0 to DIP control at HDMI init
authorPaulo Zanoni <paulo.r.zanoni@intel.com>
Mon, 28 May 2012 19:42:55 +0000 (16:42 -0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 30 May 2012 21:03:39 +0000 (23:03 +0200)
At this time, the HDMI port is enabled, and the DIP control register
specification says we need to disable the port *before* disabling the
DIPs. Also, while doing this we risk telling the HW to send the AVI
DIPs once (not every VSync), which really seems to confuse the HW and
trigger bugs where the DIPs are not sent.

This code was here just to set the DIP register to a 'known state'
before using it, but since now the set_infoframes functions already
set the control registers to a known state, this code can go away.

Also, the previous code disables *all* the DIP registers for *each*
HDMI port, so we end disabling each DIP register more than once.

This patch solves a problem I can reproduce on my IVB machine. When I
boot it with just a single HDMI monitor, the AVI InfoFrames are not
sent. With this patch, the InfoFrames are sent. Previously, I wrote a
patch to 'touch the DIP registers after we enable the HDMI port' to
solve this same problem, but that patch doesn't seem to be needed
anymore after this patch.

All this patch does is revert a chunk of the following commit:

    commit 64a8fc0145a1d0fdc25fc9367c2e6c621955fb3b
    Author: Jesse Barnes <jbarnes@virtuousgeek.org>
    Date:   Thu Sep 22 11:16:00 2011 +0530

        drm/i915: fix ILK+ infoframe support

So bugs that can be bisected to that commit may be fixed now.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=43256
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_hdmi.c

index c858da986fdd2f5a4da9f10dd9806de29996c3ba..65af12ee98b18a0d21a1a687cc25d1a8eaa50ff2 100644 (file)
@@ -816,7 +816,6 @@ void intel_hdmi_init(struct drm_device *dev, int sdvox_reg)
        struct intel_encoder *intel_encoder;
        struct intel_connector *intel_connector;
        struct intel_hdmi *intel_hdmi;
-       int i;
 
        intel_hdmi = kzalloc(sizeof(struct intel_hdmi), GFP_KERNEL);
        if (!intel_hdmi)
@@ -894,30 +893,21 @@ void intel_hdmi_init(struct drm_device *dev, int sdvox_reg)
        if (!HAS_PCH_SPLIT(dev)) {
                intel_hdmi->write_infoframe = g4x_write_infoframe;
                intel_hdmi->set_infoframes = g4x_set_infoframes;
-               I915_WRITE(VIDEO_DIP_CTL, 0);
        } else if (IS_VALLEYVIEW(dev)) {
                intel_hdmi->write_infoframe = vlv_write_infoframe;
                intel_hdmi->set_infoframes = vlv_set_infoframes;
-               for_each_pipe(i)
-                       I915_WRITE(VLV_TVIDEO_DIP_CTL(i), 0);
        } else if (IS_HASWELL(dev)) {
                /* FIXME: Haswell has a new set of DIP frame registers, but we are
                 * just doing the minimal required for HDMI to work at this stage.
                 */
                intel_hdmi->write_infoframe = hsw_write_infoframe;
                intel_hdmi->set_infoframes = hsw_set_infoframes;
-               for_each_pipe(i)
-                       I915_WRITE(HSW_TVIDEO_DIP_CTL(i), 0);
        } else if (HAS_PCH_IBX(dev)) {
                intel_hdmi->write_infoframe = ibx_write_infoframe;
                intel_hdmi->set_infoframes = ibx_set_infoframes;
-               for_each_pipe(i)
-                       I915_WRITE(TVIDEO_DIP_CTL(i), 0);
        } else {
                intel_hdmi->write_infoframe = cpt_write_infoframe;
                intel_hdmi->set_infoframes = cpt_set_infoframes;
-               for_each_pipe(i)
-                       I915_WRITE(TVIDEO_DIP_CTL(i), 0);
        }
 
        if (IS_HASWELL(dev))