summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2016-06-14 11:55:22 +0200
committerDaniel Vetter <daniel.vetter@ffwll.ch>2024-01-08 14:01:05 +0100
commit3baf2b529c69774b53dbabd01e8e18a505090fed (patch)
treea78b56316e99609a7365ed8e940bc4456ced8e7d
parent09c72028392cf5e12532411c0a0caa72d886b6b6 (diff)
RFC: drm: Restrict vblank ioctl to master
Somehow this escaped us, this is a KMS ioctl which should only be used by the master (which is the thing that's also in control of kms resources). Everything else is bound to result in fail. Clients shouldn't have a trouble coping with this, since a pile of drivers don't support vblank waits (or just randomly fall over when using them). Note that the big motivation for abusing this like mad seems to be that EGL doesn't have OML_sync, but somehow it didn't cross anyone's mind that adding OML_sync to EGL would be useful. This patch is meant to essentially start kicking that can from the back end. Update: Kodi maintainers removed this code on 7th August, to be released in Kodi v18 in Sept 2018. v2: Drop accidental hunk (Michel). v3: Also add the new crtc sequence ioctls that have been added meanwhile ... Cc: Michel Dänzer <michel@daenzer.net> Cc: fritsch@kodi.tv Cc: fernetmenta@kodi.tv Cc: Rainer Hochecker <fernetmenta@kodi.tv> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
-rw-r--r--drivers/gpu/drm/drm_ioctl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c
index e368fc084c77..ab40e70228ca 100644
--- a/drivers/gpu/drm/drm_ioctl.c
+++ b/drivers/gpu/drm/drm_ioctl.c
@@ -596,7 +596,7 @@ static const struct drm_ioctl_desc drm_ioctls[] = {
DRM_IOCTL_DEF(DRM_IOCTL_FINISH, drm_noop, DRM_AUTH),
- DRM_IOCTL_DEF(DRM_IOCTL_WAIT_VBLANK, drm_wait_vblank_ioctl, 0),
+ DRM_IOCTL_DEF(DRM_IOCTL_WAIT_VBLANK, drm_wait_vblank_ioctl, DRM_MASTER),
DRM_IOCTL_DEF(DRM_IOCTL_UPDATE_DRAW, drm_noop, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
@@ -666,8 +666,8 @@ static const struct drm_ioctl_desc drm_ioctls[] = {
DRM_RENDER_ALLOW),
DRM_IOCTL_DEF(DRM_IOCTL_SYNCOBJ_QUERY, drm_syncobj_query_ioctl,
DRM_RENDER_ALLOW),
- DRM_IOCTL_DEF(DRM_IOCTL_CRTC_GET_SEQUENCE, drm_crtc_get_sequence_ioctl, 0),
- DRM_IOCTL_DEF(DRM_IOCTL_CRTC_QUEUE_SEQUENCE, drm_crtc_queue_sequence_ioctl, 0),
+ DRM_IOCTL_DEF(DRM_IOCTL_CRTC_GET_SEQUENCE, drm_crtc_get_sequence_ioctl, DRM_MASTER),
+ DRM_IOCTL_DEF(DRM_IOCTL_CRTC_QUEUE_SEQUENCE, drm_crtc_queue_sequence_ioctl, DRM_MASTER),
DRM_IOCTL_DEF(DRM_IOCTL_MODE_CREATE_LEASE, drm_mode_create_lease_ioctl, DRM_MASTER),
DRM_IOCTL_DEF(DRM_IOCTL_MODE_LIST_LESSEES, drm_mode_list_lessees_ioctl, DRM_MASTER),
DRM_IOCTL_DEF(DRM_IOCTL_MODE_GET_LEASE, drm_mode_get_lease_ioctl, DRM_MASTER),