1. 06 9月, 2012 4 次提交
    • D
      drm/i915/dp: implement get_hw_state · 19d8fe15
      Daniel Vetter 提交于
      Also add some macros to make the pipe computation a bit easier.
      
      v2: I've mixed up the CPT and !CPT PORT_TO_PIPE macro variants ...
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      19d8fe15
    • D
      drm/i915: rip out encoder->prepare/commit · c9deac97
      Daniel Vetter 提交于
      With the new infrastructure we're doing this when enabling/disabling
      the entire display pipe.
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      c9deac97
    • D
      drm/i915: copy&paste drm_crtc_helper_set_mode · a6778b3c
      Daniel Vetter 提交于
      Together with the static helper functions drm_crtc_prepare_encoders
      and drm_encoder_disable (which will be simplified in the next patch,
      but for now are 1:1 copies). Again, no changes beside new names for
      these functions.
      
      Also call our new set_mode instead of the crtc helper one now in all
      the places we've done so far.
      
      v2: Call the function just intel_set_mode to better differentia it
      from intel_crtc_mode_set which really only does the ->mode_set step of
      the entire modeset sequence on one crtc. Whereas this function does
      the global change.
      Acked-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-Off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      a6778b3c
    • D
      drm/i915/dp: convert to encoder disable/enable · e8cb4558
      Daniel Vetter 提交于
      DP is the first encoder which isn't simple. As
      
      commit d240f20f
      Author: Jesse Barnes <jbarnes@virtuousgeek.org>
      Date:   Fri Aug 13 15:43:26 2010 -0700
      
          drm/i915: make sure eDP PLL is enabled at the right time
      
      discovered, we need to enable the eDP PLL for the cpu port _before_ we
      enable the pipes and planes. After a few more commits the current
      solution is to enable the PLL in the dp mode_set function (because
      this is the only encoder callback the crtc helper code calls before it
      calls the crtc's commit function).
      
      Now I suspect that we actually should enable/disable the entire cpu
      eDP port before/after planes, but thanks to how the crtc helper code
      assumes that you can disable an encoder without disabling it's crtc
      right away, this won't work.
      
      The result is that the current prepare/commit hooks don't touch the
      eDP PLL, but instead it get's frobbed in dp_mode_set and in the dp
      dpms function. Hence we need to keep things (at least for now)
      bug-for-bug compatible by using our own special dp dpms function and
      keep everything else more-or-less as-is (just using our own
      infrastrucutre now).
      
      This mess can only be cleaned up once we control the entire modeset
      sequence and can move things around freely.
      
      v2: Squash unsupported dpms modes to OFF at the beginning of the DP
      dpms function.
      
      v3: Need to set the dpms state to off in dp_disable, otherwise this
      breaks the newly added WARNs ...
      
      v4: Rebased against edp panel off sequence changes in 3.6-rc2
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-Off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      e8cb4558
  2. 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
  3. 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
  4. 20 7月, 2012 2 次提交
  5. 05 7月, 2012 2 次提交
  6. 16 6月, 2012 3 次提交
  7. 05 6月, 2012 3 次提交
  8. 02 6月, 2012 1 次提交
  9. 24 5月, 2012 2 次提交
  10. 22 5月, 2012 3 次提交
  11. 03 5月, 2012 2 次提交
  12. 17 4月, 2012 1 次提交
  13. 13 4月, 2012 1 次提交
  14. 11 4月, 2012 1 次提交
    • D
      drm/i915: properly compute dp dithering for user-created modes · c4867936
      Daniel Vetter 提交于
      We've only computed whether we need to fall back to 6bpc due to dp
      link bandwidth constrains in mode_valid, but not mode_fixup. Under
      various circumstances X likes to create new modes which then lack
      proper 6bpc flags (if required), resulting in mode_fixup failures and
      ultimately black screens.
      
      Chris Wilson pointed out that we still get things wrong for bpp > 24,
      but that should be fixed in another patch (and it'll be easier because
      this patch consolidates the logic).
      
      The likely culprit for this regression is
      
      commit 3d794f87238f74d80e78a7611c7fbde8a54c85c2
      Author: Keith Packard <keithp@keithp.com>
      Date:   Wed Jan 25 08:16:25 2012 -0800
      
          drm/i915: Force explicit bpp selection for intel_dp_link_required
      
      v2: Fix indentation and tune down the too bold claim that this should
      fix the world. Both noticed by Chris Wilson.
      
      v3: Try to really git add things.
      Reported-and-tested-by: NBrice Goglin <Brice.Goglin@ens-lyon.org>
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=48170
      Cc: stable@kernel.org
      Reviewed-by: NAdam Jackson <ajax@redhat.com>
      Signed-Off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      c4867936
  15. 28 2月, 2012 1 次提交
  16. 07 2月, 2012 1 次提交
  17. 17 1月, 2012 3 次提交
  18. 20 12月, 2011 1 次提交
  19. 17 12月, 2011 1 次提交
  20. 24 11月, 2011 1 次提交
  21. 17 11月, 2011 2 次提交