aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/drm_drv.c13
-rw-r--r--drivers/gpu/drm/drm_internal.h24
-rw-r--r--drivers/gpu/drm/drm_ioctl.c1
-rw-r--r--drivers/gpu/drm/drm_irq.c15
-rw-r--r--include/drm/drmP.h4
5 files changed, 40 insertions, 17 deletions
diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
index 970613c5a1eb..175cbbdac8c1 100644
--- a/drivers/gpu/drm/drm_drv.c
+++ b/drivers/gpu/drm/drm_drv.c
@@ -39,16 +39,6 @@
39unsigned int drm_debug = 0; /* 1 to enable debug output */ 39unsigned int drm_debug = 0; /* 1 to enable debug output */
40EXPORT_SYMBOL(drm_debug); 40EXPORT_SYMBOL(drm_debug);
41 41
42int drm_vblank_offdelay = 5000; /* Default to 5000 msecs. */
43
44unsigned int drm_timestamp_precision = 20; /* Default to 20 usecs. */
45
46/*
47 * Default to use monotonic timestamps for wait-for-vblank and page-flip
48 * complete events.
49 */
50unsigned int drm_timestamp_monotonic = 1;
51
52MODULE_AUTHOR(CORE_AUTHOR); 42MODULE_AUTHOR(CORE_AUTHOR);
53MODULE_DESCRIPTION(CORE_DESC); 43MODULE_DESCRIPTION(CORE_DESC);
54MODULE_LICENSE("GPL and additional rights"); 44MODULE_LICENSE("GPL and additional rights");
@@ -58,9 +48,6 @@ MODULE_PARM_DESC(timestamp_precision_usec, "Max. error on timestamps [usecs]");
58MODULE_PARM_DESC(timestamp_monotonic, "Use monotonic timestamps"); 48MODULE_PARM_DESC(timestamp_monotonic, "Use monotonic timestamps");
59 49
60module_param_named(debug, drm_debug, int, 0600); 50module_param_named(debug, drm_debug, int, 0600);
61module_param_named(vblankoffdelay, drm_vblank_offdelay, int, 0600);
62module_param_named(timestamp_precision_usec, drm_timestamp_precision, int, 0600);
63module_param_named(timestamp_monotonic, drm_timestamp_monotonic, int, 0600);
64 51
65static DEFINE_SPINLOCK(drm_minor_lock); 52static DEFINE_SPINLOCK(drm_minor_lock);
66static struct idr drm_minors_idr; 53static struct idr drm_minors_idr;
diff --git a/drivers/gpu/drm/drm_internal.h b/drivers/gpu/drm/drm_internal.h
new file mode 100644
index 000000000000..5fbf36bcc0b0
--- /dev/null
+++ b/drivers/gpu/drm/drm_internal.h
@@ -0,0 +1,24 @@
1/*
2 * Copyright © 2014 Intel Corporation
3 * Daniel Vetter <daniel.vetter@ffwll.ch>
4 *
5 * Permission is hereby granted, free of charge, to any person obtaining a
6 * copy of this software and associated documentation files (the "Software"),
7 * to deal in the Software without restriction, including without limitation
8 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 * and/or sell copies of the Software, and to permit persons to whom the
10 * Software is furnished to do so, subject to the following conditions:
11 *
12 * The above copyright notice and this permission notice shall be included in
13 * all copies or substantial portions of the Software.
14 *
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
19 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
20 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
21 * OTHER DEALINGS IN THE SOFTWARE.
22 */
23
24extern unsigned int drm_timestamp_monotonic;
diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c
index 4c0822973db4..7d6df78bb25d 100644
--- a/drivers/gpu/drm/drm_ioctl.c
+++ b/drivers/gpu/drm/drm_ioctl.c
@@ -31,6 +31,7 @@
31#include <drm/drmP.h> 31#include <drm/drmP.h>
32#include <drm/drm_core.h> 32#include <drm/drm_core.h>
33#include "drm_legacy.h" 33#include "drm_legacy.h"
34#include "drm_internal.h"
34 35
35#include <linux/pci.h> 36#include <linux/pci.h>
36#include <linux/export.h> 37#include <linux/export.h>
diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
index 034297640b48..80ff94ada75e 100644
--- a/drivers/gpu/drm/drm_irq.c
+++ b/drivers/gpu/drm/drm_irq.c
@@ -34,6 +34,7 @@
34 34
35#include <drm/drmP.h> 35#include <drm/drmP.h>
36#include "drm_trace.h" 36#include "drm_trace.h"
37#include "drm_internal.h"
37 38
38#include <linux/interrupt.h> /* For task queue support */ 39#include <linux/interrupt.h> /* For task queue support */
39#include <linux/slab.h> 40#include <linux/slab.h>
@@ -59,6 +60,20 @@ static bool
59drm_get_last_vbltimestamp(struct drm_device *dev, int crtc, 60drm_get_last_vbltimestamp(struct drm_device *dev, int crtc,
60 struct timeval *tvblank, unsigned flags); 61 struct timeval *tvblank, unsigned flags);
61 62
63static unsigned int drm_timestamp_precision = 20; /* Default to 20 usecs. */
64
65/*
66 * Default to use monotonic timestamps for wait-for-vblank and page-flip
67 * complete events.
68 */
69unsigned int drm_timestamp_monotonic = 1;
70
71static int drm_vblank_offdelay = 5000; /* Default to 5000 msecs. */
72
73module_param_named(vblankoffdelay, drm_vblank_offdelay, int, 0600);
74module_param_named(timestamp_precision_usec, drm_timestamp_precision, int, 0600);
75module_param_named(timestamp_monotonic, drm_timestamp_monotonic, int, 0600);
76
62/** 77/**
63 * drm_update_vblank_count - update the master vblank counter 78 * drm_update_vblank_count - update the master vblank counter
64 * @dev: DRM device 79 * @dev: DRM device
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index 3ca7b14f4f45..90ae120b2c29 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -1207,10 +1207,6 @@ extern void drm_put_dev(struct drm_device *dev);
1207extern void drm_unplug_dev(struct drm_device *dev); 1207extern void drm_unplug_dev(struct drm_device *dev);
1208extern unsigned int drm_debug; 1208extern unsigned int drm_debug;
1209 1209
1210extern int drm_vblank_offdelay;
1211extern unsigned int drm_timestamp_precision;
1212extern unsigned int drm_timestamp_monotonic;
1213
1214extern struct class *drm_class; 1210extern struct class *drm_class;
1215 1211
1216 /* Debugfs support */ 1212 /* Debugfs support */