All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: "Michel Dänzer" <michel@daenzer.net>,
	"DRI Development" <dri-devel@lists.freedesktop.org>,
	"Daniel Vetter" <daniel.vetter@intel.com>,
	"Intel Graphics Development" <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH] drm/vblank: Fixup and document timestamp update/read barriers
Date: Wed, 15 Apr 2015 09:17:03 +0100	[thread overview]
Message-ID: <20150415081703.GR16216@nuc-i3427.alporthouse.com> (raw)
In-Reply-To: <1429082222-20820-1-git-send-email-daniel.vetter@ffwll.ch>

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, drm_vblank_offdelay, int, 0600);
>  module_param_named(timestamp_precision_usec, drm_timestamp_precision, int, 0600);
>  module_param_named(timestamp_monotonic, drm_timestamp_monotonic, int, 0600);
>  
> +static void store_vblank(struct drm_device *dev, int crtc,
> +			 unsigned vblank_count_inc,
> +			 struct timeval *t_vblank)
> +{
> +	struct drm_vblank_crtc *vblank = &dev->vblank[crtc];
> +	u32 tslot;
> +
> +	assert_spin_locked(&dev->vblank_time_lock);
> +
> +	if (t_vblank) {
> +		tslot = vblank->count + vblank_count_inc;
> +		vblanktimestamp(dev, crtc, tslot) = *t_vblank;
> +	}

It is not obvious this updates the right tslot in all circumstances.
Care to explain?

Otherwise the rest looks consistent with seqlock, using the
vblank->count as the latch.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-04-15  8:17 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-15  7:17 [PATCH] drm/vblank: Fixup and document timestamp update/read barriers Daniel Vetter
2015-04-15  8:17 ` Chris Wilson [this message]
2015-04-15  9:25   ` Daniel Vetter
2015-04-15  9:36     ` Chris Wilson
2015-04-15 10:32 ` Daniel Vetter
2015-04-15 17:34   ` Daniel Vetter
2015-04-15 17:49     ` Chris Wilson
2015-04-15 21:26     ` Mario Kleiner
2015-04-16  1:29       ` Peter Hurley
2015-04-16  6:39         ` Mario Kleiner
2015-04-16  9:00           ` Peter Hurley
2015-04-16  9:06             ` Daniel Vetter
2015-04-16 12:52           ` Peter Hurley
2015-04-16  8:54       ` Daniel Vetter
2015-04-16  0:17     ` shuang.he
2015-04-16  8:59     ` Daniel Vetter
2015-04-17  4:27       ` shuang.he
2015-04-16  0:18   ` shuang.he
2015-04-15 13:00 ` Peter Hurley
2015-04-15 17:31   ` Daniel Vetter
2015-04-16 12:30     ` Peter Hurley
2015-04-16 13:03       ` [Intel-gfx] " Daniel Vetter
2015-05-04  4:52         ` Mario Kleiner
2015-05-05 14:36           ` Peter Hurley
2015-05-05 15:42             ` [Intel-gfx] " Daniel Vetter
2015-05-05 15:57               ` Peter Hurley
2015-05-05 19:01                 ` Peter Hurley
2015-05-06  8:56                 ` Daniel Vetter
2015-05-07 11:56                   ` [Intel-gfx] " Peter Hurley
2015-05-07 17:33                     ` Mario Kleiner
2015-04-15 19:40 ` shuang.he

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150415081703.GR16216@nuc-i3427.alporthouse.com \
    --to=chris@chris-wilson.co.uk \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=michel@daenzer.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.