[Intel-gfx] [PATCH] drm/vblank: Fixup and document timestamp update/read barriers

2015-05-07 Thread Mario Kleiner
On 05/07/2015 01:56 PM, Peter Hurley wrote: > On 05/06/2015 04:56 AM, Daniel Vetter wrote: >> On Tue, May 05, 2015 at 11:57:42AM -0400, Peter Hurley wrote: >>> On 05/05/2015 11:42 AM, Daniel Vetter wrote: On Tue, May 05, 2015 at 10:36:24AM -0400, Peter Hurley wrote: > On 05/04/2015 12:52

[Intel-gfx] [PATCH] drm/vblank: Fixup and document timestamp update/read barriers

2015-05-07 Thread Peter Hurley
On 05/06/2015 04:56 AM, Daniel Vetter wrote: > On Tue, May 05, 2015 at 11:57:42AM -0400, Peter Hurley wrote: >> On 05/05/2015 11:42 AM, Daniel Vetter wrote: >>> On Tue, May 05, 2015 at 10:36:24AM -0400, Peter Hurley wrote: On 05/04/2015 12:52 AM, Mario Kleiner wrote: > On 04/16/2015 03:03

[Intel-gfx] [PATCH] drm/vblank: Fixup and document timestamp update/read barriers

2015-05-06 Thread Daniel Vetter
On Tue, May 05, 2015 at 11:57:42AM -0400, Peter Hurley wrote: > On 05/05/2015 11:42 AM, Daniel Vetter wrote: > > On Tue, May 05, 2015 at 10:36:24AM -0400, Peter Hurley wrote: > >> On 05/04/2015 12:52 AM, Mario Kleiner wrote: > >>> On 04/16/2015 03:03 PM, Daniel Vetter wrote: > On Thu, Apr 16,

[Intel-gfx] [PATCH] drm/vblank: Fixup and document timestamp update/read barriers

2015-05-05 Thread Daniel Vetter
On Tue, May 05, 2015 at 10:36:24AM -0400, Peter Hurley wrote: > On 05/04/2015 12:52 AM, Mario Kleiner wrote: > > On 04/16/2015 03:03 PM, Daniel Vetter wrote: > >> On Thu, Apr 16, 2015 at 08:30:55AM -0400, Peter Hurley wrote: > >>> On 04/15/2015 01:31 PM, Daniel Vetter wrote: > On Wed, Apr 15,

[Intel-gfx] [PATCH] drm/vblank: Fixup and document timestamp update/read barriers

2015-05-05 Thread Peter Hurley
On 05/05/2015 11:57 AM, Peter Hurley wrote: > On 05/05/2015 11:42 AM, Daniel Vetter wrote: >> I'm also somewhat confused about how you to a line across both cpus for >> barriers because barriers only have cpu-local effects (which is why we >> always need a barrier on both ends of a transaction).

[Intel-gfx] [PATCH] drm/vblank: Fixup and document timestamp update/read barriers

2015-05-05 Thread Peter Hurley
On 05/05/2015 11:42 AM, Daniel Vetter wrote: > On Tue, May 05, 2015 at 10:36:24AM -0400, Peter Hurley wrote: >> On 05/04/2015 12:52 AM, Mario Kleiner wrote: >>> On 04/16/2015 03:03 PM, Daniel Vetter wrote: On Thu, Apr 16, 2015 at 08:30:55AM -0400, Peter Hurley wrote: > On 04/15/2015 01:31

[Intel-gfx] [PATCH] drm/vblank: Fixup and document timestamp update/read barriers

2015-05-05 Thread Peter Hurley
On 05/04/2015 12:52 AM, Mario Kleiner wrote: > On 04/16/2015 03:03 PM, Daniel Vetter wrote: >> On Thu, Apr 16, 2015 at 08:30:55AM -0400, Peter Hurley wrote: >>> On 04/15/2015 01:31 PM, Daniel Vetter wrote: On Wed, Apr 15, 2015 at 09:00:04AM -0400, Peter Hurley wrote: > Hi Daniel, >

[Intel-gfx] [PATCH] drm/vblank: Fixup and document timestamp update/read barriers

2015-05-04 Thread Mario Kleiner
On 04/16/2015 03:03 PM, Daniel Vetter wrote: > On Thu, Apr 16, 2015 at 08:30:55AM -0400, Peter Hurley wrote: >> On 04/15/2015 01:31 PM, Daniel Vetter wrote: >>> On Wed, Apr 15, 2015 at 09:00:04AM -0400, Peter Hurley wrote: Hi Daniel, On 04/15/2015 03:17 AM, Daniel Vetter wrote:

