1. 22 11月, 2012 2 次提交
  2. 13 11月, 2012 1 次提交
    • C
      drm/i915/i2c: Track users of GMBUS force-bit · f2ce9faf
      Chris Wilson 提交于
      This fixes a regression for SDVO from
      
      commit fbfcc4f3
      Author: Jani Nikula <jani.nikula@intel.com>
      Date:   Mon Oct 22 16:12:18 2012 +0300
      
          drm/i915/sdvo: restore i2c adapter config on intel_sdvo_init() failures
      
      As SDVOB and SDVOC are multiplexed on the same pin, if a chipset does
      not have the second SDVO encoder, it will then remove the force-bit
      setting on the common i2c adapter during teardown. All subsequent
      attempts of trying to use GMBUS with SDVOB then fail.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Jani Nikula <jani.nikula@intel.com>
      Cc: Mika Kuoppala <mika.kuoppala@intel.com>
      [danvet: fixup inversion in the debug printout, noticed by Jani
      Nikulai.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      f2ce9faf
  3. 12 11月, 2012 13 次提交
  4. 26 10月, 2012 1 次提交
    • P
      drm/i915: add TRANSCODER_EDP · a5c961d1
      Paulo Zanoni 提交于
      Before Haswell we used to have the CPU pipes and the PCH transcoders.
      We had the same amount of pipes and transcoders, and there was a 1:1
      mapping between them. After Haswell what we used to call CPU pipe was
      split into CPU pipe and CPU transcoder. So now we have 3 CPU pipes (A,
      B and C), 4 CPU transcoders (A, B, C and EDP) and 1 PCH transcoder
      (only used for VGA).
      
      For all the outputs except for EDP we have an 1:1 mapping on the CPU
      pipes and CPU transcoders, so if you're using CPU pipe A you have to
      use CPU transcoder A. When have an eDP output you have to use
      transcoder EDP and you can attach this CPU transcoder to any of the 3
      CPU pipes. When using VGA you need to select a pair of matching CPU
      pipes/transcoders (A/A, B/B, C/C) and you also need to enable/use the
      PCH transcoder.
      
      For now we're just creating the cpu_transcoder definitions and setting
      cpu_transcoder to TRANSCODER_EDP on DDI eDP code, but none of the
      registers was ported to use transcoder instead of pipe. The goal is to
      keep the code backwards-compatible since on all cases except when
      using eDP we must have pipe == cpu_transcoder.
      
      V2: Comment the haswell_crtc_off chunk, suggested by Damien Lespiau
      and Daniel Vetter.
      
      We currently need the haswell_crtc_off chunk because TRANSCODER_EDP
      can be used by any CRTC, so when you stop using it you have to stop
      saying you're using it, otherwise you may have at some point 2 CRTCs
      claiming they're using TRANSCODER_EDP (a disabled CRTC and an enabled
      one), then the HW state readout code will get completely confused.
      
      In other words:
      
      Imagine the following case:
        xrandr --output eDP1 --auto --crtc 0
        xrandr --output eDP1 --off
        xrandr --output eDP1 --auto --crtc 2
      
      After the last command you could get a "pipe A assertion failure
      (expected off, current on)" because CRTC 0 still claims it's using
      TRANSCODER_EDP, so the HW state readout function will read it
      (through PIPECONF) and expect it to be off, when it's actually on
      because it's being used by CRTC 2.
      
      So when we make "intel_crtc->cpu_transcoder = intel_crtc->pipe" we
      make sure we're pointing to our own original CRTC which is certainly
      not used by any other CRTC.
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: NDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      a5c961d1
  5. 23 10月, 2012 3 次提交
  6. 18 10月, 2012 2 次提交
  7. 16 10月, 2012 1 次提交
  8. 12 10月, 2012 2 次提交
    • C
      drm/i915: fixup i915_gem_object_get_page inline helper · 1cf83789
      Chris Wilson 提交于
      Note that just because we have n == MAX elements left, does not imply
      that there are only MAX elements left in the scatterlist and so we may
      not be on the last chain, and the nth element may in fact be a chain ptr.
      
      This is exercised by the improved hangman tests and the gem_exec_big
      test in i-g-t.
      
      This regression has been introduced in
      
      commit 9da3da66
      Author: Chris Wilson <chris@chris-wilson.co.uk>
      Date:   Fri Jun 1 15:20:22 2012 +0100
      
         drm/i915: Replace the array of pages with a scatterlist
      
      v2: KISS, replace the direct lookup with a for_each_sg() [danvet]
      v3: Try to be clever again.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      1cf83789
    • C
      drm/i915: Disallow preallocation of requests · acb868d3
      Chris Wilson 提交于
      The intention was to allow the caller to avoid a failure to queue a
      request having already written commands to the ring. However, this is a
      moot point as the i915_add_request() can fail for other reasons than a
      mere allocation failure and those failure cases are more likely than
      ENOMEM. So the overlay code already had to handle i915_add_request()
      failures, and due to
      
      commit 3bb73aba
      Author: Chris Wilson <chris@chris-wilson.co.uk>
      Date:   Fri Jul 20 12:40:59 2012 +0100
      
          drm/i915: Allow late allocation of request for i915_add_request()
      
      the error handling code in intel_overlay.c was subject to causing
      double-frees, as found by coverity.
      
      Rather than further complicate i915_add_request() and callers, realise
      the battle is lost and adapt intel_overlay.c to take advantage of the
      late allocation of requests.
      
      v2: Handle callers passing in a NULL seqno.
      v3: Ditto. This time for sure.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      acb868d3
  9. 10 10月, 2012 1 次提交
    • P
      drm/i915: completely rewrite the Haswell PLL handling code · 6441ab5f
      Paulo Zanoni 提交于
      Problems with the previous code:
        - HDMI just uses WRPLL1 for everything, so dual head cases might not
          work sometimes.
        - At encoder->mode_set we just write the PLL register without doing
          any kind of check (e.g., check if the PLL is already being used).
        - There is no way to fail and return error codes at
          encoder->mode_set.
        - We write to PORT_CLK_SEL at mode_set and we never disable it.
        - Machines hang due to wrong clock enable/disable sequence.
      
      So here we rewrite the code, making it a little more like the
      pre-Haswell PLL mode set code:
        - Check PLL availability at ironlake_crtc_mode_set.
        - Try to use both WRPLLs.
        - Check if PLLs are used before actually trying to use them, and
          properly fail with error messages.
        - Enable/disable PORT_CLK_SEL at the right place.
        - Add some WARNs to check for bugs.
      
      The next improvement will be to try to reuse PLLs if the timings
      match, but this is content for another patch and it's already
      documented with a TODO comment.
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: NDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      6441ab5f
  10. 09 10月, 2012 1 次提交
  11. 26 9月, 2012 1 次提交
  12. 20 9月, 2012 5 次提交
  13. 06 9月, 2012 2 次提交
    • D
      drm/i915: read out the modeset hw state at load and resume time · 24929352
      Daniel Vetter 提交于
      ... instead of resetting a few things and hoping that this will work
      out.
      
      To properly disable the output pipelines at the initial modeset after
      resume or boot up we need to have an accurate picture of which outputs
      are enabled and connected to which crtcs. Otherwise we risk disabling
      things at the wrong time, which can lead to hangs (or at least royally
      confused panels), both requiring a walk to the reset button to fix.
      
      Hence read out the hw state with the freshly introduce get_hw_state
      functions and then sanitize it afterwards.
      
      For a full modeset readout (which would allow us to avoid the initial
      modeset at boot up) a few things are still missing:
      - Reading out the mode from the pipe, especially the dotclock
        computation is quite some fun.
      - Reading out the parameters for the stolen memory framebuffer and
        wrapping it up.
      - Reading out the pch pll connections - luckily the disable code
        simply bails out if the crtc doesn't have a pch pll attached (even
        for configurations that would need one).
      
      This patch here turned up tons of smelly stuff around resume: We
      restore tons of register in seemingly random way (well, not quite, but
      we're not too careful either), which leaves the hw in a rather
      ill-defined state: E.g. the port registers are sometimes
      unconditionally restore (lvds, crt), leaving us with an active
      encoder/connector but no active pipe connected to it. Luckily the hw
      state sanitizer detects this madness and fixes things up a bit.
      
      v2: When checking whether an encoder with active connectors has a crtc
      wire up to it, check for both the crtc _and_ it's active state.
      
      v3:
      - Extract intel_sanitize_encoder.
      - Manually disable active encoders without an active pipe.
      
      v4: Correclty fix up the pipe<->plane mapping on machines where we
      switch pipes/planes. Noticed by Chris Wilson, who also provided the
      fixup.
      
      v5: Spelling fix in a comment, noticed by Paulo Zanoni
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-Off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      24929352
    • D
      drm/i915: add crtc->enable/disable vfuncs insted of dpms · 76e5a89c
      Daniel Vetter 提交于
      Because that's what we're essentially calling. This is the first step
      in untangling the crtc_helper induced dpms handling mess we have - at
      the crtc level we only have 2 states and the magic is just in
      selecting which one (and atm there isn't even much magic, but on
      recent platforms where not even the crt output has more than 2 states
      we could do better).
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-Off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      76e5a89c
  14. 03 9月, 2012 1 次提交
  15. 24 8月, 2012 3 次提交
  16. 23 8月, 2012 1 次提交