648a2ecdedbe8f7f99ae105fc896104e3dc78a4d
[dragonfly.git] / sys / dev / drm / drm_stub.c
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  * $FreeBSD: src/sys/dev/drm2/drm_stub.c,v 1.1 2012/05/22 11:07:44 kib Exp $
34  */
35
36 #include <drm/drmP.h>
37
38 /*
39  * Default to use monotonic timestamps for wait-for-vblank and page-flip
40  * complete events.
41  */
42 unsigned int drm_timestamp_monotonic = 1;
43
44 int
45 drm_setmaster_ioctl(struct drm_device *dev, void *data,
46     struct drm_file *file_priv)
47 {
48
49         DRM_DEBUG("setmaster\n");
50
51         if (file_priv->master != 0)
52                 return (0);
53         return (-EPERM);
54 }
55
56 int
57 drm_dropmaster_ioctl(struct drm_device *dev, void *data,
58     struct drm_file *file_priv)
59 {
60
61         DRM_DEBUG("dropmaster\n");
62         if (file_priv->master != 0)
63                 return (-EINVAL);
64         return (0);
65 }