Re: [Intel-gfx] [PATCH] Revert unrelated part of "drm: simplify the locking in the GETCRTC ioctl"

2017-03-30 Thread Pandiyan, Dhinakaran
On Thu, 2017-03-30 at 09:36 +0200, Maarten Lankhorst wrote:
> Op 28-03-17 om 09:01 schreef Daniel Vetter:
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_display.c 
> > b/drivers/gpu/drm/i915/intel_display.c
> > index 68cded453882..43dbad62786e 100644
> > --- a/drivers/gpu/drm/i915/intel_display.c
> > +++ b/drivers/gpu/drm/i915/intel_display.c
> > @@ -12463,6 +12463,11 @@ static int intel_atomic_check(struct drm_device 
> > *dev,
> > ret = drm_atomic_helper_check_modeset(dev, state);
> > if (ret)
> > return ret;
> > +   /* enocder->atomic_check might upgrade some crtc to a full modeset */
> > +   ret = drm_atomic_helper_check_modeset(dev, state);
> > +   if (ret)
> > +   return ret;
> > +
> >  
> > for_each_oldnew_crtc_in_state(state, crtc, old_crtc_state, crtc_state, 
> > i) {
> > struct intel_crtc_state *pipe_config =
> 
> I know this patch has been applied, but this hunk is completely unrelated.
> 
> Can I get a R-B on reverting it?
> 
> >8
> v2 of the commit 2c77bb29d398 ("drm: simplify the locking in the GETCRTC 
> ioctl")
> accidentally introduced a unrelated change in intel_display.c, revert the
> unrelated change.
>  
> Signed-off-by: Maarten Lankhorst 
> Fixes: 2c77bb29d398 ("drm: simplify the locking in the GETCRTC ioctl")
> ---
> diff --git a/drivers/gpu/drm/i915/intel_display.c 
> b/drivers/gpu/drm/i915/intel_display.c
> index baa8d836c8e7..c45694abda5b 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -12478,11 +12478,6 @@ static int intel_atomic_check(struct drm_device *dev,
>   ret = drm_atomic_helper_check_modeset(dev, state);
>   if (ret)
>   return ret;
> - /* enocder->atomic_check might upgrade some crtc to a full modeset */
> - ret = drm_atomic_helper_check_modeset(dev, state);


Noticed this while testing my driver-private object series.
drm_atomic_helper_check_modeset->atomic_release() getting called twice
within an atomic_check() broke the vcpi slots bookkeeping I had and
ironically exposed a bug in my code.

Reported-by: Dhinakaran Pandiyan 
Reviewed-by: Dhinakaran Pandiyan 


> - if (ret)
> - return ret;
> -
>  
>   for_each_oldnew_crtc_in_state(state, crtc, old_crtc_state, crtc_state, 
> i) {
>   struct intel_crtc_state *pipe_config =
> 
> ___
> Intel-gfx mailing list
> intel-...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [Intel-gfx] [PATCH] Revert unrelated part of "drm: simplify the locking in the GETCRTC ioctl"

2017-03-30 Thread Daniel Vetter
On Thu, Mar 30, 2017 at 07:48:45AM +, Pandiyan, Dhinakaran wrote:
> On Thu, 2017-03-30 at 09:36 +0200, Maarten Lankhorst wrote:
> > Op 28-03-17 om 09:01 schreef Daniel Vetter:
> > > 
> > > diff --git a/drivers/gpu/drm/i915/intel_display.c 
> > > b/drivers/gpu/drm/i915/intel_display.c
> > > index 68cded453882..43dbad62786e 100644
> > > --- a/drivers/gpu/drm/i915/intel_display.c
> > > +++ b/drivers/gpu/drm/i915/intel_display.c
> > > @@ -12463,6 +12463,11 @@ static int intel_atomic_check(struct drm_device 
> > > *dev,
> > >   ret = drm_atomic_helper_check_modeset(dev, state);
> > >   if (ret)
> > >   return ret;
> > > + /* enocder->atomic_check might upgrade some crtc to a full modeset */
> > > + ret = drm_atomic_helper_check_modeset(dev, state);
> > > + if (ret)
> > > + return ret;
> > > +
> > >  
> > >   for_each_oldnew_crtc_in_state(state, crtc, old_crtc_state, crtc_state, 
> > > i) {
> > >   struct intel_crtc_state *pipe_config =
> > 
> > I know this patch has been applied, but this hunk is completely unrelated.
> > 
> > Can I get a R-B on reverting it?
> > 
> > >8
> > v2 of the commit 2c77bb29d398 ("drm: simplify the locking in the GETCRTC 
> > ioctl")
> > accidentally introduced a unrelated change in intel_display.c, revert the
> > unrelated change.
> >  
> > Signed-off-by: Maarten Lankhorst 
> > Fixes: 2c77bb29d398 ("drm: simplify the locking in the GETCRTC ioctl")
> > ---
> > diff --git a/drivers/gpu/drm/i915/intel_display.c 
> > b/drivers/gpu/drm/i915/intel_display.c
> > index baa8d836c8e7..c45694abda5b 100644
> > --- a/drivers/gpu/drm/i915/intel_display.c
> > +++ b/drivers/gpu/drm/i915/intel_display.c
> > @@ -12478,11 +12478,6 @@ static int intel_atomic_check(struct drm_device 
> > *dev,
> > ret = drm_atomic_helper_check_modeset(dev, state);
> > if (ret)
> > return ret;
> > -   /* enocder->atomic_check might upgrade some crtc to a full modeset */
> > -   ret = drm_atomic_helper_check_modeset(dev, state);
> 
> 
> Noticed this while testing my driver-private object series.
> drm_atomic_helper_check_modeset->atomic_release() getting called twice
> within an atomic_check() broke the vcpi slots bookkeeping I had and
> ironically exposed a bug in my code.
> 
> Reported-by: Dhinakaran Pandiyan 
> Reviewed-by: Dhinakaran Pandiyan 

Oh derp this is embarrassing :( Thanks for the quick fix, applied.
-Daniel

> 
> 
> > -   if (ret)
> > -   return ret;
> > -
> >  
> > for_each_oldnew_crtc_in_state(state, crtc, old_crtc_state, crtc_state, 
> > i) {
> > struct intel_crtc_state *pipe_config =
> > 
> > ___
> > Intel-gfx mailing list
> > intel-...@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel