All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel.vetter@ffwll.ch>
To: Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Cc: Daniel Vetter <daniel.vetter@intel.com>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	fernetmenta@kodi.tv
Subject: [PATCH 1/3] RFC: drm: Restrict vblank ioctl to master
Date: Tue, 14 Jun 2016 11:02:10 +0200	[thread overview]
Message-ID: <1465894932-3759-1-git-send-email-daniel.vetter@ffwll.ch> (raw)

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.

Cc: fritsch@kodi.tv
Cc: fernetmenta@kodi.tv
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 drivers/gpu/drm/drm_ioctl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c
index 0510675eec5d..6cc78d648393 100644
--- a/drivers/gpu/drm/drm_ioctl.c
+++ b/drivers/gpu/drm/drm_ioctl.c
@@ -529,9 +529,9 @@ static const struct drm_ioctl_desc drm_ioctls[] = {
 	DRM_IOCTL_DEF(DRM_IOCTL_SG_ALLOC, drm_legacy_sg_alloc, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
 	DRM_IOCTL_DEF(DRM_IOCTL_SG_FREE, drm_legacy_sg_free, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
 
-	DRM_IOCTL_DEF(DRM_IOCTL_WAIT_VBLANK, drm_wait_vblank, DRM_UNLOCKED),
+	DRM_IOCTL_DEF(DRM_IOCTL_WAIT_VBLANK, drm_wait_vblank, DRM_MASTER|DRM_UNLOCKED),
 
-	DRM_IOCTL_DEF(DRM_IOCTL_MODESET_CTL, drm_modeset_ctl, 0),
+	DRM_IOCTL_DEF(DRM_IOCTL_MODESET_CTL, drm_modeset_ctl, DRM_MASTER),
 
 	DRM_IOCTL_DEF(DRM_IOCTL_UPDATE_DRAW, drm_noop, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
 
-- 
2.8.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

             reply	other threads:[~2016-06-14  9:02 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-14  9:02 Daniel Vetter [this message]
2016-06-14  9:02 ` [PATCH 2/3] drm: Mark authmagic ioctls as unlocked Daniel Vetter
2016-06-14  9:02 ` [PATCH 3/3] drm: Mark set/drop master ioctl " Daniel Vetter
2016-06-14  9:06 ` ✗ Ro.CI.BAT: failure for series starting with [1/3] RFC: drm: Restrict vblank ioctl to master Patchwork
2018-08-08 15:35 ` [PATCH 1/3] " Rainer Hochecker
2018-08-08 16:59   ` Daniel Vetter
2018-08-08 17:41     ` Rainer Hochecker
2016-06-14  9:03 Daniel Vetter
2016-06-14  9:09 ` Michel Dänzer
2016-06-14  9:35   ` Daniel Vetter
2016-06-15  7:29     ` Michel Dänzer
2016-06-15  8:57       ` Daniel Vetter
2016-06-16 13:02         ` Rainer Hochecker
2016-06-16 16:17           ` Daniel Vetter
2016-06-17 12:00             ` Rainer Hochecker
2016-06-20 14:46               ` Daniel Stone
2016-06-20 18:24                 ` Rainer Hochecker
2016-06-20 23:27                   ` Daniel Stone
2016-06-21  4:57                     ` Rainer Hochecker
2016-06-21  5:01                       ` Daniel Stone
2016-06-21  5:15                         ` Rainer Hochecker
2016-06-23 19:54                           ` Rainer Hochecker
2016-06-23 20:55                             ` Daniel Stone
2016-07-12 10:29                               ` Daniel Vetter
2016-07-13  6:50                                 ` Rainer Hochecker
2016-07-13  9:43                                   ` Michel Dänzer
2016-07-13  9:48                                     ` Daniel Vetter
     [not found]                                       ` <CAH0Sn6G3RqaKWF8CiNC65ZNGm0m=ROBjwk8j_KBZwbokS+kS-g@mail.gmail.com>
2016-07-13  9:54                                         ` Rainer Hochecker
     [not found]                                     ` <CAH0Sn6EAtoVDZUwYyYVLT3dsdN52T1VQtA0hBUbjNvzbMwJLgQ@mail.gmail.com>
2016-07-13  9:49                                       ` Rainer Hochecker
2016-07-25  7:38                                         ` Michel Dänzer
2016-07-25 11:15                                           ` Rainer Hochecker
2017-05-05 19:35                                             ` Daniel Vetter
2017-05-05 21:41                                               ` Mario Kleiner
2017-05-06  5:43                                                 ` Rainer Hochecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1465894932-3759-1-git-send-email-daniel.vetter@ffwll.ch \
    --to=daniel.vetter@ffwll.ch \
    --cc=daniel.vetter@intel.com \
    --cc=fernetmenta@kodi.tv \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.