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: <447cce45-90bc-bc2c-c7cc-79270a940ae5@daenzer.net>
Date:   Wed, 11 Oct 2017 11:18:00 +0200
From:   Michel Dänzer <michel@...nzer.net>
To:     Keith Packard <keithp@...thp.com>,
        Dave Airlie <airlied@...hat.com>,
        Daniel Vetter <daniel@...ll.ch>
Cc:     linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org
Subject: Re: [PATCH 3/3] drm: Add CRTC_GET_SEQUENCE and CRTC_QUEUE_SEQUENCE
 ioctls [v3]

On 11/10/17 02:45 AM, Keith Packard wrote:
> These provide crtc-id based functions instead of pipe-number, while
> also offering higher resolution time (ns) and wider frame count (64)
> as required by the Vulkan API.
> 
> v2:
> 
>  * Check for DRIVER_MODESET in new crtc-based vblank ioctls
> 
> 	Failing to check this will oops the driver.
> 
>  * Ensure vblank interupt is running in crtc_get_sequence ioctl
> 
> 	The sequence and timing values are not correct while the
> 	interrupt is off, so make sure it's running before asking for
> 	them.
> 
>  * Short-circuit get_sequence if the counter is enabled and accurate
> 
> 	Steal the idea from the code in wait_vblank to avoid the
> 	expense of drm_vblank_get/put
> 
>  * Return active state of crtc in crtc_get_sequence ioctl
> 
> 	Might be useful for applications that aren't in charge of
> 	modesetting?
> 
>  * Use drm_crtc_vblank_get/put in new crtc-based vblank sequence ioctls
> 
> 	Daniel Vetter prefers these over the old drm_vblank_put/get
> 	APIs.
> 
>  * Return s64 ns instead of u64 in new sequence event
> 
> Suggested-by: Daniel Vetter <daniel@...ll.ch>
> Suggested-by: Ville Syrjälä <ville.syrjala@...ux.intel.com>
> 
> v3:
> 
>  * Removed FIRST_PIXEL_OUT_FLAG
>  * Document that the timestamp in the query and event are
>    that of the first pixel leaving the display engine for
>    the display (using the same wording as the Vulkan spec).
> 
> Suggested-by: Michel Dänzer <michel@...nzer.net>
> Acked-by: Dave Airlie <airlied@...hat.com>
> 
> Signed-off-by: Keith Packard <keithp@...thp.com>

Just a nitpick:

> +/* Queue event to be delivered at specified sequence. Time stamp marks
> + * when the first pixel of the refresh cycle left the display engine
> + * for the display
> + */

[...]

> @@ -903,6 +929,16 @@ struct drm_event_vblank {
>  	__u32 crtc_id; /* 0 on older kernels that do not support this */
>  };
>  
> +/* Event delivered at sequence. Time stamp marks when the first pixel
> + * of the refresh cycle left the display engine for the display
> + */

Might be better to use "leaves" instead of "left", since the event is
usually delivered and processed before the first pixel leaves the
display engine.


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