Message ID | 20161128103648.9235-1-matthew.auld@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On ma, 2016-11-28 at 10:36 +0000, Matthew Auld wrote: > We grab the struct_mutex in intel_crtc_page_flip, but if we are wedged > or a reset is in progress we bail early but never seem to actually > release the lock. > > Fixes: 7f1847ebf48b ("drm/i915: Simplify checking of GPU reset_counter in display pageflips") > Cc: Chris Wilson <chris@chris-wilson.co.uk> > Signed-off-by: Matthew Auld <matthew.auld@intel.com> Cc: stable # v4.6 ? Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Regards, Joonas
On Mon, 28 Nov 2016, Joonas Lahtinen <joonas.lahtinen@linux.intel.com> wrote: > On ma, 2016-11-28 at 10:36 +0000, Matthew Auld wrote: >> We grab the struct_mutex in intel_crtc_page_flip, but if we are wedged >> or a reset is in progress we bail early but never seem to actually >> release the lock. >> >> Fixes: 7f1847ebf48b ("drm/i915: Simplify checking of GPU reset_counter in display pageflips") >> Cc: Chris Wilson <chris@chris-wilson.co.uk> >> Signed-off-by: Matthew Auld <matthew.auld@intel.com> > > Cc: stable # v4.6 ? $ dim fixes 7f1847ebf48b Fixes: 7f1847ebf48b ("drm/i915: Simplify checking of GPU reset_counter in display pageflips") Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Daniel Vetter <daniel.vetter@intel.com> Cc: Jani Nikula <jani.nikula@linux.intel.com> Cc: intel-gfx@lists.freedesktop.org Cc: <stable@vger.kernel.org> # v4.7+ > > Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> > > Regards, Joonas
On ma, 2016-11-28 at 13:40 +0200, Jani Nikula wrote: > > On Mon, 28 Nov 2016, Joonas Lahtinen <joonas.lahtinen@linux.intel.com> wrote: > > > > Cc: stable # v4.6 ? > > $ dim fixes 7f1847ebf48b > Fixes: 7f1847ebf48b ("drm/i915: Simplify checking of GPU reset_counter in display pageflips") > Cc: Chris Wilson <chris@chris-wilson.co.uk> > Cc: Daniel Vetter <daniel.vetter@ffwll.ch> > Cc: Daniel Vetter <daniel.vetter@intel.com> > Cc: Jani Nikula <jani.nikula@linux.intel.com> > Cc: intel-gfx@lists.freedesktop.org > Cc: <stable@vger.kernel.org> # v4.7+ > The last tag I have with the DIM setup after updating to drm-tip compliant structure is v4.6-rc1, maybe the Torvalds remote should be automated to make sure dim-fixes works (or at least warn if the oldest tag is too old?). Regards, Joonas
On Mon, Nov 28, 2016 at 01:40:17PM +0200, Jani Nikula wrote: > On Mon, 28 Nov 2016, Joonas Lahtinen <joonas.lahtinen@linux.intel.com> wrote: > > On ma, 2016-11-28 at 10:36 +0000, Matthew Auld wrote: > >> We grab the struct_mutex in intel_crtc_page_flip, but if we are wedged > >> or a reset is in progress we bail early but never seem to actually > >> release the lock. > >> > >> Fixes: 7f1847ebf48b ("drm/i915: Simplify checking of GPU reset_counter in display pageflips") > >> Cc: Chris Wilson <chris@chris-wilson.co.uk> > >> Signed-off-by: Matthew Auld <matthew.auld@intel.com> > > > > Cc: stable # v4.6 ? > > $ dim fixes 7f1847ebf48b > Fixes: 7f1847ebf48b ("drm/i915: Simplify checking of GPU reset_counter in display pageflips") > Cc: Chris Wilson <chris@chris-wilson.co.uk> > Cc: Daniel Vetter <daniel.vetter@ffwll.ch> > Cc: Daniel Vetter <daniel.vetter@intel.com> > Cc: Jani Nikula <jani.nikula@linux.intel.com> > Cc: intel-gfx@lists.freedesktop.org > Cc: <stable@vger.kernel.org> # v4.7+ Pushed with the stable tag appended. Thanks, -Chris
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 5d11002319f7..772a72a21513 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -12214,7 +12214,7 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc, intel_crtc->reset_count = i915_reset_count(&dev_priv->gpu_error); if (i915_reset_in_progress_or_wedged(&dev_priv->gpu_error)) { ret = -EIO; - goto cleanup; + goto unlock; } atomic_inc(&intel_crtc->unpin_work_count); @@ -12302,6 +12302,7 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc, intel_unpin_fb_obj(fb, crtc->primary->state->rotation); cleanup_pending: atomic_dec(&intel_crtc->unpin_work_count); +unlock: mutex_unlock(&dev->struct_mutex); cleanup: crtc->primary->fb = old_fb;
We grab the struct_mutex in intel_crtc_page_flip, but if we are wedged or a reset is in progress we bail early but never seem to actually release the lock. Fixes: 7f1847ebf48b ("drm/i915: Simplify checking of GPU reset_counter in display pageflips") Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Matthew Auld <matthew.auld@intel.com> --- drivers/gpu/drm/i915/intel_display.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)