1. 18 12月, 2014 1 次提交
    • M
      drm/i915: Hold runtime PM during plane commit · 140fd38d
      Matt Roper 提交于
      During plane operations, we read/write some registers that only operate
      properly if we're not runtime suspended.  At the moment we're not
      holding the runtime PM reference across the whole plane operation, so
      there's a potential for problems.
      
      This issue was already partially addressed by commit
      
              commit d6dd6843
              Author: Paulo Zanoni <paulo.r.zanoni@intel.com>
              Date:   Fri Aug 15 15:59:32 2014 -0300
      
                  drm/i915: fix plane/cursor handling when runtime suspended
      
      which took care of holding the runtime PM reference during the pin and
      fence operations for plane updates.  However there are still a few
      actual plane registers that we also need to hold the runtime PM
      reference for.  Recent refactoring patches in preparation for atomic
      have rearranged the code and made it increasingly likely that the
      hardware will have time to suspend between the pin/fence operation and
      the actual register writes. Examples of such registers are the stuff
      touched by ivb_get_colorkey.
      
      The solution here grabs the runtime PM reference around the 'commit'
      operation for planes, which should cover all the relevant register
      reads/writes.
      
      Note that this has only been exposed with
      
      commit 6beb8c23
      Author: Matt Roper <matthew.d.roper@intel.com>
      Date:   Mon Dec 1 15:40:14 2014 -0800
      
          drm/i915: Consolidate plane 'prepare' functions (v2)
      
      so doesn't need to be ported to 3.19.
      
      Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87180Signed-off-by: NMatt Roper <matthew.d.roper@intel.com>
      Testcase: igt/pm-rpm/legacy-planes
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      [danvet: Augment commit message with information Paulo supplied.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      140fd38d
  2. 16 12月, 2014 1 次提交
    • R
      drm/i915: tame the chattermouth (v2) · e2c719b7
      Rob Clark 提交于
      Many distro's have mechanism in place to collect and automatically file
      bugs for failed WARN()s.  And since i915 has a lot of hw state sanity
      checks which result in WARN(), it generates quite a lot of noise which
      is somewhat disconcerting to the end user.
      
      Separate out the internal hw-is-in-the-state-I-expected checks into
      I915_STATE_WARN()s and allow configuration via i915.verbose_checks module
      param about whether this will generate a full blown stacktrace or just
      DRM_ERROR().  The new moduleparam defaults to true, so by default there
      is no change in behavior.  And even when disabled, you will still get
      an error message logged.
      
      v2: paint the macro names blue, clarify that the default behavior
          remains the same as before
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      Acked-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      e2c719b7
  3. 15 12月, 2014 1 次提交
    • D
      drm/i915: Use BUILD_BUG if possible in the i915 WARN_ON · 5f77eeb0
      Daniel Vetter 提交于
      Faster feedback to errors is always better. This is inspired by the
      addition to WARN_ONs to mask/enable helpers for registers to make sure
      callers have the arguments ordered correctly: Pretty much always the
      arguments are static.
      
      We use WARN_ON(1) a lot in default switch statements though where we
      should always handle all cases. So add a new macro specifically for
      that.
      
      The idea to use __builtin_constant_p is from Chris Wilson.
      
      v2: Use the ({}) gcc-ism to avoid the static inline, suggested by
      Dave. My first attempt used __cond as the temp var, which is the same
      used by BUILD_BUG_ON, but with inverted sense. Hilarity ensued, so
      sprinkle i915 into the name.
      
      Also use a temporary variable to only evaluate the condition once,
      suggested by Damien.
      
      v3: It's crazy but apparently 32bit gcc can't compile out the
      BUILD_BUG_ON in a lot of cases and just falls over. I have no idea
      why, but until clue grows just disable this nifty idea on 32bit
      builds. Reported by 0-day builder.
      
      v4: Got it all wrong, apparently its the gcc version. We need 4.9+.
      Now reported by Imre.
      
      v5: Chris suggested to add the case to MISSING_CASE for speedier
      debug.
      
      v6: Even some gcc 4.9 versions don't see through the maze, so give up
      for now. Keep the skeleton and MISSING_CASE stuff though.
      
      Cc: Imre Deak <imre.deak@intel.com>
      Cc: Damien Lespiau <damien.lespiau@intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: Dave Gordon <david.s.gordon@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      5f77eeb0
  4. 11 12月, 2014 1 次提交
  5. 08 12月, 2014 1 次提交
  6. 06 12月, 2014 11 次提交
  7. 03 12月, 2014 15 次提交
  8. 24 11月, 2014 1 次提交
    • V
      drm/i915: Ignore SURFLIVE and flip counter when the GPU gets reset · bdfa7542
      Ville Syrjälä 提交于
      During a GPU reset we need to get pending page flip cleared out
      since the ring contents are gone and flip will never complete
      on its own. This used to work until the mmio vs. CS flip race
      detection came about. That piece of code is looking for a
      specific surface address in the SURFLIVE register, but as
      a flip to that address may never happen the check may never
      pass. So we should just skip the SURFLIVE and flip counter
      checks when the GPU gets reset.
      
      intel_display_handle_reset() tries to effectively complete
      the flip anyway by calling .update_primary_plane(). But that
      may not satisfy the conditions of the mmio vs. CS race
      detection since there's no guarantee that a modeset didn't
      sneak in between the GPU reset and intel_display_handle_reset().
      Such a modeset will not wait for pending flips due to the ongoing GPU
      reset, and then the primary plane updates performed by
      intel_display_handle_reset() will already use the new surface
      address, and thus the surface address the flip is waiting for
      might never appear in SURFLIVE. The result is that the flip
      will never complete and attempts to perform further page flips
      will fail with -EBUSY.
      
      During the GPU reset intel_crtc_has_pending_flip() will return
      false regardless, so the deadlock with a modeset vs. the error
      work acquiring crtc->mutex was avoided. And the reset_counter
      check in intel_crtc_has_pending_flip() actually made this bug
      even less severe since it allowed normal modesets to go through
      even though there's a pending flip.
      
      This is a regression introduced by me here:
       commit 75f7f3ec
       Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
       Date:   Tue Apr 15 21:41:34 2014 +0300
      
          drm/i915: Fix mmio vs. CS flip race on ILK+
      
      Testcase: igt/kms_flip/flip-vs-panning-vs-hang
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Cc: stable@vger.kernel.org
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      bdfa7542
  9. 20 11月, 2014 3 次提交
  10. 19 11月, 2014 2 次提交
  11. 18 11月, 2014 2 次提交
  12. 17 11月, 2014 1 次提交