[PATCH xserver 1/2] xf86-video-modesetting: Add ms_queue_vblank helper
Chris Wilson
chris at chris-wilson.co.uk
Sun Apr 15 15:33:58 UTC 2018
Quoting Keith Packard (2017-09-29 07:20:46)
> This provides an API wrapper around the kernel interface for queueing
> a vblank event, simplifying all of the callers.
>
> Signed-off-by: Keith Packard <keithp at keithp.com>
> ---
> diff --git a/hw/xfree86/drivers/modesetting/dri2.c b/hw/xfree86/drivers/modesetting/dri2.c
> index bfaea3b84..b2278e78b 100644
> --- a/hw/xfree86/drivers/modesetting/dri2.c
> +++ b/hw/xfree86/drivers/modesetting/dri2.c
> @@ -747,13 +744,8 @@ ms_dri2_schedule_wait_msc(ClientPtr client, DrawablePtr draw, CARD64 target_msc,
>
> if (current_msc >= target_msc)
> target_msc = current_msc;
> - vbl.request.type = (DRM_VBLANK_ABSOLUTE |
> - DRM_VBLANK_EVENT |
> - drmmode_crtc->vblank_pipe);
> - vbl.request.sequence = ms_crtc_msc_to_kernel_msc(crtc, target_msc);
> - vbl.request.signal = (unsigned long)seq;
>
> - ret = drmWaitVBlank(ms->fd, &vbl);
> + ret = ms_queue_vblank(crtc, MS_QUEUE_ABSOLUTE, target_msc, &queued_msc, seq);
> if (ret) {
> static int limit = 5;
> if (limit) {
Inverted error check.
-Chris
More information about the xorg-devel
mailing list