[Intel-gfx] [PATCH] drm/vblank: Fixup and document timestamp update/read barriers

2015-04-16 Thread Daniel Vetter
On Thu, Apr 16, 2015 at 08:30:55AM -0400, Peter Hurley wrote: > On 04/15/2015 01:31 PM, Daniel Vetter wrote: > > On Wed, Apr 15, 2015 at 09:00:04AM -0400, Peter Hurley wrote: > >> Hi Daniel, > >> > >> On 04/15/2015 03:17 AM, Daniel Vetter wrote: > >>> This was a bit too much cargo-culted, so lets

[PATCH] drm/vblank: Fixup and document timestamp update/read barriers

2015-04-16 Thread Daniel Vetter
On Thu, Apr 16, 2015 at 05:00:02AM -0400, Peter Hurley wrote: > On 04/16/2015 02:39 AM, Mario Kleiner wrote: > > I think i'm still not getting something about why the compiler would > > be allowed to reorder in this way in absence of the additional > > smp_rmb? Or is that barrier required for

[PATCH] drm/vblank: Fixup and document timestamp update/read barriers

2015-04-16 Thread Daniel Vetter
This was a bit too much cargo-culted, so lets make it solid: - vblank->count doesn't need to be an atomic, writes are always done under the protection of dev->vblank_time_lock. Switch to an unsigned long instead and update comments. Note that atomic_read is just a normal read of a volatile

[PATCH] drm/vblank: Fixup and document timestamp update/read barriers

2015-04-16 Thread Daniel Vetter
On Wed, Apr 15, 2015 at 11:26:37PM +0200, Mario Kleiner wrote: > A couple of questions to educate me and one review comment. > > On 04/15/2015 07:34 PM, Daniel Vetter wrote: > >This was a bit too much cargo-culted, so lets make it solid: > >- vblank->count doesn't need to be an atomic, writes are

[PATCH] drm/vblank: Fixup and document timestamp update/read barriers

2015-04-16 Thread Peter Hurley
On 04/16/2015 02:39 AM, Mario Kleiner wrote: > On 04/16/2015 03:29 AM, Peter Hurley wrote: >> On 04/15/2015 05:26 PM, Mario Kleiner wrote: >> Because the time scales for these events don't require that level of >> resolution; consider how much code has to get executed between a >> hardware vblank

[PATCH] drm/vblank: Fixup and document timestamp update/read barriers

2015-04-16 Thread Mario Kleiner
On 04/16/2015 03:29 AM, Peter Hurley wrote: > On 04/15/2015 05:26 PM, Mario Kleiner wrote: >> A couple of questions to educate me and one review comment. >> >> On 04/15/2015 07:34 PM, Daniel Vetter wrote: >>> This was a bit too much cargo-culted, so lets make it solid: >>> - vblank->count doesn't

[Intel-gfx] [PATCH] drm/vblank: Fixup and document timestamp update/read barriers

2015-04-16 Thread Peter Hurley
On 04/15/2015 01:31 PM, Daniel Vetter wrote: > On Wed, Apr 15, 2015 at 09:00:04AM -0400, Peter Hurley wrote: >> Hi Daniel, >> >> On 04/15/2015 03:17 AM, Daniel Vetter wrote: >>> This was a bit too much cargo-culted, so lets make it solid: >>> - vblank->count doesn't need to be an atomic, writes

[PATCH] drm/vblank: Fixup and document timestamp update/read barriers

2015-04-16 Thread Peter Hurley
On 04/16/2015 02:39 AM, Mario Kleiner wrote: > On 04/16/2015 03:29 AM, Peter Hurley wrote: >> On 04/15/2015 05:26 PM, Mario Kleiner wrote: >>> A couple of questions to educate me and one review comment. >>> >>> On 04/15/2015 07:34 PM, Daniel Vetter wrote: This was a bit too much cargo-culted,

[PATCH] drm/vblank: Fixup and document timestamp update/read barriers

2015-04-16 Thread Mario Kleiner
A couple of questions to educate me and one review comment. On 04/15/2015 07:34 PM, Daniel Vetter wrote: > This was a bit too much cargo-culted, so lets make it solid: > - vblank->count doesn't need to be an atomic, writes are always done >under the protection of dev->vblank_time_lock. Switch

