drm: Make control nodes master-less v3
authorThomas Hellstrom <thellstrom@vmware.com>
Wed, 19 Feb 2014 13:21:48 +0000 (14:21 +0100)
committerSimon Horman <horms+renesas@verge.net.au>
Thu, 11 Dec 2014 01:21:51 +0000 (10:21 +0900)
commit80674dcdc8e08d3c160eb142153b9da181ac3c8b
treebaad0cb695315f10b596f4d662d8d4ccc3756d2e
parentcad7e50457fd5d9179faad36f3aa634e74fc6426
drm: Make control nodes master-less v3

Like for render-nodes, there is no point in maintaining the master concept
for control nodes, so set the struct drm_file::master pointer to NULL.

At the same time, make sure DRM_MASTER | DRM_CONTROL_ALLOW ioctls are always
allowed when called through the control node. Previously the caller also
needed to be master.

v2: Adapt to refactoring of ioctl permission check.
v3: Formatting of logical expression. Use drm_is_control_client() instead of
    drm_is_control().

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
(cherry picked from commit ac05dbc57ef2b8709bf48693bb25e16a63e8e71f)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
drivers/gpu/drm/drm_drv.c
drivers/gpu/drm/drm_fops.c
include/drm/drmP.h