1. 13 9月, 2013 1 次提交
  2. 10 9月, 2013 1 次提交
  3. 04 9月, 2013 4 次提交
  4. 23 8月, 2013 3 次提交
    • P
      drm/i915: allow package C8+ states on Haswell (disabled) · c67a470b
      Paulo Zanoni 提交于
      This patch allows PC8+ states on Haswell. These states can only be
      reached when all the display outputs are disabled, and they allow some
      more power savings.
      
      The fact that the graphics device is allowing PC8+ doesn't mean that
      the machine will actually enter PC8+: all the other devices also need
      to allow PC8+.
      
      For now this option is disabled by default. You need i915.allow_pc8=1
      if you want it.
      
      This patch adds a big comment inside i915_drv.h explaining how it
      works and how it tracks things. Read it.
      
      v2: (this is not really v2, many previous versions were already sent,
           but they had different names)
          - Use the new functions to enable/disable GTIMR and GEN6_PMIMR
          - Rename almost all variables and functions to names suggested by
            Chris
          - More WARNs on the IRQ handling code
          - Also disable PC8 when there's GPU work to do (thanks to Ben for
            the help on this), so apps can run caster
          - Enable PC8 on a delayed work function that is delayed for 5
            seconds. This makes sure we only enable PC8+ if we're really
            idle
          - Make sure we're not in PC8+ when suspending
      v3: - WARN if IRQs are disabled on __wait_seqno
          - Replace some DRM_ERRORs with WARNs
          - Fix calls to restore GT and PM interrupts
          - Use intel_mark_busy instead of intel_ring_advance to disable PC8
      v4: - Use the force_wake, Luke!
      v5: - Remove the "IIR is not zero" WARNs
          - Move the force_wake chunk to its own patch
          - Only restore what's missing from RC6, not everything
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      c67a470b
    • P
      drm/i915: wrap GEN6_PMIMR changes · edbfdb45
      Paulo Zanoni 提交于
      Just like we're doing with the other IMR changes.
      
      One of the functional changes is that not every caller was doing the
      POSTING_READ.
      Signed-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>
      edbfdb45
    • P
      drm/i915: wrap GTIMR changes · 43eaea13
      Paulo Zanoni 提交于
      Just like the functions that touch DEIMR and SDEIMR, but for GTIMR.
      The new functions contain a POSTING_READ(GTIMR) which was not present
      at the 2 callers inside i915_irq.c.
      
      The implementation is based on ibx_display_interrupt_update.
      Signed-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>
      43eaea13
  5. 09 8月, 2013 4 次提交
  6. 08 8月, 2013 5 次提交
  7. 07 8月, 2013 1 次提交
  8. 06 8月, 2013 1 次提交
  9. 05 8月, 2013 1 次提交
    • D
      drm/i915: clean up crtc timings computation · 135c81b8
      Daniel Vetter 提交于
      In the old days of the crtc helpers we've only had the encoder and
      crtc ->mode_fixup callbacks. So when the lvds connector wanted to
      adjust the crtc timings it had to set a driver-private mode flag to
      tell the crtc mode fixup code to not overwrite them with the generic
      ones.
      
      When converting things to the new infrastructure I've kept the entire
      logic and only moved the flag to pipe_config->timings_set. But this
      logic is pretty tricky and already caused regressions:
      
      commit 21d8a475
      Author: Daniel Vetter <daniel.vetter@ffwll.ch>
      Date:   Fri Jul 12 08:07:30 2013 +0200
      
          drm/i915: fix pfit regression for non-autoscaled resolutions
      
      So take advantage of the flexibility our own modeset infrastructure
      affords us and prefill default crtc timings. This allows us to rip out
      ->timings_set. Note that we overwrite things again when retrying the
      pipe config computation due to bandwidth constraints to avoid bogus
      crtc timings if the encoder only does relative adjustments (which is
      how the pfit code works). Only a theoretical concern though since
      platforms where we retry (pch-split platforms) do not need
      adjustements (since only the old gmch pfit needs that). But let's
      better be safe than sorry.
      
      Since we now initialize the crtc timings before calling the
      encoder->compute_config functions the crtc initialization in the gmch
      pfit code is now redudant and so can be removed.
      
      Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
      Cc: Mika Kuoppala <mika.kuoppala@intel.com>
      Reviewed-by: NRodrigo Vivi <rodrigo.vivi@gmail.com>
      [danvet: Add a paragraph to the commit message to explain why we can
      ditch the crtc timings initialization call from the gmch pfit code, to
      answer a question from Rodrigo's review.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      135c81b8
  10. 25 7月, 2013 1 次提交
    • C
      drm/i915: Colocate all GT access routines in the same file · 907b28c5
      Chris Wilson 提交于
      Currently, the register access code is split between i915_drv.c and
      intel_pm.c. It only bares a superficial resemblance to the reset of the
      powermanagement code, so move it all into its own file. This is to ease
      further patches to enforce serialised register access.
      
      v2: Scan for random abuse of I915_WRITE_NOTRACE
      v3: Take the opportunity to rename the GT functions as uncore. Uncore is
      the term used by the hardware design (and bspec) for all functions
      outside of the GPU (and CPU) cores in what is also known as the System
      Agent.
      v4: Rebase onto SNB rc6 fixes
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NBen Widawsky <ben@bwidawsk.net>
      [danvet: Wrestle patch into applying and inline
      intel_uncore_early_sanitize (plus move the old comment to the new
      function). Also keep the _santize postfix for intel_uncore_sanitize.]
      [danvet: Squash in fixup spotted by Chris on irc: We need to call
      intel_pm_init before intel_uncore_sanitize since the later will call
      cancel_work on the delayed rps setup work the former initializes.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      907b28c5
  11. 24 7月, 2013 1 次提交
    • P
      drm/i915: add functions to disable and restore LCPLL · be256dc7
      Paulo Zanoni 提交于
      For now there are no callers, but these functions are going to be
      needed for the code that allows Package C8+. Other future features may
      also require this code.
      
      Also merge the commit which introduced assert_can_disable_lcpll and
      had the following commit message:
      
      Most of the hardware needs to be disabled before LCPLL is disabled, so
      let's add a function to assert some of items listed in the "Display
      Sequences for LCPLL disabling" documentation.
      
      The idea is that hsw_disable_lcpll should not disable the hardware,
      the callers need to take care of calling hsw_disable_lcpll only once
      everything is already disabled.
      
      v2: - Rebase.
          - Fix D_COMP wait timeout.
      v3: - Use wait_for_atomic_use (Ben)
          - Remove/add a useless/needed POSTING_READ (Ben)
          - Early return in case LCPLL is already restored (Ben)
          - Add ndelay(100) (Ben)
      v4: - Merge the commit that added assert_can_disable_lcpll (Ben)
          - Add interrupt assertions (Ben)
      Reviewed-by: NBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      [danvet: Fix compile fail since there's no HAS_LP_PCH yet.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      be256dc7
  12. 18 7月, 2013 3 次提交
  13. 13 7月, 2013 1 次提交
  14. 01 7月, 2013 4 次提交
  15. 28 6月, 2013 1 次提交
  16. 18 6月, 2013 1 次提交
    • D
      drm/i915: stop killing pfit on i9xx · c9093354
      Daniel Vetter 提交于
      Nowadays (i.e. with Valleyview) we also have edp on non-PCH_SPLIT
      platforms, so just checking for LVDS is not good enough.
      
      Secondly we have full pfit pipe config tracking, so we'll correctly
      disable the pfit as part of the initial modeset.
      
      For fastboot we need a bit of work here to correctly kill unsupported
      configs (if e.g. the pfit is used on anything else than the built-in
      panel). But since that's not yet supported we don't need to worry.
      Reviewed-by: NMika Kuoppala <mika.kuoppala@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      c9093354
  17. 13 6月, 2013 1 次提交
    • D
      drm/i915: hw state readout and cross-checking for shared dplls · 66e985c0
      Daniel Vetter 提交于
      Just the plumbing, all the modeset and enable code has not yet been
      switched over to use the new state. It seems to be decently broken
      anyway, at least wrt to handling of the special pixel mutliplier
      enabling sequence. Follow-up patches will clean up that mess.
      
      Another missing piece is more careful handling (and fixup) of the fp1
      alternate divisor state. The BIOS most likely doesn't bother to
      program that one to what we expect. So we need to be more careful with
      comparing that state, both for cross checking but also when checking
      for dpll sharing when acquiring shared dpll. Otherwise fastboot will
      deny a few shared dpll configurations which would otherwise work.
      
      v2: We need to memcpy the pipe config dpll hw state into the pll, for
      otherwise the cross-check code will get angry.
      
      v3: Don't forget to read the pch pll state in the crtc get_pipe_config
      function for ibx/ilk platforms.
      Reviewed-by: NDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      66e985c0
  18. 12 6月, 2013 1 次提交
  19. 11 6月, 2013 3 次提交
    • D
      drm/i915: move shared_dpll into the pipe config · a43f6e0f
      Daniel Vetter 提交于
      With the big sed-job prep work done this is now really simple. With
      the exception that we only assign the right shared dpll id in the
      ->mode_set callback but also depend upon the old one still being
      around.
      
      Until that mess is fixed up we need to jump through a few hoops to
      keep the old value save.
      
      v2: Kill the funny whitespace spotted by Chris.
      
      v3: Move the shared_dpll pipe config fixup into this patch as noticed
      by Ville. Also unconditionally set the shared_dpll with the current
      one, since otherwise we won't handle direct pch port -> cpu edp
      transitions correctly.
      
      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>
      a43f6e0f
    • D
      drm/i915: switch crtc->shared_dpll from a pointer to an enum · e2b78267
      Daniel Vetter 提交于
      Dealing with discrete enum values is simpler for hw state readout and
      pipe config computations than pointers - having neat names instead of
      chasing pointers should look better in the code.
      
      This isn't a that good reason for pch plls, but on haswell we actually
      have 3 different types of plls: WRPLL, SPLL and the DP clocks. Having
      explicit names should help there.
      
      Since this also adds the intel_crtc_to_shared_dpll helper to further
      abstract away the crtc -> dpll relationship this will also help to
      make the next patch simpler, which moves the shared dpll into the pipe
      configuration.
      
      Also note that for uniformity we have two special dpll ids: NONE for
      pipes which need a shared pll but don't have one (yet) and private for
      when there's a non-shared pll (e.g. per-pipe or per-port pll).
      
      I've thought whether we should also add a 2nd enum for the type of the
      pll we want (for really generic pll selection code) but thrown that
      idea out again - likely there's too much platform craziness going on
      to be able to share the pll selection logic much.
      
      Since this touched all the shared_pll functions a bit I've also done
      an s/intel_crtc/crtc/ replacement on a few of them.
      
      v2: Kill DPLL_ID_NONE. It's probably better to call it DPLL_ID_INVALID and use
      it to check that the compute config stage assigns a dpll to every pipe.
      But since that code isn't ready yet until we move the dpll selection out
      of the ->mode_set callback, there's no use for it.
      
      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>
      e2b78267
    • D
      drm/i915: s/pch_pll/shared_dpll/ · e72f9fbf
      Daniel Vetter 提交于
      For fastboot we need some support to read out the sharing state of
      plls, at least for platforms where they can be shared (or freely
      assigned at least). Now for ivb we already have pretty extensive
      infrastructure for tracking pch plls, and it took us an aweful lot of
      tries to get that remotely right. Note that hsw could also share plls,
      but even now they're already freely assignable. So we need this on
      more than just ivb.
      
      So on top of the usual fastboot fun pll sharing seems to be an
      additional step up in fragility. Hence a common infrastructure for all
      shared/freely assignable display plls seems to be in order.
      
      The plan is to have a bit of dpll hw state readout code, which can be
      used individually, but also to fill in the pipe config. The hw state
      cross check code will then use that information to make sure that
      after every modeset every pipe still is connected to a pll which still
      has the correct configuration - a lot of the pch pll sharing bugs
      where due to incorrect sharing.
      
      We start this endeavour with a simple s/pch_pll/shared_dpll/ rename
      job.
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      e72f9fbf
  20. 07 6月, 2013 2 次提交
    • C
      drm/i915: Track when we dirty the scanout with render commands · c65355bb
      Chris Wilson 提交于
      This is required for tracking render damage for use with FBC and will be
      used in subsequent patches.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NRodrigo Vivi <rodrigo.vivi@gmail.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      c65355bb
    • D
      drm/i915: pipe config quirk infrastructure plus sdvo mode.flags fix · bb760063
      Daniel Vetter 提交于
      For various reasons the hw state readout might not be able to
      faithfully match the hw state:
      - broken hw (like the case which motivated this patch here where the
        sdvo encoder does not implemented mandatory functionality
        correctly).
      - platforms which are not supported fully with the pipe config
        infrastructure
      - if our code doesn't support a given hw configuration natively, e.g.
        special restrictions on the per-pipe panel fitters when they're used
        in high-quality scaling modes.
      
      In all these cases both fastboot and the hw state cross checker need
      to be aware of these cases and act accordingly. To be able to do this
      add a new quirk flag to the pipe config structure.
      
      The specific case at hand is an sdvo encoder which doesn't implement
      the get_timings function, so adjusted_mode flags will be wrong. The
      strange thing though is that the encoder _does_ work, even though it
      doesn't implement any of the timings functions (so neither get nor
      set, neither for input nor output timings).
      
      Not that non-compliant sdvo encoder are any surprise at all ...
      
      v2:
      - Don't read random garbage from the dtd if the get_timings call
        failed (suggested by Chris).
      - Still check the interlaced flag, that's read out from someplace
        else. We want maximal paranoia, after all.
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      bb760063