1. 22 6月, 2015 2 次提交
  2. 12 6月, 2015 2 次提交
  3. 30 5月, 2015 1 次提交
  4. 29 5月, 2015 11 次提交
  5. 27 5月, 2015 1 次提交
    • C
      drm/i915: Use spinlocks for checking when to waitboost · 8d3afd7d
      Chris Wilson 提交于
      In commit 1854d5ca
      Author: Chris Wilson <chris@chris-wilson.co.uk>
      Date:   Tue Apr 7 16:20:32 2015 +0100
      
          drm/i915: Deminish contribution of wait-boosting from clients
      
      we removed an atomic timer based check for allowing waitboosting and
      moved it below the mutex taken during RPS. However, that mutex can be
      held for long periods of time on Vallyview/Cherryview as communication
      with the PCU is slow. As clients may frequently wait for results (e.g.
      such as tranform feedback) we introduced contention between the client
      and the RPS worker. We can take advantage of the RPS worker, by
      switching the wait boost decision to use spin locks and defer the
      actual reclocking to the worker.
      
      Fixes a regression of up to 45% on Baytrail and Baswell!
      
      v2 (Daniel):
      - Use max_freq_softlimit instead of the not-yet-merged boost
        frequency.
      - Don't inject a fake irq into the boost work, instead treat
        client_boost as just another legit waker.
      
      v3: Drop the now unused mask (Chris).
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90112
      Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (v1)
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      8d3afd7d
  6. 21 5月, 2015 1 次提交
  7. 20 5月, 2015 2 次提交
  8. 14 4月, 2015 6 次提交
  9. 10 4月, 2015 4 次提交
  10. 24 3月, 2015 2 次提交
    • I
      drm/i915: move clearing of RPS interrupt bits from disable to reset time · 096fad9e
      Imre Deak 提交于
      The logical place for clearing the RPS latched interrupt bits is when
      resetting the RPS interrupts, so move the corresponding part from the RPS
      disable function to the reset function. During resetting we already
      cleared the IIR bits, so the only thing missing there was clearing pm_iir.
      
      Note that we call gen6_disable_rps_interrupts() also during driver load
      and resume time via intel_uncore_sanitize() when i915 interrupts are
      still not installed. If there are any pending RPS bits at this point
      (which after this patch wouldn't be cleared) they will be cleared by the
      reset code via the interrupt preinstall hooks.
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      096fad9e
    • I
      drm/i915: fix race when clearing RPS IIR bits · 58072ccb
      Imre Deak 提交于
      When disabling RPS interrupts there is a race where we disable RPS
      inerrupts while the interrupt handler is running and the handler has
      already latched the pending RPS interrupt from the master IIR register.
      Afterwards the disabling path clears the PM IIR bits, making the state
      of pending interrupts inconsistent from the interrupt handler's point of
      view. This triggers the following warning: "The master control interrupt
      lied (PM)!".
      
      To fix this make sure that any running interrupt handler (which may
      have already latched the master IIR) finishes before clearing the IIR
      bits.
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87347Signed-off-by: NImre Deak <imre.deak@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      58072ccb
  11. 20 3月, 2015 2 次提交
    • C
      drm/i915: Use down ei for manual Baytrail RPS calculations · 6f4b12f8
      Chris Wilson 提交于
      Use both up/down manual ei calcuations for symmetry and greater
      flexibility for reclocking, instead of faking the down interrupt based
      on a fixed integer number of up interrupts.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: Deepak S<deepak.s@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      6f4b12f8
    • C
      drm/i915: Improved w/a for rps on Baytrail · 43cf3bf0
      Chris Wilson 提交于
      Rewrite commit 31685c25
      Author: Deepak S <deepak.s@linux.intel.com>
      Date:   Thu Jul 3 17:33:01 2014 -0400
      
          drm/i915/vlv: WA for Turbo and RC6 to work together.
      
      Other than code clarity, the major improvement is to disable the extra
      interrupts generated when idle.  However, the reclocking remains rather
      slow under the new manual regime, in particular it fails to downclock as
      quickly as desired. The second major improvement is that for certain
      workloads, like games, we need to combine render+media activity counters
      as the work of displaying the frame is split across the engines and both
      need to be taken into account when deciding the global GPU frequency as
      memory cycles are shared.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Deepak S <deepak.s@linux.intel.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: Deepak S<deepak.s@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      43cf3bf0
  12. 18 3月, 2015 3 次提交
  13. 26 2月, 2015 1 次提交
    • M
      drm/i915: Use enabled value from crtc_state rather than crtc (v2) · 83d65738
      Matt Roper 提交于
      As vendors transition their drivers from legacy to atomic there's some
      duplication of data between drm_crtc and drm_crtc_state (since
      unconverted drivers likely won't have a state structure).
      
      i915 is partially converted and does have a crtc->state structure, but
      still uses direct crtc fields internally in many places, which causes
      the two sets of data to get out of sync.  As of commit
      
              commit 31c946e8
              Author: Daniel Vetter <daniel.vetter@ffwll.ch>
              Date:   Sun Feb 22 12:24:17 2015 +0100
      
                  drm: If available use atomic state in getcrtc ioctl
      
                  This way drivers fully converted to atomic don't need to update these
                  legacy state variables in their modeset code any more.
      Reviewed-by: NRob Clark <robdclark@gmail.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      
      the DRM core starts assuming that the presence of a ->state structure
      implies that it should make use of the values stored there which, on
      i915, leads to the core code using stale values for CRTC 'enabled'
      status.
      
      Let's switch over to using the state value of 'enable' internally rather
      than using the drm_crtc field.  This ensures that our driver internals
      are working from the same data that the DRM core is, avoiding
      mismatches.
      
      This patch was generated with Coccinelle using the following semantic
      patch:
      
              <smpl>
              @@
              struct drm_crtc C;
              struct drm_crtc *CP;
              @@
              (
              - C.enabled
              + C.state->enable
              |
              - CP->enabled
              + CP->state->enable
              )
      
              // For assignments, we still update the legacy value as well as the state value
              // so add an extra assignment statement for that.
              @@
              struct drm_crtc C;
              struct drm_crtc *CP;
              expression E;
              @@
              (
                C.state->enable = E;
              + C.enabled = E;
              |
                CP->state->enable = E;
              + CP->enabled = E;
              )
              </smpl>
      
      The crtc->mode and crtc->hwmode fields should probably be transitioned
      over as well eventually, but we seem to do an okay job of keeping those
      up-to-date already so I want to minimize the changes that will clash
      with Ander's in-progress atomic work.
      
      v2: Don't remove the assignments to the legacy value when we assign to
          the state value.  A second cocci stanza takes care of adding the
          legacy assignment back where appropriate.  (Daniel)
      
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Cc: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
      Signed-off-by: NMatt Roper <matthew.d.roper@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      83d65738
  14. 24 2月, 2015 1 次提交
    • I
      drm/i915: avoid processing spurious/shared interrupts in low-power states · 2dd2a883
      Imre Deak 提交于
      Atm, it's possible that the interrupt handler is called when the device
      is in D3 or some other low-power state. It can be due to another device
      that is still in D0 state and shares the interrupt line with i915, or on
      some platforms there could be spurious interrupts even without sharing
      the interrupt line. The latter case was reported by Klaus Ethgen using a
      Lenovo x61p machine (gen 4). He noticed this issue via a system
      suspend/resume hang and bisected it to the following commit:
      
      commit e11aa362
      Author: Jesse Barnes <jbarnes@virtuousgeek.org>
      Date:   Wed Jun 18 09:52:55 2014 -0700
      
          drm/i915: use runtime irq suspend/resume in freeze/thaw
      
      This is a problem, since in low-power states IIR will always read
      0xffffffff resulting in an endless IRQ servicing loop.
      
      Fix this by handling interrupts only when the driver explicitly enables
      them and so it's guaranteed that the interrupt registers return a valid
      value.
      
      Note that this issue existed even before the above commit, since during
      runtime suspend/resume we never unregistered the handler.
      
      v2:
      - clarify the purpose of smp_mb() vs. synchronize_irq() in the
        code comment (Chris)
      
      v3:
      - no need for an explicit smp_mb(), we can assume that synchronize_irq()
        and the mmio read/writes in the install hooks provide for this (Daniel)
      - remove code comment as the remaining synchronize_irq() is self
        explanatory (Daniel)
      
      v4:
      - drm_irq_uninstall() implies synchronize_irq(), so no need to call it
        explicitly (Daniel)
      
      Reference: https://lkml.org/lkml/2015/2/11/205Reported-and-bisected-by: NKlaus Ethgen <Klaus@Ethgen.ch>
      Cc: stable@vger.kernel.org
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      2dd2a883
  15. 23 2月, 2015 1 次提交