1. 28 9月, 2012 2 次提交
  2. 26 9月, 2012 3 次提交
  3. 20 9月, 2012 6 次提交
    • 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
    • D
      drm/i915: robustify edp_pll_on/off · 0767935e
      Daniel Vetter 提交于
      With the previous patch to clean up where exactly these two functions
      are getting called, this patch can tackle the enable/disable code
      itself:
      
      - WARN if the port enable bit is in the wrong state or if the edp pll
        bit is in the wrong state, just for paranoia's sake.
      - Don't disable the edp pll harder in the modeset functions just for
        fun.
      - Don't set the edp pll enable flag in intel_dp->DP in modeset, do
        that while changing the actual hw state. We do the same with the
        actual port enable bit, so this is a bit more consistent.
      - Track the current DP register value when setting things up and add
        some comments how intel_dp->DP is used in the disable code.
      
      v2: Be more careful with resetting intel_dp->DP - otherwise dpms
      off->on will fail spectacularly, becuase we enable the eDP port when
      we should only enable the eDP pll.
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-Off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      0767935e
    • D
      drm/i915: clean up the cpu edp pll special case · 2bd2ad64
      Daniel Vetter 提交于
      By using the new pre_enable/post_disable functions.
      
      To ensure that we only frob the cpu edp pll while the pipe is off add
      the relevant asserts. Thanks to the new output state staging, this is
      now really easy.
      
      With this fixed we can now finally rip out the special-case handling
      in the dp dpms code and replace it by the common intel_connector_dpms.
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      2bd2ad64
    • D
      drm/i915: rip out early dp port write for gm45/ilk · fba92150
      Daniel Vetter 提交于
      It's bogus.
      
      If I've followed the history of this piece of code correctly, i.e. the
      initial register write with the following vblank wait, this goes all
      the way back to the original enabling of DP support in
      
      commit a4fc5ed6
      Author: Keith Packard <keithp@keithp.com>
      Date:   Tue Apr 7 16:16:42 2009 -0700
      
          drm/i915: Add Display Port support
      
      Unfortunately it seems to be nothing more than glorified duct-tape and
      sometimes actively harmful. Adam Jackson noticed this for CPT
      platforms with
      
      commit e8519464
      Author: Adam Jackson <ajax@redhat.com>
      Date:   Thu Jul 21 17:48:38 2011 -0400
      
          drm/i915/dp: Don't turn CPT DP ports on too early
      
      Unfortunately this kept the code around for ilk and gm45.
      
      The specific failure case I'm seeing here is that after a dpms off/on
      cycle we have the bits from the last link training (hopefully
      successful link training) set in intel_dp->DP. This is requiered so
      that complete_link_train can enable the port with the right tuning
      values.
      
      Unfortunately writing these again to the disabled port at dpms on time
      kills the port somehow until it's disabled - dp link training fails in
      an endless loop without this patch on my mobile ilk and gm45.
      
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Tested-by: NChris Wilson <chris@chris-wilson.co.uk>
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=51493Signed-Off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      fba92150
  4. 06 9月, 2012 8 次提交
  5. 03 9月, 2012 1 次提交
  6. 24 8月, 2012 1 次提交
  7. 21 8月, 2012 1 次提交
    • X
      drm/i915: fix reassignment of variable "intel_dp->DP" · de9932d1
      Xu, Anhua 提交于
      In intel_dp_mode_set we OR in the exact same bits twice at the same
      spot. Kill one of the redundant assignments.
      
      This little regression was introduced by:
      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
      
      	PCH eDP has many of the same needs as regular PCH DP connections,
      	including the DP_CTl bit settings, the TRANS_DP_CTL register.
      
      The reachable tag for this commit is: v3.1-5461-g417e822dSigned-off-by: NAnhua Xu <anhua.xu@intel.com>
      [danvet: Improved the commit message somewhat and ensured the diff is
      clearer.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      de9932d1
  8. 14 8月, 2012 1 次提交
    • D
      drm/i915: reorder edp disabling to fix ivb MacBook Air · 35a38556
      Daniel Vetter 提交于
      eDP is tons of fun. It turns out that at least the new MacBook Air 5,1
      model absolutely doesn't like the new force vdd dance we've introduced
      in
      
      commit 6cb49835
      Author: Daniel Vetter <daniel.vetter@ffwll.ch>
      Date:   Sun May 20 17:14:50 2012 +0200
      
          drm/i915: enable vdd when switching off the eDP panel
      
      But that patch also tried to fix some neat edp sequence issue with the
      force_vdd timings. Closer inspection reveals that we've raised
      force_vdd only to do the aux channel communication dp_sink_dpms. If we
      move the edp_panel_off below that, we don't need any force_vdd for the
      disable sequence, which makes the Air happy.
      
      Unfortunately the reporter of the original bug that the above commit
      fixed is travelling, so we can't test whether this regresses things.
      But my theory is that since we don't check for any power-off ->
      force_vdd-on delays in edp_panel_vdd_on, this was the actual
      root-cause of this failure. With that force_vdd dance completely
      eliminated, I'm hopeful the original bug stays fixed, too.
      
      For reference the old bug, which hopefully doesn't get broken by this:
      
      https://bugzilla.kernel.org/show_bug.cgi?id=43163
      
      In any case, regression fixers win over plain bugfixes, so this needs
      to go in asap.
      
      v2: The crucial pieces seems to be to clear the force_vdd flag
      uncoditionally, too, in edp_panel_off. Looks like this is left behind
      by the firmware somehow.
      
      v3: The Apple firmware seems to switch off the panel on it's own, hence
      we still need to keep force_vdd on, but properly clear it when switching
      the panel off.
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=45671Tested-by: NRoberto Romer <sildurin@gmail.com>
      Tested-by: NDaniel Wagner <wagi@monom.org>
      Tested-by: NKeith Packard <keithp@keithp.com>
      Cc: stable@vger.kernel.org
      Cc: Keith Packard <keithp@keithp.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      35a38556
  9. 26 7月, 2012 4 次提交
    • P
      drm/i915: add port field to struct intel_dp and use it · ab9d7c30
      Paulo Zanoni 提交于
      This will be needed for Haswell, but already has its uses here.
      
      This patch started as a small patch written patch by Shobhit Kumar,
      but it has changed so much that none of its original lines remain.
      
      Credits-to: Shobhit Kumar <shobhit.kumar@intel.com>
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      ab9d7c30
    • P
      drm/i915: move common code to intel_dp_set_link_train · 47ea7542
      Paulo Zanoni 提交于
      We have some common code that we always run before calling
      intel_dp_set_link_train. This common code sets the correct training
      patterns to the DP variable. If we add more calls to
      intel_dp_set_link_train, we'll also have to duplicate this common
      code. So instead of repeating this code whenever we call
      intel_dp_set_link_train, we move the code to inside the function: now
      we check which training pattern we're going to set and then we set the
      DP register according to it.
      
      One of the side-effects of this change is that now we never forget to
      mask the training pattern bits before changing them. It looks like
      this was working before because we were first masking the bits, then
      writing 00, 01 and then 11.
      
      This patch also enables us to use the intel_dp_set_link_train function
      when disabling link training: in this case we need to avoid writing
      the DP_TRAINING_LANE*_SET AUX commands.
      
      As a bonus, the big intel_dp_{start,complete}_link_train functions
      will get smaller and a little bit easier to read.
      
      Version 2 changes:
       - Rewrite commit message.
       - Also clear the training pattern bits before changing them.
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      47ea7542
    • D
      drm/i915: simplify possible_clones computation · 66a9278e
      Daniel Vetter 提交于
      Intel hw only has one MUX for encoders, so outputs are either not
      cloneable or all in the same group of cloneable outputs. This neatly
      simplifies the code and allows us to ditch some ugly if cascades in
      the dp and hdmi init code (well, we need these if cascades for other
      stuff still, but that can be taken care of in follow-up patches).
      
      Note that this changes two things:
      - dvo can now be cloned with sdvo, but dvo is gen2 whereas sdvo is
        gen3+, so no problem. Note that the old code had a bug and didn't
        allow cloning crt with dvo (but only the other way round).
      - sdvo-lvds can now be cloned with sdvo-non-tv. Spec says this won't
        work, but the only reason I've found is that you can't use the
        panel-fitter (used for lvds upscaling) with anything else. But we
        don't use the panel fitter for sdvo-lvds. Imo this part of Bspec is
        a) rather confusing b) mostly as a guideline to implementors (i.e.
        explicitly stating what is already implicit from the spec, without
        always going into the details of why). So I think we can ignore this
        - worst case we'll get a bug report from a user with with sdvo-lvds
        and sdvo-tmds and have to add that special case back in.
      
      Because sdvo lvds is a bit special explain in comments why sdvo LVDS
      outputs can be cloned, but native LVDS and eDP can't be cloned - we
      use the panel fitter for the later, but not for sdvo.
      
      Note that this also uncoditionally initializes the panel_vdd work used
      by eDP. Trying to be clever doesn't buy us anything (but strange bugs)
      and this way we can kill the is_edp check.
      
      v2: Incorporate review from Paulo
      - Add in a missing space.
      - Pimp comment message to address his concerns.
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-Off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      66a9278e
    • S
      drm/i915: Move DP structs to shared location · 54d63ca6
      Shobhit Kumar 提交于
      Move the DP structure to shared location so that it can be used from
      within the ddi module.
      
      Changes from Paulo:
      - Move less code to intel_drv.h
      - Remove #include statement
      - Replace a tab with a space in train_set
      Signed-off-by: NShobhit Kumar <shobhit.kumar@intel.com>
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      54d63ca6
  10. 20 7月, 2012 2 次提交
  11. 05 7月, 2012 2 次提交
  12. 16 6月, 2012 3 次提交
  13. 05 6月, 2012 3 次提交
  14. 02 6月, 2012 1 次提交
  15. 24 5月, 2012 2 次提交