Re: [Intel-gfx] [PATCH] drm/vblank: Avoid storing a timestamp for the same frame twice

2021-02-09 Thread Daniel Vetter
On Tue, Feb 9, 2021 at 4:41 PM Ville Syrjälä wrote: > On Tue, Feb 09, 2021 at 11:07:53AM +0100, Daniel Vetter wrote: > > On Thu, Feb 04, 2021 at 04:04:00AM +0200, Ville Syrjala wrote: > > > From: Ville Syrjälä > > > > > > drm_vblank_restore() exists because certain power saving states > > > can c

Re: [Intel-gfx] [PATCH] drm/vblank: Avoid storing a timestamp for the same frame twice

2021-02-09 Thread Ville Syrjälä
On Tue, Feb 09, 2021 at 11:07:53AM +0100, Daniel Vetter wrote: > On Thu, Feb 04, 2021 at 04:04:00AM +0200, Ville Syrjala wrote: > > From: Ville Syrjälä > > > > drm_vblank_restore() exists because certain power saving states > > can clobber the hardware frame counter. The way it does this is > > b

Re: [Intel-gfx] [PATCH] drm/vblank: Avoid storing a timestamp for the same frame twice

2021-02-09 Thread Daniel Vetter
On Thu, Feb 04, 2021 at 04:04:00AM +0200, Ville Syrjala wrote: > From: Ville Syrjälä > > drm_vblank_restore() exists because certain power saving states > can clobber the hardware frame counter. The way it does this is > by guesstimating how many frames were missed purely based on > the differenc

Re: [Intel-gfx] [PATCH] drm/vblank: Avoid storing a timestamp for the same frame twice

2021-02-08 Thread Ville Syrjälä
On Mon, Feb 08, 2021 at 06:43:53PM +0100, Daniel Vetter wrote: > On Mon, Feb 8, 2021 at 5:58 PM Ville Syrjälä > wrote: > > > > On Mon, Feb 08, 2021 at 10:56:36AM +0100, Daniel Vetter wrote: > > > On Fri, Feb 05, 2021 at 11:19:19PM +0200, Ville Syrjälä wrote: > > > > On Fri, Feb 05, 2021 at 06:24:0

Re: [Intel-gfx] [PATCH] drm/vblank: Avoid storing a timestamp for the same frame twice

2021-02-08 Thread Daniel Vetter
On Mon, Feb 8, 2021 at 5:58 PM Ville Syrjälä wrote: > > On Mon, Feb 08, 2021 at 10:56:36AM +0100, Daniel Vetter wrote: > > On Fri, Feb 05, 2021 at 11:19:19PM +0200, Ville Syrjälä wrote: > > > On Fri, Feb 05, 2021 at 06:24:08PM +0200, Ville Syrjälä wrote: > > > > On Fri, Feb 05, 2021 at 04:46:27PM

Re: [Intel-gfx] [PATCH] drm/vblank: Avoid storing a timestamp for the same frame twice

2021-02-08 Thread Ville Syrjälä
On Mon, Feb 08, 2021 at 10:56:36AM +0100, Daniel Vetter wrote: > On Fri, Feb 05, 2021 at 11:19:19PM +0200, Ville Syrjälä wrote: > > On Fri, Feb 05, 2021 at 06:24:08PM +0200, Ville Syrjälä wrote: > > > On Fri, Feb 05, 2021 at 04:46:27PM +0100, Daniel Vetter wrote: > > > > On Thu, Feb 04, 2021 at 05:

Re: [Intel-gfx] [PATCH] drm/vblank: Avoid storing a timestamp for the same frame twice

2021-02-08 Thread Daniel Vetter
On Fri, Feb 05, 2021 at 11:19:19PM +0200, Ville Syrjälä wrote: > On Fri, Feb 05, 2021 at 06:24:08PM +0200, Ville Syrjälä wrote: > > On Fri, Feb 05, 2021 at 04:46:27PM +0100, Daniel Vetter wrote: > > > On Thu, Feb 04, 2021 at 05:55:28PM +0200, Ville Syrjälä wrote: > > > > On Thu, Feb 04, 2021 at 04:

Re: [Intel-gfx] [PATCH] drm/vblank: Avoid storing a timestamp for the same frame twice

2021-02-05 Thread Ville Syrjälä
On Fri, Feb 05, 2021 at 06:24:08PM +0200, Ville Syrjälä wrote: > On Fri, Feb 05, 2021 at 04:46:27PM +0100, Daniel Vetter wrote: > > On Thu, Feb 04, 2021 at 05:55:28PM +0200, Ville Syrjälä wrote: > > > On Thu, Feb 04, 2021 at 04:32:16PM +0100, Daniel Vetter wrote: > > > > On Thu, Feb 04, 2021 at 04:

Re: [Intel-gfx] [PATCH] drm/vblank: Avoid storing a timestamp for the same frame twice

2021-02-05 Thread Ville Syrjälä
On Fri, Feb 05, 2021 at 04:46:27PM +0100, Daniel Vetter wrote: > On Thu, Feb 04, 2021 at 05:55:28PM +0200, Ville Syrjälä wrote: > > On Thu, Feb 04, 2021 at 04:32:16PM +0100, Daniel Vetter wrote: > > > On Thu, Feb 04, 2021 at 04:04:00AM +0200, Ville Syrjala wrote: > > > > From: Ville Syrjälä > > >

Re: [Intel-gfx] [PATCH] drm/vblank: Avoid storing a timestamp for the same frame twice

2021-02-05 Thread Daniel Vetter
On Thu, Feb 04, 2021 at 05:55:28PM +0200, Ville Syrjälä wrote: > On Thu, Feb 04, 2021 at 04:32:16PM +0100, Daniel Vetter wrote: > > On Thu, Feb 04, 2021 at 04:04:00AM +0200, Ville Syrjala wrote: > > > From: Ville Syrjälä > > > > > > drm_vblank_restore() exists because certain power saving states

Re: [Intel-gfx] [PATCH] drm/vblank: Avoid storing a timestamp for the same frame twice

2021-02-04 Thread Ville Syrjälä
On Thu, Feb 04, 2021 at 04:32:16PM +0100, Daniel Vetter wrote: > On Thu, Feb 04, 2021 at 04:04:00AM +0200, Ville Syrjala wrote: > > From: Ville Syrjälä > > > > drm_vblank_restore() exists because certain power saving states > > can clobber the hardware frame counter. The way it does this is > > b

Re: [Intel-gfx] [PATCH] drm/vblank: Avoid storing a timestamp for the same frame twice

2021-02-04 Thread Daniel Vetter
On Thu, Feb 04, 2021 at 04:04:00AM +0200, Ville Syrjala wrote: > From: Ville Syrjälä > > drm_vblank_restore() exists because certain power saving states > can clobber the hardware frame counter. The way it does this is > by guesstimating how many frames were missed purely based on > the differenc

[Intel-gfx] [PATCH] drm/vblank: Avoid storing a timestamp for the same frame twice

2021-02-03 Thread Ville Syrjala
From: Ville Syrjälä drm_vblank_restore() exists because certain power saving states can clobber the hardware frame counter. The way it does this is by guesstimating how many frames were missed purely based on the difference between the last stored timestamp vs. a newly sampled timestamp. If we s