summaryrefslogtreecommitdiff
path: root/linux-core/drm_stub.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux-core/drm_stub.c')
-rw-r--r--linux-core/drm_stub.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/linux-core/drm_stub.c b/linux-core/drm_stub.c
index 6856075b..f66dec07 100644
--- a/linux-core/drm_stub.c
+++ b/linux-core/drm_stub.c
@@ -88,6 +88,29 @@ again:
return new_id;
}
+int drm_setmaster_ioctl(struct drm_device *dev, void *data,
+ struct drm_file *file_priv)
+{
+ if (file_priv->minor->master && file_priv->minor->master != file_priv->master)
+ return -EINVAL;
+
+ if (!file_priv->master)
+ return -EINVAL;
+
+ if (!file_priv->minor->master && file_priv->minor->master != file_priv->master)
+ file_priv->minor->master = file_priv->master;
+ return 0;
+}
+
+int drm_dropmaster_ioctl(struct drm_device *dev, void *data,
+ struct drm_file *file_priv)
+{
+ if (!file_priv->master)
+ return -EINVAL;
+ file_priv->minor->master = NULL;
+ return 0;
+}
+
struct drm_master *drm_get_master(struct drm_minor *minor)
{
struct drm_master *master;