1. 10 8月, 2013 1 次提交
  2. 08 8月, 2013 10 次提交
  3. 06 8月, 2013 17 次提交
  4. 05 8月, 2013 1 次提交
  5. 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
  6. 21 7月, 2013 1 次提交
    • D
      drm/i915: fix up gt init sequence fallout · 181d1b9e
      Daniel Vetter 提交于
      The regression fix for gen6+ rps fallout
      
      commit 7dcd2677
      Author: Konstantin Khlebnikov <khlebnikov@openvz.org>
      Date:   Wed Jul 17 10:22:58 2013 +0400
      
          drm/i915: fix long-standing SNB regression in power consumption after resume
      
      unintentionally also changed the init sequence ordering between
      gt_init and gt_reset - we need to reset BIOS damage like leftover
      forcewake references before we run our own code. Otherwise we can get
      nasty dmesg noise like
      
      [drm:__gen6_gt_force_wake_mt_get] *ERROR* Timed out waiting for forcewake old ack to clear.
      
      again. Since _reset suggests that we first need to have stuff
      initialized (which isn't the case here) call it sanitze instead.
      
      While at it also block out the rps disable introduced by the above
      commit on ilk: We don't have any knowledge of ilk rps being broken in
      similar ways. And the disable functions uses the default hw state
      which is only read out when we're enabling rps. So essentially we've
      been writing random grabage into that register.
      Reported-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Konstantin Khlebnikov <khlebnikov@openvz.org>
      Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
      Cc: stable@vger.kernel.org
      Tested-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      181d1b9e
  7. 17 7月, 2013 1 次提交
    • K
      drm/i915: fix long-standing SNB regression in power consumption after resume v2 · 7dcd2677
      Konstantin Khlebnikov 提交于
      This patch fixes regression in power consumtion of sandy bridge gpu, which
      exists since v3.6 Sometimes after resuming from s2ram gpu starts thinking that
      it's extremely busy. After that it never reaches rc6 state.
      
      Bug exists since kernel v3.6:
      
      commit b4ae3f22
      Author: Jesse Barnes <jbarnes@virtuousgeek.org>
      Date:   Thu Jun 14 11:04:48 2012 -0700
      
          drm/i915: load boot context at driver init time
      
      For some reason RC6 is already enabled at the beginning of resuming process.
      Following initliaztion breaks some internal state and confuses RPS engine.
      This patch disables RC6 at the beginnig of resume and initialization.
      
      I've rearranged initialization sequence, because intel_disable_gt_powersave()
      needs initialized force_wake_get/put and some locks from the dev_priv.
      
      Note: The culprit in the initialization sequence seems to be the write
      to MBCTL added in the above mentioned commit. The first version of
      this patch just held a forcewake reference across the clock gating
      init functions, which seems to have been enought to gather quite a few
      positive test reports. But since that smelled a bit like ad-hoc
      duct-tape v2 now just disables rps/rc6 across the entire hw setup.
      
      References: https://bugs.freedesktop.org/show_bug.cgi?id=54089
      References: https://bugzilla.kernel.org/show_bug.cgi?id=58971
      References: https://patchwork.kernel.org/patch/2827634/ (patch v1)
      Signed-off-by: NKonstantin Khlebnikov <khlebnikov@openvz.org>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
      [danvet: Add note about v1 vs. v2 of this patch and use standard
      layout for the commit citation. Also add the tested-bys from v1 and a
      cc: stable.]
      Cc: stable@vger.kernel.org (Note: tiny conflict due to the addition of
      the backlight lock in 3.11)
      Tested-by: Alexander Kaltsas <alexkaltsas@gmail.com> (v1)
      Tested-by: rocko <rockorequin@hotmail.com> (v1)
      Tested-by: JohnMB <johnmbryant@sky.com> (v1)
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      7dcd2677
  8. 16 7月, 2013 7 次提交
    • D
      drm/i915: Don't try to calculate RC6 residency on GEN4 and before · eb4926e4
      Damien Lespiau 提交于
      intel_enable_rc6() is used to check if we can compute the RC6 residency
      in the sysfs code. Disable this for platforms older than Ironlake.
      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>
      eb4926e4
    • D
    • D
      drm/i915: We implement WaFbcAsynchFlipDisableFbcQueue on ilk and snb · 4bb35334
      Damien Lespiau 提交于
      v2: Put the comment a bit closer to the actual write (Paulo Zanoni)
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDamien Lespiau <damien.lespiau@intel.com>
      [danvet: Fix space before tab.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      4bb35334
    • D
      drm/i915: We implement WaFbcWaitForVBlankBeforeEnable for ilk and snb · 7457d617
      Damien Lespiau 提交于
      We also wait for that blank on other platforms but the w/a doesn't
      apply there. Not an issue at all.
      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>
      7457d617
    • D
      drm/i915: simplify rps interrupt enabling/disabling sequence · a0b3335a
      Daniel Vetter 提交于
      At the moment we have the following interrupt enabling sequence:
      1. irq preinstall hook
      2. enabling the interrupt handler and calling irq postinstall hook
      3. enable rps interrupts from the async work
      
      And the folliwing disable sequence:
      1. disabling the interrupt handler and calling the uninstall hook
      2. disabling the rps interrupt
      
      Since the postinstall hook now always sets up PMIIR, PMIER and PMIMR
      to known-good states there no way for an interrupt to sneak in in the
      enable sequence, so we can reinstate the WARN lost in
      
      commit eda63ffb
      Author: Ben Widawsky <ben@bwidawsk.net>
      Date:   Tue May 28 19:22:26 2013 -0700
      
          drm/i915: Add PM regs to pre/post install
      
      Note that there's some room for future cleanups since most of the
      interrupt register clearing in the disable function is rather
      redundant. But that's better done in follow-up patches, if at all.
      
      Cc: Ben Widawsky <ben@bwidawsk.net>
      Reviewed-by: NBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      a0b3335a
    • D
      drm/i915: extract rps interrupt enable/disable helpers · 44fc7d5c
      Daniel Vetter 提交于
      The VECS enabling required some changes to how rps interrupts are
      enabled/disabled since VECS interrupts are handling with the PM
      interrupt registers.
      
      But now that the pre/postinstall sequences is identical for all
      platforms with rps support (snb, ivb, hsw, vlv) we can also use the
      exact same sequence to actually enable the rps interrupts. Strictly
      speaking using spinlocks is overkill on snb/ivb & vlv since they have
      no VECS ring, but imo that's more than made up by the common code.
      
      Hence this just unifies the vlv code with the snb-hsw code which
      matched exactly before the VECS enabling. See
      
      commit eda63ffb
      Author: Ben Widawsky <ben@bwidawsk.net>
      Date:   Tue May 28 19:22:26 2013 -0700
      
          drm/i915: Add PM regs to pre/post install
      
      and
      
      commit 4848405c
      Author: Ben Widawsky <ben@bwidawsk.net>
      Date:   Tue May 28 19:22:27 2013 -0700
      
          drm/i915: make PM interrupt writes non-destructive
      
      for why the gen6 code (shared between snb, ivb and hsw) needed to be
      changed originally.
      
      v3: Improve the commit message to more clearly spell out why we want
      to unify the code and what exactly changes.
      
      Cc: Paulo Zanoni <przanoni@gmail.com>
      Cc: Ben Widawsky <ben@bwidawsk.net>
      Reviewed-by: NBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      44fc7d5c
    • D
      drm/i915: unify GT/PM irq postinstall code · 0a9a8c91
      Daniel Vetter 提交于
      Again extract a common helper. For the postinstall hook things are a
      bit more complicated since we have more cases on ilk-hsw/vlv here.
      
      But since vlv was clearly broken by failing to initialize
      dev_priv->gt_irq_mask correctly the shared code is clearly justified.
      
      Also kill the PMIER setting in the async rps enable work. I should
      have been save, but also clearly looked rather fragile. PMIER setup is
      now all down in the irq pre/postinstall hooks.
      
      With this we now have the usual interrupt register sequence for GT/PM
      irq registers:
      
      - IER is setup once with all the interrupts we ever need in the
        postinstall hook and never touched again. Exceptions are SDEIER,
        which is touched in the preinstall hook (when the irq handler isn't
        enabled) and then only from the irq handler. And DEIER/VLV_IER with
        is used in the irq handler but also written to once in the
        postinstall hook. But since that write is essentially what enables
        the interrupt and we should always have MSI interrupts we should be
        save. In case we ever have non-MSI interrupts we'd be screwed.
      
      - IIR is cleared in the postinstall hook before we enable/unmask the
        respective interrupt sources. Hence we can't steal an interrupt
        event an accidentally trigger the spurious interrupt logic in the
        core kernel. Note that after some discussion with Ben Widawsky we
        think that we actually should clear the IIR registers in the
        preinstall hook. But doing that is a much larger patch series.
      
      - IMR regs are (usually) all masked off. Those are the only regs
        changed at runtime, which is all protected by dev_priv->irq_lock.
      
      This unification also kills the cargo-culted read-modify-write PM
      register setup for VECS. Interrupt setup is done without userspace
      being able to interfere, so we better know what values we want to put
      into those registers. RMW cycles otoh are really good at papering over
      races, until stuff magically blows up and no one has a clue why.
      
      v2: Touch the gen6+ PM interrupt registers only on gen6+.
      
      v3: Improve the commit message to more clearly spell out why we want
      to unify the code and what exactly changes.
      
      Cc: Ben Widawsky <ben@bwidawsk.net>
      Cc: Paulo Zanoni <przanoni@gmail.com>
      Reviewed-by: NBen Widawsky <ben@bwidawsk.net>
      [danvet: Add a comment to explain why the l3 parity interrupt is
      special.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      0a9a8c91
  9. 11 7月, 2013 1 次提交
    • D
      drm/i915: kill dev_priv->rps.lock · 59cdb63d
      Daniel Vetter 提交于
      Now that the rps interrupt locking isn't clearly separated (at elast
      conceptually) from all the other interrupt locking having a different
      lock stopped making sense: It protects much more than just the rps
      workqueue it started out with. But with the addition of VECS the
      separation started to blurr and resulted in some more complex locking
      for the ring interrupt refcount.
      
      With this we can (again) unifiy the ringbuffer irq refcounts without
      causing a massive confusion, but that's for the next patch.
      
      v2: Explain better why the rps.lock once made sense and why no longer,
      requested by Ben.
      Reviewed-by: NBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      59cdb63d