1. 26 10月, 2012 3 次提交
    • P
      drm/i915: convert DDI_FUNC_CTL to transcoder · ad80a810
      Paulo Zanoni 提交于
      Because there's one instance of the register per CPU transcoder and
      not per CPU pipe. This is another register that appeared for the first
      time on Haswell, and even though its Haswell name is
      PIPE_DDI_FUNC_CTL, it will be renamed to TRANS_DDI_FUNC_CTL, so let's
      just use the new naming scheme before it confuses more people.
      
      Notice that there's a big improvement on intel_ddi_get_hw_state due to
      the new TRANSCODER_EDP.
      
      V2: Also rename the register to TRANS_DDI_FUNC_CTL as suggested by
      Damien Lespiau.
      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>
      ad80a810
    • P
      drm/i915: convert PIPE_CLK_SEL to transcoder · bb523fc0
      Paulo Zanoni 提交于
      This register appeared in Haswell. It does not have an EDP version
      because the EDP transcoder is always tied to the DDIA clock. Notice
      that if we call PIPE_CLK_SEL(pipe) when pipe is PIPE_A and transcoder
      is TRANSCODER_EDP we might introduce a bug, that's why this is a
      transcoder register even though it does not have an EDP version.
      
      Even though Haswell names this register PIPE_CLK_SEL, it will be
      renamed to TRANS_CLK_SEL in the future, so let's just start using the
      real name that makes more sense and avoids misusage.
      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>
      bb523fc0
    • 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
  2. 24 10月, 2012 1 次提交
    • 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
  3. 20 10月, 2012 1 次提交
    • D
      drm/i915: Consolidate ILK_DSPCLK_GATE and PCH_DSPCLK_GATE · 231e54f6
      Damien Lespiau 提交于
      Register 0x42020 was defined twice under the names PCH_DSPCLK_GATE_D and
      ILK_DSPCLK_GATE. This patch consolidate the 2 sets of defines in one.
      
      The transforms done are:
      
      PCH_DSPCLK_GATE_D    -> ILK_DSPCLK_GATE_D
      ILK_DSPCLK_GATE      -> ILK_DSPCLK_GATE_D
      
      DPARBUNIT_CLOCK_GATE_DISABLE -> ILK_DPARBUNIT_CLOCK_GATE_DISABLE
      ILK_DPARB_CLK_GATE           -> ILK_DPARBUNIT_CLOCK_GATE_DISABLE
      
      DPFDUNIT_CLOCK_GATE_DISABLE -> ILK_DPFDUNIT_CLOCK_GATE_DISABLE
      ILK_DPFD_CLK_GATE           -> ILK_DPFDUNIT_CLOCK_GATE_DISABLE
      ILK_CLK_FBC                 -> ILK_DPFDUNIT_CLOCK_GATE_DISABLE
      
      DPFCRUNIT_CLOCK_GATE_DISABLE -> ILK_DPFCRUNIT_CLOCK_GATE_DISABLE
      ILK_DPFC_DIS1                -> ILK_DPFCRUNIT_CLOCK_GATE_DISABLE
      
      DPFCUNIT_CLOCK_GATE_DISABLE -> ILK_DPFCUNIT_CLOCK_GATE_DISABLE
      ILK_DPFC_DIS2               -> ILK_DPFCUNIT_CLOCK_GATE_DISABLE
      
      We have a VHRUNIT_CLOCK_GATE_DISABLE define for the pre-ILK DSPCLK_GATE_D.
      Even if the same bit is used in ILK_DSPCLK_GATE_D, other bits in the
      register change, so I went with re-defining it, well more precisely rename
      IVB_VRHUNIT_CLK_GATE, which is not specific to IVB+. So:
      
      IVB_VRHUNIT_CLK_GATE       -> ILK_VHRUNIT_CLOCK_GATE_DISABLE
      VHRUNIT_CLOCK_GATE_DISABLE -> ILK_VHRUNIT_CLOCK_GATE_DISABLE (ILK+ code)
      
      This commit is only a renaming commit, further commits will clean up the
      logic.
      
      v2: Rename bit 5 and 7 to _ENABLE as setting them to 1 enables clock
          gating on their respective units, contrary to all of the other bits
          (Paulo Zanoni)
      Signed-off-by: NDamien Lespiau <damien.lespiau@intel.com>
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      231e54f6
  4. 18 10月, 2012 4 次提交
  5. 16 10月, 2012 1 次提交
    • B
      drm/i915: Workaround to bump rc6 voltage to 450 · 31643d54
      Ben Widawsky 提交于
      BIOS should be setting the minimum voltage for rc6 to be 450mV. Old or
      buggy BIOSen may not be doing this, so we correct it for them. Ideally
      customers should update the BIOS as only it would know the optimal
      values for the platform, so we leave that fact as a DRM_ERROR for the
      user to see.
      
      Unfortunately this isn't fixing any of the issues it was targeted to
      fix, but it is documented that we must do it.
      
      CC: Jesse Barnes <jbarnes@virtuousgeek.org>
      CC: Matt Turner <mattst88@gmail.com>
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      [danvet: bikeshedded loglevel of the "your bios is broken message" to
      debug.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      31643d54
  6. 12 10月, 2012 2 次提交
  7. 10 10月, 2012 4 次提交
  8. 05 10月, 2012 3 次提交
  9. 28 9月, 2012 3 次提交
  10. 26 9月, 2012 1 次提交
    • P
      drm/i915: make sure we write all the DIP data bytes · adf00b26
      Paulo Zanoni 提交于
      ... even if the actual infoframe is smaller than the maximum possible
      size.
      
      If we don't write all the 32 DIP data bytes the InfoFrame ECC may not
      be correctly calculated in some cases (e.g., when changing the port),
      and this will lead to black screens on HDMI monitors. The ECC value is
      generated by the hardware.
      
      I don't see how this should break anything since we're writing 0 and
      that should be the correct value, so this patch should be safe.
      
      Notice that on IVB and older we actually have 64 bytes available for
      VIDEO_DIP_DATA, but only bytes 0-31 actually store infoframe data: the
      others are either read-only ECC values or marked as "reserved". On HSW
      we only have 32 bytes, and the ECC value is stored on its own separate
      read-only register. See BSpec.
      
      This patch fixes bug #46761, which is marked as a regression
      introduced by commit 4e89ee17:
          drm/i915: set the DIP port on ibx_write_infoframe
      
      Before commit 4e89 we were just failing to send AVI infoframes when we
      needed to change the port, which can lead to black screens in some
      cases. After commit 4e89 we started sending infoframes, but with a
      possibly wrong ECC value. After this patch I hope we start sending
      correct infoframes.
      
      Version 2:
        - Improve commit message
        - Try to make the code more clear
      
      Cc: stable@vger.kernel.org
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=46761Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: NRodrigo Vivi <rodrigo.vivi@gmail.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      adf00b26
  11. 06 9月, 2012 1 次提交
  12. 24 8月, 2012 2 次提交
  13. 23 8月, 2012 2 次提交
  14. 17 8月, 2012 3 次提交
  15. 10 8月, 2012 5 次提交
  16. 26 7月, 2012 4 次提交