diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2016-06-21 10:54:20 +0200 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2016-06-21 21:58:12 +0200 |
commit | b3ac9f2591061e4470834028f563ef1fd86098cf (patch) | |
tree | 25e5f421535067a589de53f10c2aee5fd7d98604 /drivers/gpu/drm/drm_ioctl.c | |
parent | d6ed682eba54915ea56315bc2e5a33fca5922997 (diff) | |
download | linux-b3ac9f2591061e4470834028f563ef1fd86098cf.tar.gz linux-b3ac9f2591061e4470834028f563ef1fd86098cf.tar.bz2 linux-b3ac9f2591061e4470834028f563ef1fd86098cf.zip |
drm: Extract drm_is_current_master
Just rolling out a bit of abstraction to be able to clean
up the master logic in the next step.
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/drm_ioctl.c')
-rw-r--r-- | drivers/gpu/drm/drm_ioctl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c index ffd6a2795230..827d221d69ce 100644 --- a/drivers/gpu/drm/drm_ioctl.c +++ b/drivers/gpu/drm/drm_ioctl.c @@ -481,7 +481,8 @@ int drm_ioctl_permit(u32 flags, struct drm_file *file_priv) return -EACCES; /* MASTER is only for master or control clients */ - if (unlikely((flags & DRM_MASTER) && !file_priv->is_master && + if (unlikely((flags & DRM_MASTER) && + !drm_is_current_master(file_priv) && !drm_is_control_client(file_priv))) return -EACCES; |