1. 11 Nov, 2012 7 commits
    • Daniel Vetter's avatar
      drm/i915: add ->display.modeset_global_resources callback · 47fab737
      Daniel Vetter authored
      After all relevant pipes are disabled and after we've updated all the
      state with the staged state, but before we call the per-crtc
      ->mode_set functions there's a very natural point to set up any
      shared/global resources like
      - shared plls (obviously only the setup, the enabling needs to be
        separately handling with a separate refcount)
      - global watermark state like the DSPARB on gmch platforms
      - workaround bits that depend upon the exact global output
        configuration
      - enabling the right set of refclocks
      - enabling/disabling manual power wells.
      
      Now for a lot of these things we can't move them into this function
      yet, most often because we only compute the required information in
      the per-crtc ->mode_set callback. Which is too late. But due to a
      bunch of reasons (check-only atomic modeset, fastboot&hw state checks,
      ...) we need to separate the computation of that state from the actual
      hw frobbery anyway. So we can move things into this new callback step-
      by-step.
      
      Others can't be moved here (or implemented at all) because our code
      lacks the smarts to properly update them. E.g. the DSPARB can only be
      updated when all pipes are disabled, so if we decide to change it's
      value, we need to disable _all_ pipes. The infrastructure for that is
      already in place (with the various pipe masks that driver the modeset
      logic). But again we need to move a few things out of ->mode_set
      first before we can even implement the correct decision making.
      
      In any case, we need to start somewhere, so let's start with the
      callback: Some small follow-up patches will make immediate good use of
      it.
      Reviewed-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      47fab737
    • Daniel Vetter's avatar
      drm/i915: BUG on impossible pch dp port · e95d41e1
      Daniel Vetter authored
      Since it is one. We need to move this code to encoder specific callbacks
      eventually, to kill all that inversion of control ...
      Reviewed-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      e95d41e1
    • Daniel Vetter's avatar
      drm/i915: add comment about pch pll enabling rules · 572deb37
      Daniel Vetter authored
      Atm we have a few funny issues where we enable/disable shared
      pll clocks. To make it clear that we are not required to enable/
      disable the pch plls together with the other pch resources (and
      so should keep it running when it's used by another pipe in
      a shared pll configuration) add a comment.
      
      This note is lifted from "Graphics BSpec: vol4g North Display Engine
      Registers [IVB], Display Mode Set Sequence", step 9.d. of the enable
      sequence:
      
      "Configure and enable PCH DPLL, wait for PCH DPLL warmup (Can be
      done anytime before enabling PCH transcoder)."
      
      Since fixing the pll sharing code to no longer disable shared plls
      if they're still in use is more involved, let's just stick with the
      comment for now.
      
      v2: Make the comment in the code clearer, to address questions raised
      by Paulo Zanoni in review.
      Reviewed-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      572deb37
    • Daniel Vetter's avatar
      drm/i915: set FDI_RX_MISC to recommended values on CPT/PPT · d74cf324
      Daniel Vetter authored
      My machine here has the correct ones already, but better safe
      than sorry. IBX has different settings for that register, and
      on IBX the device defaults match the recommended values. Hence
      I did not add the respective writes for IBX.
      
      LPT needs the same settings, but that has been done already
      
      commit 4acf5186
      Author: Eugeni Dodonov <eugeni.dodonov@intel.com>
      Date:   Wed Jul 4 20:15:16 2012 -0300
      
          drm/i915: program FDI_RX TP and FDI delays
      
      Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      d74cf324
    • Daniel Vetter's avatar
      drm/i915: clarify why we need to enable fdi plls so early · fff367c7
      Daniel Vetter authored
      For reference, see "Graphics BSpec: vol4g North Display Engine
      Registers [IVB], Display Mode Set Sequence", step 4 of the enabling
      sequence:
      
      a. "Enable PCH FDI Receiver PLL, wait for warmup plus DMI latency
      b. "Switch from Rawclk to PCDclk in FDI Receiver
      c. "Enable CPU FDI Transmitter PLL, wait for warmup"
      
      Cc: Paulo Zanoni <przanoni@gmail.com>
      Reviewed-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      fff367c7
    • Daniel Vetter's avatar
      drm/i915: Write the FDI RX TU size reg at the right time · cd986abb
      Daniel Vetter authored
      According to "Graphics BSpec: vol4g North Display Engine Registers [IVB],
      Display Mode Set Sequence" We need to write the TU size register
      of the fdi RX unit _before_ starting to train the link.
      
      Note: The current code is actually correct as Paulo mentioned in
      review, but it's a bit confusion since only the fdi rx/tx plls need to
      be enabled before the cpu pipes/planes. Hence it's still a good idea
      to move the TU_SIZE setting to the "right" spot in the sequence, to
      better match Bspec.
      Reviewed-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      cd986abb
    • Daniel Vetter's avatar
      drm/i915: shut up spurious message in intel_dp_get_hw_state · 4a0833ec
      Daniel Vetter authored
      The debug message is only relevant on CPT/PPT PCH ports, so move
      it into the correct if clause.
      Reviewed-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      4a0833ec
  2. 02 Nov, 2012 1 commit
    • Jani Nikula's avatar
      drm/i915: pass adjusted_mode to intel_choose_pipe_bpp_dither(), again · c8241969
      Jani Nikula authored
      Daniel's backmerge
      
      commit c2fb7916
      Merge: 29de6ce5 6f0c0580
      Author: Daniel Vetter <daniel.vetter@ffwll.ch>
      Date:   Mon Oct 22 14:34:51 2012 +0200
      
          Merge tag 'v3.7-rc2' into drm-intel-next-queued
      
      to solve conflicts blew up (either git or Daniel was trying to be too
      clever for their own good; it's usually convenient to blame tools ;) and
      caused the changes of
      
      commit 0c96c65b
      Author: Jani Nikula <jani.nikula@intel.com>
      Date:   Wed Sep 26 18:43:10 2012 +0300
      
          drm/i915: use adjusted_mode instead of mode for checking the 6bpc force flag
      
      in ironlake_crtc_mode_set() to be dropped.
      
      Fix the call in ironlake_crtc_mode_set() again, and while at it, also fix
      the new, copy-pasted haswell_crtc_mode_set() to use adjusted_mode.
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      c8241969
  3. 26 Oct, 2012 27 commits
  4. 24 Oct, 2012 4 commits
  5. 23 Oct, 2012 1 commit
    • Daniel Vetter's avatar
      drm/i915: make edp panel power sequence setup more robust · 82ed61fa
      Daniel Vetter authored
      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: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      Tested-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      82ed61fa