Re: [PATCH 1/2] drm: vblank: use ktime_t instead of timeval

2017-10-12 Thread Keith Packard
Arnd Bergmann writes: > Overall, this seems good enough, so my patch removes the use of > 'timeval' from the vblank handling altogether and uses ktime_t > consistently, except for the part where we copy the data to user > space structures in the existing format. This patch is better than the por

Re: [PATCH 1/2] drm: vblank: use ktime_t instead of timeval

2017-10-12 Thread Sean Paul
On Wed, Oct 11, 2017 at 04:28:39PM -0400, Sean Paul wrote: > On Wed, Oct 11, 2017 at 4:18 PM, Keith Packard wrote: > > Sean Paul writes: > > > >> It looks like perhaps Keith missed one of the comment tweaks that you have > >> below. > >> > >> Keith, perhaps you can rebase your widening patch on t

Re: [PATCH 1/2] drm: vblank: use ktime_t instead of timeval

2017-10-11 Thread Keith Packard
Sean Paul writes: > Would it be easier for you to respin this into your series, or for me > to just apply it to drm-misc-next? Yeah, I don't see any particular hurry to getting just the time widening patch merged as it doesn't change any external interfaces. I'll go ahead and respin my series us

Re: [PATCH 1/2] drm: vblank: use ktime_t instead of timeval

2017-10-11 Thread Sean Paul
On Wed, Oct 11, 2017 at 4:18 PM, Keith Packard wrote: > Sean Paul writes: > >> It looks like perhaps Keith missed one of the comment tweaks that you have >> below. >> >> Keith, perhaps you can rebase your widening patch on this one? > > I'm easy; either order works for me just fine. Having the ti

Re: [PATCH 1/2] drm: vblank: use ktime_t instead of timeval

2017-10-11 Thread Keith Packard
Sean Paul writes: > It looks like perhaps Keith missed one of the comment tweaks that you have > below. > > Keith, perhaps you can rebase your widening patch on this one? I'm easy; either order works for me just fine. Having the time change separated from the sequence change might be nice? --

Re: [PATCH 1/2] drm: vblank: use ktime_t instead of timeval

2017-10-11 Thread Keith Packard
Arnd Bergmann writes: > That is an interesting coincidence, I created my patch earlier this week > without having any idea that others were looking at the same files. My requirements were to support 64-bit vblank counts and ns precision vblank timing for Vulkan; obviously using ktime_t was a goo

Re: [PATCH 1/2] drm: vblank: use ktime_t instead of timeval

2017-10-11 Thread Arnd Bergmann
On Wed, Oct 11, 2017 at 7:36 PM, Sean Paul wrote: > On Wed, Oct 11, 2017 at 05:20:12PM +0200, Arnd Bergmann wrote: > > Hi Arnd, > Keith posted something very similar with: > <20171011004514.9500-2-kei...@keithp.com> "drm: Widen vblank UAPI to 64 bits. > Change vblank time to ktime_t" > > It looks

Re: [PATCH 1/2] drm: vblank: use ktime_t instead of timeval

2017-10-11 Thread Sean Paul
On Wed, Oct 11, 2017 at 05:20:12PM +0200, Arnd Bergmann wrote: > The drm vblank handling uses 'timeval' to store timestamps in either > monotonic or wall-clock time base. In either case, it reads the current > time as a ktime_t in get_drm_timestamp() and converts it from there. > > This is a bit s

[PATCH 1/2] drm: vblank: use ktime_t instead of timeval

2017-10-11 Thread Arnd Bergmann
The drm vblank handling uses 'timeval' to store timestamps in either monotonic or wall-clock time base. In either case, it reads the current time as a ktime_t in get_drm_timestamp() and converts it from there. This is a bit suspicious, as users of 'timeval' often suffer from the time_t overflow in