[PATCH xserver 4/5] modesetting: remove always true DRM_IOCTL_CRTC_QUEUE_SEQUENCE guard

Emil Velikov emil.l.velikov at gmail.com
Wed Mar 7 18:45:32 UTC 2018


From: Emil Velikov <emil.velikov at collabora.com>

We already require libdrm 2.4.89 which provides the definition plus
guarding kernel UABI like that is generally a bad idea.

See previous commit for details why :-)

Cc: Keith Packard <keithp at keithp.com>
Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
 hw/xfree86/drivers/modesetting/vblank.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/hw/xfree86/drivers/modesetting/vblank.c b/hw/xfree86/drivers/modesetting/vblank.c
index 1d331ccdb..ae3018b4b 100644
--- a/hw/xfree86/drivers/modesetting/vblank.c
+++ b/hw/xfree86/drivers/modesetting/vblank.c
@@ -182,7 +182,6 @@ ms_get_kernel_ust_msc(xf86CrtcPtr crtc,
     drmVBlank vbl;
     int ret;
 
-#ifdef DRM_IOCTL_CRTC_QUEUE_SEQUENCE
     if (ms->has_queue_sequence || !ms->tried_queue_sequence) {
         uint64_t ns;
         ms->tried_queue_sequence = TRUE;
@@ -196,7 +195,6 @@ ms_get_kernel_ust_msc(xf86CrtcPtr crtc,
             return ret == 0;
         }
     }
-#endif
     /* Get current count */
     vbl.request.type = DRM_VBLANK_RELATIVE | drmmode_crtc->vblank_pipe;
     vbl.request.sequence = 0;
@@ -226,7 +224,6 @@ ms_queue_vblank(xf86CrtcPtr crtc, ms_queue_flag flags,
 
     for (;;) {
         /* Queue an event at the specified sequence */
-#ifdef DRM_IOCTL_CRTC_QUEUE_SEQUENCE
         if (ms->has_queue_sequence || !ms->tried_queue_sequence) {
             uint32_t drm_flags = 0;
             uint64_t kernel;
@@ -255,7 +252,6 @@ ms_queue_vblank(xf86CrtcPtr crtc, ms_queue_flag flags,
                 goto check;
             }
         }
-#endif
         vbl.request.type = DRM_VBLANK_EVENT | drmmode_crtc->vblank_pipe;
         if (flags & MS_QUEUE_RELATIVE)
             vbl.request.type |= DRM_VBLANK_RELATIVE;
@@ -273,9 +269,7 @@ ms_queue_vblank(xf86CrtcPtr crtc, ms_queue_flag flags,
                 *msc_queued = ms_kernel_msc_to_crtc_msc(crtc, vbl.reply.sequence);
             return TRUE;
         }
-#ifdef DRM_IOCTL_CRTC_QUEUE_SEQUENCE
     check:
-#endif
         if (errno != EBUSY) {
             ms_drm_abort_seq(scrn, seq);
             return FALSE;
-- 
2.16.0



More information about the xorg-devel mailing list