Re: [PATCH] Revert "drm: Don't pass negative delta to ktime_sub_ns()"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 29, 2016 at 05:22:02PM +0300, Imre Deak wrote:
> On Tue, 2016-03-29 at 13:12 +0200, Daniel Vetter wrote:
> > This reverts commit e91abf80a0998f326107874c88d549f94839f13c.
> > 
> > Since
> > 
> > commit 24e4a8c3e8868874835b0f1ad6dd417341e99822
> > Author: John Stultz <john.stultz@xxxxxxxxxx>
> > Date:   Wed Jul 16 21:03:53 2014 +0000
> > 
> >     ktime: Kill non-scalar ktime_t implementation for 2038
> > 
> > there is no longer a 32bit version that's unsigned, and we don't have
> > to jump through ridiculous hoops to make the calculations correct.
> > 
> > I didn't look whether there's more of this pattern in the kernel.
> > 
> > Cc: John Stultz <john.stultz@xxxxxxxxxx>
> > Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> > Cc: Michel Dänzer <michel.daenzer@xxxxxxx>
> > Cc: Imre Deak <imre.deak@xxxxxxxxx>
> > Cc: Dave Airlie <airlied@xxxxxxxxxx>
> > Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxxx>
> 
> Reviewed-by: Imre Deak <imre.deak@xxxxxxxxx>

Applied to drm-misc, thanks for the review.
-Daniel

> 
> > ---
> >  drivers/gpu/drm/drm_irq.c | 5 +----
> >  1 file changed, 1 insertion(+), 4 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
> > index f77653562fac..4d06cf41df96 100644
> > --- a/drivers/gpu/drm/drm_irq.c
> > +++ b/drivers/gpu/drm/drm_irq.c
> > @@ -863,10 +863,7 @@ int drm_calc_vbltimestamp_from_scanoutpos(struct
> > drm_device *dev,
> >  	/* Subtract time delta from raw timestamp to get final
> >  	 * vblank_time timestamp for end of vblank.
> >  	 */
> > -	if (delta_ns < 0)
> > -		etime = ktime_add_ns(etime, -delta_ns);
> > -	else
> > -		etime = ktime_sub_ns(etime, delta_ns);
> > +	etime = ktime_sub_ns(etime, delta_ns);
> >  	*vblank_time = ktime_to_timeval(etime);
> >  
> >  	DRM_DEBUG_VBL("crtc %u : v 0x%x p(%d,%d)@ %ld.%ld -> %ld.%ld
> > [e %d us, %d rep]\n",b

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux