blob: a5084742d5f8305d4c53b71581095f1825552e09 [file] [log] [blame]
From 791c1d196b57eb482aa164f0aceb068ec7aafec6 Mon Sep 17 00:00:00 2001
From: Daniel Vetter <>
Date: Tue, 3 Sep 2019 21:06:41 +0200
Subject: [PATCH] drm/atomic: Reject FLIP_ASYNC unconditionally
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
commit f2cbda2dba11de868759cae9c0d2bab5b8411406 upstream.
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
Reviewed-by: Maarten Lankhorst <>
Reviewed-by: Nicholas Kazlauskas <>
Cc: Maarten Lankhorst <>
Cc: Michel Dรคnzer <>
Cc: Alex Deucher <>
Cc: Adam Jackson <>
Cc: Sean Paul <>
Cc: David Airlie <>
Signed-off-by: Daniel Vetter <>
Signed-off-by: Paul Gortmaker <>
diff --git a/drivers/gpu/drm/drm_atomic_uapi.c b/drivers/gpu/drm/drm_atomic_uapi.c
index 428d82662dc4..9bfac8fbaf6d 100644
--- a/drivers/gpu/drm/drm_atomic_uapi.c
+++ b/drivers/gpu/drm/drm_atomic_uapi.c
@@ -1286,8 +1286,7 @@ int drm_mode_atomic_ioctl(struct drm_device *dev,
if (arg->reserved)
return -EINVAL;
- if ((arg->flags & DRM_MODE_PAGE_FLIP_ASYNC) &&
- !dev->mode_config.async_page_flip)
+ if (arg->flags & DRM_MODE_PAGE_FLIP_ASYNC)
return -EINVAL;
/* can't test and expect an event at the same time. */