lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170706140805.GZ12629@intel.com>
Date:   Thu, 6 Jul 2017 17:08:05 +0300
From:   Ville Syrjälä <ville.syrjala@...ux.intel.com>
To:     Daniel Vetter <daniel@...ll.ch>
Cc:     Keith Packard <keithp@...thp.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Dave Airlie <airlied@...hat.com>,
        dri-devel <dri-devel@...ts.freedesktop.org>
Subject: Re: [PATCH 3/3] drm: Add CRTC_GET_SEQUENCE and CRTC_QUEUE_SEQUENCE
 ioctls

On Thu, Jul 06, 2017 at 01:04:18PM +0200, Daniel Vetter wrote:
> On Thu, Jul 6, 2017 at 12:16 PM, Ville Syrjälä
> <ville.syrjala@...ux.intel.com> wrote:
> >> > +   if (!dev->irq_enabled)
> >> > +           return -EINVAL;
> >> > +
> >> > +   crtc = drm_crtc_find(dev, get_seq->crtc_id);
> >> > +   if (!crtc)
> >> > +           return -ENOENT;
> >> > +
> >> > +   pipe = drm_crtc_index(crtc);
> >> > +
> >> > +   get_seq->sequence = drm_vblank_count_and_time(dev, pipe, &now);
> >>
> >> This can give you and old vblank if the vblank is off (i.e. sw state
> >> hasn't be regularly updated). I think we want a new
> >> drm_crtc_accurate_vblank_count_and_time variant.
> >
> > Or better yet just do what Chris did for the old ioctl in commit
> > b33b02707ba3 ("drm: Peek at the current counter/timestamp for vblank queries")
> 
> Yeah the READ_ONCE(vblank->enabled) is a nice fastpath. But we still
> need the accurate one as slowpath in case the vblank irq is off.

Maybe, or maybe we want to turn the interrupt on in that case? That's
what the old ioctl does.

-- 
Ville Syrjälä
Intel OTC

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