Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1561668 > unrolled thread

Re: [Intel-gfx] [PATCH] drm/i915: Avoid drm_atomic_state_put(NULL) in intel_display_resume

Started byChris Wilson <chris@chris-wilson.co.uk>
First post2017-01-18 12:50 +0100
Last post2017-01-18 12:50 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [Intel-gfx] [PATCH] drm/i915: Avoid drm_atomic_state_put(NULL)  in intel_display_resume Chris Wilson <chris@chris-wilson.co.uk> - 2017-01-18 12:50 +0100

#1561668 — Re: [Intel-gfx] [PATCH] drm/i915: Avoid drm_atomic_state_put(NULL) in intel_display_resume

FromChris Wilson <chris@chris-wilson.co.uk>
Date2017-01-18 12:50 +0100
SubjectRe: [Intel-gfx] [PATCH] drm/i915: Avoid drm_atomic_state_put(NULL) in intel_display_resume
Message-ID<t0WUx-3AT-1@gated-at.bofh.it>
On Wed, Jan 18, 2017 at 01:35:33PM +0200, Ander Conselvan De Oliveira wrote:
> On Sun, 2017-01-15 at 12:58 +0000, Chris Wilson wrote:
> > intel_display_resume() may be called without a atomic state to restore,
> > i.e. dev_priv->modeset_reset_restore state is NULL. One such case is
> > following a lid open/close event and the forced modeset in
> > intel_lid_notiy().
> > 
> > Reported-by: Stefan Seyfried <stefan.seyfried@googlemail.com>
> > Fixes: 0853695c3ba4 ("drm: Add reference counting to drm_atomic_state")
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> > Cc: Jani Nikula <jani.nikula@linux.intel.com>
> > Cc: <drm-intel-fixes@lists.freedesktop.org> # v4.10-rc1+
> > ---
> >  drivers/gpu/drm/i915/intel_display.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_display.c
> > b/drivers/gpu/drm/i915/intel_display.c
> > index 3dc8724df400..260bbe8881e6 100644
> > --- a/drivers/gpu/drm/i915/intel_display.c
> > +++ b/drivers/gpu/drm/i915/intel_display.c
> > @@ -17024,7 +17024,8 @@ void intel_display_resume(struct drm_device *dev)
> >  
> >  	if (ret)
> >  		DRM_ERROR("Restoring old state failed with %i\n", ret);
> > -	drm_atomic_state_put(state);
> > +	if (state)
> > +		drm_atomic_state_put(state);
> >  }
> >  
> >  void intel_modeset_gem_init(struct drm_device *dev)
> 
> 
> Reviewed-by: Ander Conselvan de Oliveira <conselvan2@gmail.com>

Thanks for the review and testing, pushed.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web