[PATCH 5/6] drm: Prevent vblank counter jumps with timestamp based update method.

2016-02-10 Thread Daniel Vetter
On Wed, Feb 10, 2016 at 7:36 PM, Mario Kleiner wrote: > On 02/10/2016 06:17 PM, Daniel Vetter wrote: >> >> On Wed, Feb 10, 2016 at 5:28 PM, Mario Kleiner >> wrote: >>> >>> There's another scenario where this zero-ts case can be hit. If the >>> driver >>> drm_vblank_init()'s - setting all timestam

[PATCH 5/6] drm: Prevent vblank counter jumps with timestamp based update method.

2016-02-10 Thread Mario Kleiner
On 02/10/2016 06:17 PM, Daniel Vetter wrote: > On Wed, Feb 10, 2016 at 5:28 PM, Mario Kleiner > wrote: >> There's another scenario where this zero-ts case can be hit. If the driver >> drm_vblank_init()'s - setting all timestamps to zero - and then code starts >> using vblanks (drm_vblank_get()) wi

[PATCH 5/6] drm: Prevent vblank counter jumps with timestamp based update method.

2016-02-10 Thread Daniel Vetter
On Wed, Feb 10, 2016 at 5:28 PM, Mario Kleiner wrote: > There's another scenario where this zero-ts case can be hit. If the driver > drm_vblank_init()'s - setting all timestamps to zero - and then code starts > using vblanks (drm_vblank_get()) without drm_vblank_on beforehand, which is > afaics th

[PATCH 5/6] drm: Prevent vblank counter jumps with timestamp based update method.

2016-02-10 Thread Mario Kleiner
On 02/09/2016 04:03 PM, Daniel Vetter wrote: > On Tue, Feb 09, 2016 at 04:11:49PM +0200, Ville Syrjälä wrote: >> On Tue, Feb 09, 2016 at 02:53:30PM +0100, Mario Kleiner wrote: >>> On 02/09/2016 11:09 AM, Daniel Vetter wrote: On Mon, Feb 08, 2016 at 02:13:28AM +0100, Mario Kleiner wrote:

[PATCH 5/6] drm: Prevent vblank counter jumps with timestamp based update method.

2016-02-09 Thread Ville Syrjälä
On Tue, Feb 09, 2016 at 02:53:30PM +0100, Mario Kleiner wrote: > On 02/09/2016 11:09 AM, Daniel Vetter wrote: > > On Mon, Feb 08, 2016 at 02:13:28AM +0100, Mario Kleiner wrote: > >> The changes to drm_update_vblank_count() in Linux 4.4 added a > >> method to emulate a hardware vblank counter by use

[PATCH 5/6] drm: Prevent vblank counter jumps with timestamp based update method.

2016-02-09 Thread Daniel Vetter
On Tue, Feb 09, 2016 at 04:11:49PM +0200, Ville Syrjälä wrote: > On Tue, Feb 09, 2016 at 02:53:30PM +0100, Mario Kleiner wrote: > > On 02/09/2016 11:09 AM, Daniel Vetter wrote: > > > On Mon, Feb 08, 2016 at 02:13:28AM +0100, Mario Kleiner wrote: > > >> The changes to drm_update_vblank_count() in

[PATCH 5/6] drm: Prevent vblank counter jumps with timestamp based update method.

2016-02-09 Thread Mario Kleiner
On 02/09/2016 11:09 AM, Daniel Vetter wrote: > On Mon, Feb 08, 2016 at 02:13:28AM +0100, Mario Kleiner wrote: >> The changes to drm_update_vblank_count() in Linux 4.4 added a >> method to emulate a hardware vblank counter by use of high >> precision vblank timestamps if a kms driver supports those,

[PATCH 5/6] drm: Prevent vblank counter jumps with timestamp based update method.

2016-02-09 Thread Daniel Vetter
On Mon, Feb 08, 2016 at 02:13:28AM +0100, Mario Kleiner wrote: > The changes to drm_update_vblank_count() in Linux 4.4 added a > method to emulate a hardware vblank counter by use of high > precision vblank timestamps if a kms driver supports those, > but doesn't suppport hw vblank counters. > > T

[PATCH 5/6] drm: Prevent vblank counter jumps with timestamp based update method.

2016-02-08 Thread Mario Kleiner
The changes to drm_update_vblank_count() in Linux 4.4 added a method to emulate a hardware vblank counter by use of high precision vblank timestamps if a kms driver supports those, but doesn't suppport hw vblank counters. That method assumes that the old timestamp from a previous invocation is val