xref: /freebsd/sys/dev/drm2/drm_stub.c (revision f0bd5302dd9e20355beadd0f260ffb926b6ac164)
1 /**
2  * \file drm_stub.h
3  * Stub support
4  *
5  * \author Rickard E. (Rik) Faith <faith@valinux.com>
6  */
7 
8 /*
9  * Created: Fri Jan 19 10:48:35 2001 by faith@acm.org
10  *
11  * Copyright 2001 VA Linux Systems, Inc., Sunnyvale, California.
12  * All Rights Reserved.
13  *
14  * Permission is hereby granted, free of charge, to any person obtaining a
15  * copy of this software and associated documentation files (the "Software"),
16  * to deal in the Software without restriction, including without limitation
17  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
18  * and/or sell copies of the Software, and to permit persons to whom the
19  * Software is furnished to do so, subject to the following conditions:
20  *
21  * The above copyright notice and this permission notice (including the next
22  * paragraph) shall be included in all copies or substantial portions of the
23  * Software.
24  *
25  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
26  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
27  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
28  * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
29  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
30  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
31  * DEALINGS IN THE SOFTWARE.
32  */
33 
34 #include <sys/cdefs.h>
35 __FBSDID("$FreeBSD$");
36 
37 #include "drmP.h"
38 
39 int
40 drm_setmaster_ioctl(struct drm_device *dev, void *data,
41     struct drm_file *file_priv)
42 {
43 
44 	DRM_DEBUG("setmaster\n");
45 
46 	if (file_priv->master != 0)
47 		return (0);
48 	return (-EPERM);
49 }
50 
51 int
52 drm_dropmaster_ioctl(struct drm_device *dev, void *data,
53     struct drm_file *file_priv)
54 {
55 
56 	DRM_DEBUG("dropmaster\n");
57 	if (file_priv->master != 0)
58 		return (-EINVAL);
59 	return (0);
60 }
61