Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/atomic: Reject FLIP_ASYNC unconditionally

It's never been wired up. Only userspace that tried to use it (and
didn't actually check whether anything works, but hey it builds) is
the -modesetting atomic implementation. And we just shut that up.

If there's anyone else then we need to silently accept this flag no
matter what, and find a new one. Because once a flag is tainted, it's
lost.

Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Michel Dänzer <michel@daenzer.net>
Cc: Alex Deucher <alexdeucher@gmail.com>
Cc: Adam Jackson <ajax@redhat.com>
Cc: Sean Paul <sean@poorly.run>
Cc: David Airlie <airlied@linux.ie>
Cc: stable@vger.kernel.org
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190903190642.32588-2-daniel.vetter@ffwll.ch

+1 -2
+1 -2
drivers/gpu/drm/drm_atomic_uapi.c
··· 1305 1305 if (arg->reserved) 1306 1306 return -EINVAL; 1307 1307 1308 - if ((arg->flags & DRM_MODE_PAGE_FLIP_ASYNC) && 1309 - !dev->mode_config.async_page_flip) 1308 + if (arg->flags & DRM_MODE_PAGE_FLIP_ASYNC) 1310 1309 return -EINVAL; 1311 1310 1312 1311 /* can't test and expect an event at the same time. */