All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michel Dänzer" <michel@daenzer.net>
To: Keith Packard <keithp@keithp.com>,
	Dave Airlie <airlied@redhat.com>, Daniel Vetter <daniel@ffwll.ch>
Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 3/3] drm: Add CRTC_GET_SEQUENCE and CRTC_QUEUE_SEQUENCE ioctls [v3]
Date: Wed, 11 Oct 2017 11:18:00 +0200	[thread overview]
Message-ID: <447cce45-90bc-bc2c-c7cc-79270a940ae5@daenzer.net> (raw)
In-Reply-To: <20171011004514.9500-4-keithp@keithp.com>

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@ffwll.ch>
> Suggested-by: Ville Syrjälä <ville.syrjala@linux.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@daenzer.net>
> Acked-by: Dave Airlie <airlied@redhat.com>
> 
> Signed-off-by: Keith Packard <keithp@keithp.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

WARNING: multiple messages have this Message-ID (diff)
From: "Michel Dänzer" <michel@daenzer.net>
To: Keith Packard <keithp@keithp.com>,
	Dave Airlie <airlied@redhat.com>, Daniel Vetter <daniel@ffwll.ch>
Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 3/3] drm: Add CRTC_GET_SEQUENCE and CRTC_QUEUE_SEQUENCE ioctls [v3]
Date: Wed, 11 Oct 2017 11:18:00 +0200	[thread overview]
Message-ID: <447cce45-90bc-bc2c-c7cc-79270a940ae5@daenzer.net> (raw)
In-Reply-To: <20171011004514.9500-4-keithp@keithp.com>

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@ffwll.ch>
> Suggested-by: Ville Syrjälä <ville.syrjala@linux.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@daenzer.net>
> Acked-by: Dave Airlie <airlied@redhat.com>
> 
> Signed-off-by: Keith Packard <keithp@keithp.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
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2017-10-11  9:26 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-11  0:45 [PATCH 0/3] drm: add new vblank ioctls [v3] Keith Packard
2017-10-11  0:45 ` Keith Packard
2017-10-11  0:45 ` [PATCH 1/3] drm: Widen vblank UAPI to 64 bits. Change vblank time to ktime_t [v2] Keith Packard
2017-10-11  0:45   ` Keith Packard
2017-10-11  0:45 ` [PATCH 2/3] drm: Reorganize drm_pending_event to support future event types [v2] Keith Packard
2017-10-11  0:45   ` Keith Packard
2017-10-11 18:18   ` Sean Paul
2017-10-11  0:45 ` [PATCH 3/3] drm: Add CRTC_GET_SEQUENCE and CRTC_QUEUE_SEQUENCE ioctls [v3] Keith Packard
2017-10-11  0:45   ` Keith Packard
2017-10-11  9:18   ` Michel Dänzer [this message]
2017-10-11  9:18     ` Michel Dänzer
2017-10-11 18:18   ` Sean Paul
2017-10-11 18:18     ` Sean Paul
2017-10-13 20:58     ` Keith Packard
2017-10-13 20:58       ` Keith Packard
2017-10-13  0:50 [PATCH 0/3] drm: Add new vblank ioctls [v4] Keith Packard
2017-10-13  0:50 ` [PATCH 3/3] drm: Add CRTC_GET_SEQUENCE and CRTC_QUEUE_SEQUENCE ioctls [v3] Keith Packard
2017-10-13  0:50   ` Keith Packard

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=447cce45-90bc-bc2c-c7cc-79270a940ae5@daenzer.net \
    --to=michel@daenzer.net \
    --cc=airlied@redhat.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=keithp@keithp.com \
    --cc=linux-kernel@vger.kernel.org \
    /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.