1. 17 12月, 2012 2 次提交
  2. 14 12月, 2012 2 次提交
  3. 13 12月, 2012 1 次提交
    • D
      drm/i915: rework locking for intel_dpio|sbi_read|write · 09153000
      Daniel Vetter 提交于
      Spinning for up to 200 us with interrupts locked out is not good. So
      let's just spin (and even that seems to be excessive).
      
      And we don't call these functions from interrupt context, so this is
      not required. Besides that doing anything in interrupt contexts which
      might take a few hundred us is a no-go. So just convert the entire
      thing to a mutex. Also move the mutex-grabbing out of the read/write
      functions (add a WARN_ON(!is_locked)) instead) since all callers are
      nicely grouped together.
      
      Finally the real motivation for this change: Dont grab the modeset
      mutex in the dpio debugfs file, we don't need that consistency. And
      correctness of the dpio interface is ensured with the dpio_lock.
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      09153000
  4. 10 12月, 2012 1 次提交
  5. 06 12月, 2012 4 次提交
  6. 04 12月, 2012 1 次提交
    • D
      drm/i915: fixup sparse warnings · 1a240d4d
      Daniel Vetter 提交于
      - __iomem where there is none (I love how we mix these things up).
      - Use gfp_t instead of an other plain type.
      - Unconfuse one place about enum pipe vs enum transcoder - for the pch
        transcoder we actually use the pipe enum. Fixup the other cases
        where we assign the pipe to the cpu transcoder with explicit casts.
      - Declare the mch_lock properly in a header.
      
      There is still a decent mess in intel_bios.c about __iomem, but heck,
      this is x86 and we're allowed to do that.
      
      Makes-sparse-happy: Chris Wilson <chris@chris-wilson.co.uk>
      [danvet: Use a space after the cast consistently and fix up the
      newly-added cast in i915_irq.c to properly use __iomem.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      1a240d4d
  7. 01 12月, 2012 1 次提交
    • C
      drm/i915: Delay allocation of stolen space for FBC · 11be49eb
      Chris Wilson 提交于
      As FBC is commonly disabled due to limitations of the chipset upon
      output configurations, on many systems FBC is never enabled. For those
      systems, it is advantageous to make use of the stolen memory for other
      objects and so we defer allocation of the FBC chunk until we actually
      require it. This increases the likelihood of that allocation failing,
      but that in turns means that we are already taking advantage of the
      stolen memory!
      
      As well as delaying the allocation from driver initialisation until the
      first use of FBC, we also return the stolen block after we finish using
      it - allowing greater flexibility in our usage of stolen space. A side
      effect of this is that we can then attempt to allocate only the required
      amount of space (with a little slack to reduce reallocation rate and
      avoid fragmentation).
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      11be49eb
  8. 29 11月, 2012 9 次提交
  9. 22 11月, 2012 9 次提交
  10. 12 11月, 2012 10 次提交
    • C
      drm/i915: Update load-detect failure paths for modeset-rework · 0e8b3d3e
      Chris Wilson 提交于
      After the rework, intel_set_mode() became a little better behaved in
      restoring the current mode if we failed to apply the requested modeline.
      However, the failure path for load-detect would clobber the existing
      state, leading to an oops during BIOS takeover on older machines.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      0e8b3d3e
    • C
      drm/i915: Clear unused fields of mode for framebuffer creation · 0fed39bd
      Chris Wilson 提交于
      With the stricter checks introduced in
      commit ac911edae5960d7dccd9883f5fa5d25b591520de
      Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Date:   Wed Oct 31 17:50:19 2012 +0200
      
          drm/i915: Check the framebuffer offset
      
      (and friends), it became especially prudent to make sure that the
      additional fields inside the mode were cleared before attempting to
      create a framebuffer. In particular, the fb created for load detection
      failed to do so and hence failed.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      0fed39bd
    • P
      drm/i915: fix Haswell FDI link disable path · 1ad960f2
      Paulo Zanoni 提交于
      This covers the "Disable FDI" section from the CRT mode set sequence.
      This disables the FDI receiver and also the FDI pll.
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      1ad960f2
    • P
      drm/i915: fix Haswell FDI link training code · 04945641
      Paulo Zanoni 提交于
      This commit makes hsw_fdi_link_train responsible for implementing
      everything described in the "Enable and train FDI" section from the
      Hawell CRT mode set sequence documentation. We completely rewrite
      hsw_fdi_link_train to match the documentation and we also call it in
      the right place.
      
      This patch was initially sent as a series of tiny patches fixing every
      little problem of the function, but since there were too many patches
      fixing the same function it got a little difficult to get the "big
      picture" of how the function would be in the end, so here we amended
      all the patches into a single big patch fixing the whole function.
      
      Problems we fixed:
      
        1 - Train Haswell FDI at the right time.
      
          We need to train the FDI before enabling the pipes and planes, so
          we're moving the call from lpt_pch_enable to haswell_crtc_enable
          directly.
      
          We are also removing ironlake_fdi_pll_enable since the PLL
          enablement on Haswell is completely different and is also done
          during the link training steps.
      
        2 - Use the right FDI_RX_CTL register on Haswell
      
          There is only one PCH transcoder, so it's always _FDI_RXA_CTL.
          Using "pipe" here is wrong.
      
        3 - Don't rely on DDI_BUF_CTL previous values
      
          Just set the bits we want, everything else is zero. Also
          POSTING_READ the register before sleeping.
      
        4 - Program the FDI RX TUSIZE register on hsw_fdi_link_train
      
          According to the mode set sequence documentation, this is the
          right place. According to the FDI_RX_TUSIZE register description,
          this is the value we should set.
      
          Also remove the code that sets this register from the old
          location: lpt_pch_enable.
      
        5 - Properly program FDI_RX_MISC pwrdn lane values on HSW
      
        6 - Wait only 35us for the FDI link training
      
          First we wait 30us for the FDI receiver lane calibration, then we
          wait 5us for the FDI auto training time.
      
        7 - Remove an useless indentation level on hsw_fdi_link_train
      
          We already "break" when the link training succeeds.
      
        8 - Disable FDI_RX_ENABLE, not FDI_RX_PLL_ENABLE
      
          When we fail the training.
      
        9 - Change Haswell FDI link training error messages
      
          We shouldn't call DRM_ERROR when still looping through voltage
          levels since this is expected and not really a failure. So in this
          commit we adjust the error path to only DRM_ERROR when we really
          fail after trying everything.
      
          While at it, replace DRM_DEBUG_DRIVER with DRM_DEBUG_KMS since
          it's what we use everywhere.
      
        10 - Try each voltage twice at hsw_fdi_link_train
      
          Now with Daniel Vetter's suggestion to use "/2" instead of ">>1".
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      [danvet: Applied tiny bikesheds:
      - mention in comment that we test each voltage/emphasis level twice
      - realing arguments of the only untouched reg write, it spilled over
        the 80 char limit ...]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      04945641
    • J
    • D
      drm/i915: CPT+ pch transcoder workaround · 23670b32
      Daniel Vetter 提交于
      We need to set the timing override chicken bit after fdi link training
      has completed and before we enable the transcoder. We also have to
      clear that bit again after disabling the pch transcoder.
      
      See "Graphics BSpec: vol4g North Display Engine Registers [IVB],
      Display Mode Set Sequence" and "Graphics BSpec: vol4h South Display
      Engine Registers [CPT, PPT], South Display Engine Transcoder and FDI
      Control, Transcoder Debug and DFT, TRANS_CHICKEN_2" bit 31:
      
      "Workaround : Enable the override prior to enabling the transcoder.
      Disable the override after disabling the transcoder."
      
      While at it, use the _PIPE macro for the other TRANS_DP register.
      
      v2: Keep the w/a as-is, but kill the original (but wrongly placed)
      workaround introduced in
      
      commit 3bcf603f
      Author: Jesse Barnes <jbarnes@virtuousgeek.org>
      Date:   Wed Jul 27 11:51:40 2011 -0700
      
          drm/i915: apply timing generator bug workaround on CPT and PPT
      
      and
      
      commit d4270e57
      Author: Jesse Barnes <jbarnes@virtuousgeek.org>
      Date:   Tue Oct 11 10:43:02 2011 -0700
      
          drm/i915: export a CPT mode set verification function
      
      Note that this old code has unconditionally set the w/a, which might
      explain why fdi link training sometimes silently fails, and especially
      why the auto-train did not seem to work properly.
      
      v3: Paulo Zanoni pointed out that this workaround is also required on
      the LPT PCH. And Arthur Ranyan confirmed that this workaround is
      requierd for all ports on the pch, not just DP: The important part
      is that the bit is set whenever the pch transcoder is enabled, and
      that it is _not_ set while the fdi link is trained. It is also
      important that the pch transcoder is fully disabled, i.e. we have to
      wait for bit 30 to clear before clearing the w/a bit.
      
      Hence move to workaround into enable/disable_transcoder, where the pch
      transcoder gets enabled/disabled.
      
      v4: Whitespace changes dropped.
      
      v5: Don't run the w/a on IBX, we only need it on CPT/PPT and LPT.
      
      v6:
      - resolve conflicts with Paulo's big hsw vga rework
      - s/!IBX/CPT since hsw paths are now all separate, and Paulo's patch
        to implement the equivalent w/a for LPT is already merged.
      
      Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
      Cc: Paulo Zanoni <przanoni@gmail.com>
      Cc: Arthur Ranyan <arthur.j.runyan@intel.com>
      Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com> (v5)
      Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> (v5)
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      23670b32
    • D
      drm/i915: drop unnecessary check from fdi_link_train code · 8f5718a6
      Daniel Vetter 提交于
      They are all written for a specific north disaplay->pch combination.
      So stop pretending otherwise.
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      8f5718a6
    • D
      drm/i915: move panel connectors to the front · 270b3042
      Daniel Vetter 提交于
      This essentially reverts
      
      commit cb0953d7
      Author: Adam Jackson <ajax@redhat.com>
      Date:   Fri Jul 16 14:46:29 2010 -0400
      
          drm/i915: Initialize LVDS and eDP outputs before anything else
      
      simply because it doesn't scale: It misses SDVO and DVO panels,
      and now with DDI encoders on haswell this is becoming unmanageable.
      
      Instead we simply sort the connector list after everything is
      set up.
      Reviewed-by: NAdam Jackson <ajax@redhat.com>
      Acked-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      270b3042
    • P
      drm/i915: don't assert disabled FDI before disabling the FDI · ab4d966c
      Paulo Zanoni 提交于
      On Haswell/LPT we must disable the PCH transcoder before we disable
      the FDI, so don't check for disabled FDI there.
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      ab4d966c
    • P
      drm/i915: don't call intel_disable_pch_pll on Haswell/LPT · fd9c0188
      Paulo Zanoni 提交于
      This function is only for the previous gens.
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      fd9c0188