[PATCH] drm/vblank: Fixup and document timestamp update/read barriers

2015-04-15 Thread Peter Hurley
On 04/15/2015 05:26 PM, Mario Kleiner wrote: > A couple of questions to educate me and one review comment. > > On 04/15/2015 07:34 PM, Daniel Vetter wrote: >> This was a bit too much cargo-culted, so lets make it solid: >> - vblank->count doesn't need to be an atomic, writes are always done >>

[PATCH] drm/vblank: Fixup and document timestamp update/read barriers

2015-04-15 Thread Daniel Vetter
This was a bit too much cargo-culted, so lets make it solid: - vblank->count doesn't need to be an atomic, writes are always done under the protection of dev->vblank_time_lock. Switch to an unsigned long instead and update comments. Note that atomic_read is just a normal read of a volatile

[Intel-gfx] [PATCH] drm/vblank: Fixup and document timestamp update/read barriers

2015-04-15 Thread Daniel Vetter
On Wed, Apr 15, 2015 at 09:00:04AM -0400, Peter Hurley wrote: > Hi Daniel, > > On 04/15/2015 03:17 AM, Daniel Vetter wrote: > > This was a bit too much cargo-culted, so lets make it solid: > > - vblank->count doesn't need to be an atomic, writes are always done > > under the protection of

[PATCH] drm/vblank: Fixup and document timestamp update/read barriers

2015-04-15 Thread Chris Wilson
On Wed, Apr 15, 2015 at 07:34:43PM +0200, Daniel Vetter wrote: > This was a bit too much cargo-culted, so lets make it solid: > - vblank->count doesn't need to be an atomic, writes are always done > under the protection of dev->vblank_time_lock. Switch to an unsigned > long instead and update

[PATCH] drm/vblank: Fixup and document timestamp update/read barriers

2015-04-15 Thread Daniel Vetter
This was a bit too much cargo-culted, so lets make it solid: - vblank->count doesn't need to be an atomic, writes are always done under the protection of dev->vblank_time_lock. Switch to an unsigned long instead and update comments. Note that atomic_read is just a normal read of a volatile

[Intel-gfx] [PATCH] drm/vblank: Fixup and document timestamp update/read barriers

2015-04-15 Thread Daniel Vetter
On Wed, Apr 15, 2015 at 09:17:03AM +0100, Chris Wilson wrote: > On Wed, Apr 15, 2015 at 09:17:02AM +0200, Daniel Vetter wrote: > > diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c > > index c8a34476570a..23bfbc61a494 100644 > > --- a/drivers/gpu/drm/drm_irq.c > > +++

[Intel-gfx] [PATCH] drm/vblank: Fixup and document timestamp update/read barriers

2015-04-15 Thread Chris Wilson
On Wed, Apr 15, 2015 at 11:25:00AM +0200, Daniel Vetter wrote: > On Wed, Apr 15, 2015 at 09:17:03AM +0100, Chris Wilson wrote: > > On Wed, Apr 15, 2015 at 09:17:02AM +0200, Daniel Vetter wrote: > > > diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c > > > index

[PATCH] drm/vblank: Fixup and document timestamp update/read barriers

2015-04-15 Thread Chris Wilson
On Wed, Apr 15, 2015 at 09:17:02AM +0200, Daniel Vetter wrote: > diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c > index c8a34476570a..23bfbc61a494 100644 > --- a/drivers/gpu/drm/drm_irq.c > +++ b/drivers/gpu/drm/drm_irq.c > @@ -74,6 +74,33 @@ module_param_named(vblankoffdelay,

[PATCH] drm/vblank: Fixup and document timestamp update/read barriers

2015-04-15 Thread Daniel Vetter
This was a bit too much cargo-culted, so lets make it solid: - vblank->count doesn't need to be an atomic, writes are always done under the protection of dev->vblank_time_lock. Switch to an unsigned long instead and update comments. Note that atomic_read is just a normal read of a volatile

[PATCH] drm/vblank: Fixup and document timestamp update/read barriers

2015-04-15 Thread Peter Hurley
Hi Daniel, On 04/15/2015 03:17 AM, Daniel Vetter wrote: > This was a bit too much cargo-culted, so lets make it solid: > - vblank->count doesn't need to be an atomic, writes are always done > under the protection of dev->vblank_time_lock. Switch to an unsigned > long instead and update