1. 24 10月, 2012 3 次提交
    • D
      drm/i915/eDP: compute the panel power clock divisor from the pch rawclock · d2acd215
      Daniel Vetter 提交于
      We need this when the bios forgets even to set that bit up. Most seem
      to do that, even when they don't set up anything else in the panel
      power sequencer.
      
      Note that on IBX the rawclk is variable according to Bspec, but
      everyone is using 125MHz. The rawclk is fixed to 125MHz on CPT, but
      luckily we still have the same register available. On hsw, different
      variants have different clocks, hence we need to check the register.
      
      Since other pieces are driven by the rawclock, too, keep the little
      helper in a central place.
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Tested-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      d2acd215
    • D
      drm/i915: enable/disable backlight for eDP · 035aa3de
      Daniel Vetter 提交于
      Like we already do for the LVDS panels. This seems to help greatly
      in setting up the backlight, since the BIOS might refuse to cooperate.
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Tested-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      
      v2: Move the backlight_off call from panel_off to edp_backlight_off,
      noticed by Paulo Zanoni.
      Reviewed-by: NPaulo Zanoni <przanoni@gmail.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      035aa3de
    • D
      drm/i915: make edp panel power sequence setup more robust · 82ed61fa
      Daniel Vetter 提交于
      3 changes:
      - If a given value is unset, use the maximal limits from the eDP spec.
      - Write back the new values, since otherwise the panel power sequencing
        hw will not dtrt.
      - Revert the early bail-out in case the register values are unset.
      
      The last change reverts
      
      commit bfa3384a
      Author: Jesse Barnes <jbarnes@virtuousgeek.org>
      Date:   Tue Apr 10 11:58:04 2012 -0700
      
          drm/i915: check PPS regs for sanity when using eDP
      
      v2:
      - Unlock the PP regs as the very first thing. This is a required w/a
        for cpu eDP on port A, and generally a good idea.
      - Fixup the panel power control port selection bits.
      
      v3: Paulo Zanoni noticed that I've fumbled the computation of the spec
      limit values. Fix them up. We've also noticed that the t8/t9 values in
      the vbt/bios-programmed pp are much larger than any limits. My guess
      is that this is to conceal any backlight enable/disable delays. So by
      using the much shorter limits from the spec, which only concerns the
      sink, we risk that we might display before the backlight is fully on,
      or disable the output while the backlight still has afterglow. I've
      figured I don't care too much, since this will only happen when both
      the pp regs are not programmed, and the vbt tables don't contain
      anything useful.
      
      v4: Don't set the port selection bits on hsw/LPT, they don't exist any
      more.
      
      v5: Fixup spelling issues in comments, as noticed by Jesse Barnes.
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Tested-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      82ed61fa
  2. 23 10月, 2012 13 次提交
  3. 19 10月, 2012 5 次提交
  4. 18 10月, 2012 3 次提交
  5. 12 10月, 2012 1 次提交
  6. 04 10月, 2012 1 次提交
  7. 03 10月, 2012 5 次提交
  8. 28 9月, 2012 3 次提交
  9. 26 9月, 2012 3 次提交
  10. 20 9月, 2012 3 次提交
    • D
      drm/i915: rip out edp special case from dp_link_down · b6f69c9a
      Daniel Vetter 提交于
      This has been tons of fun to figure out with git blame. The first
      notion of this code block goes back to the original cpu edp enabling
      for ilk in
      
      commit 32f9d658
      Author: Zhenyu Wang <zhenyuw@linux.intel.com>
      Date:   Fri Jul 24 01:00:32 2009 +0800
      
          drm/i915: Add eDP support on IGDNG mobile chip
      
      Two things are notable in this commit wrt to the this edp special
      case:
      - The IS_eDP check _only_ fires for DP A, i.e. cpu edp ports.
      - The cpu edp port is disabled at the top of the dp_link_down function.
      
      My theory is that these hacks was added to work around the completely
      different modeset sequence for cpu edp ports compared to pch edp
      ports. With the cpu edp confusion on ilk (and snb/ivb) now fixed up,
      this shouldn't be required any more.
      
      The really interesting question is how this special cases survived
      this long in the code. The first step is declaring the pch port D as
      eDP if it's used for an internal panel:
      
      commit b329530c
      Author: Adam Jackson <ajax@redhat.com>
      Date:   Fri Jul 16 14:46:28 2010 -0400
      
          drm/i915/dp: Correctly report eDP in the core connector type
      
      This commit unfortunately failed to notice that not all edp ports are
      created equal. Then follow a flurry of refactorings, culminating in a
      patch from Keith Packard which resulted in the current logic (by
      making it "correct" for all platforms that have edp):
      
      commit 417e822d
      Author: Keith Packard <keithp@keithp.com>
      Date:   Tue Nov 1 19:54:11 2011 -0700
      
          drm/i915: Treat PCH eDP like DP in most places
      
      None of these cleanups or refactorings supply any reason why we need
      this code, they've simply carried it on as-is.
      
      Hence presume it might be harmful with the current code and rip it
      out. We do rewrite the link training bits completely anyway when
      re-training the link.
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      b6f69c9a
    • D
      drm/i915: disable the cpu edp port after the cpu pipe · 3739850b
      Daniel Vetter 提交于
      See bspec, Vol3 Part2, Section 1.1.3 "Display Mode Set Sequence". This
      applies to all platforms where we currently support eDP on, i.e. ilk,
      snb & ivb.
      
      Without this change we fail to light up the eDP port on previously
      unused crtcs (likely because something is stuck on the old pipe), and
      we also fail to properly disable the old pipe (i.e. bit 30 in the
      PIPECONF register is stuck as set until the next reboot).
      
      v2: Rebased on top of the edp panel off sequence changes in 3.6-rc2.
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=44001Signed-Off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      3739850b
    • D
      drm/i915: rip out dp port enabling cludges^Wchecks · 0c33d8d7
      Daniel Vetter 提交于
      These have been added because dp links are fiddle things and don't
      like it when we try to re-train an enabled output (or disable a
      disabled output harder). And because the crtc helper code is
      ridiculously bad add tracking the modeset state.
      
      But with the new code in place it is simply a bug to disable a disabled
      encoder or to enable an enabled encoder again. Hence convert these to
      WARNs (and bail out for safety), but flatten all conditionals in the
      code itself.
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-Off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      0c33d8d7