aboutsummaryrefslogtreecommitdiffstats
path: root/include/drm/drmP.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/drm/drmP.h')
-rw-r--r--include/drm/drmP.h57
1 files changed, 42 insertions, 15 deletions
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index 45b67d9c39c1..c8e64bbadbcf 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -88,7 +88,37 @@ struct drm_device;
88#define DRM_UT_CORE 0x01 88#define DRM_UT_CORE 0x01
89#define DRM_UT_DRIVER 0x02 89#define DRM_UT_DRIVER 0x02
90#define DRM_UT_KMS 0x04 90#define DRM_UT_KMS 0x04
91#define DRM_UT_MODE 0x08 91/*
92 * Three debug levels are defined.
93 * drm_core, drm_driver, drm_kms
94 * drm_core level can be used in the generic drm code. For example:
95 * drm_ioctl, drm_mm, drm_memory
96 * The macro definiton of DRM_DEBUG is used.
97 * DRM_DEBUG(fmt, args...)
98 * The debug info by using the DRM_DEBUG can be obtained by adding
99 * the boot option of "drm.debug=1".
100 *
101 * drm_driver level can be used in the specific drm driver. It is used
102 * to add the debug info related with the drm driver. For example:
103 * i915_drv, i915_dma, i915_gem, radeon_drv,
104 * The macro definition of DRM_DEBUG_DRIVER can be used.
105 * DRM_DEBUG_DRIVER(fmt, args...)
106 * The debug info by using the DRM_DEBUG_DRIVER can be obtained by
107 * adding the boot option of "drm.debug=0x02"
108 *
109 * drm_kms level can be used in the KMS code related with specific drm driver.
110 * It is used to add the debug info related with KMS mode. For example:
111 * the connector/crtc ,
112 * The macro definition of DRM_DEBUG_KMS can be used.
113 * DRM_DEBUG_KMS(fmt, args...)
114 * The debug info by using the DRM_DEBUG_KMS can be obtained by
115 * adding the boot option of "drm.debug=0x04"
116 *
117 * If we add the boot option of "drm.debug=0x06", we can get the debug info by
118 * using the DRM_DEBUG_KMS and DRM_DEBUG_DRIVER.
119 * If we add the boot option of "drm.debug=0x05", we can get the debug info by
120 * using the DRM_DEBUG_KMS and DRM_DEBUG.
121 */
92 122
93extern void drm_ut_debug_printk(unsigned int request_level, 123extern void drm_ut_debug_printk(unsigned int request_level,
94 const char *prefix, 124 const char *prefix,
@@ -174,19 +204,14 @@ extern void drm_ut_debug_printk(unsigned int request_level,
174 __func__, fmt, ##args); \ 204 __func__, fmt, ##args); \
175 } while (0) 205 } while (0)
176 206
177#define DRM_DEBUG_DRIVER(prefix, fmt, args...) \ 207#define DRM_DEBUG_DRIVER(fmt, args...) \
178 do { \ 208 do { \
179 drm_ut_debug_printk(DRM_UT_DRIVER, prefix, \ 209 drm_ut_debug_printk(DRM_UT_DRIVER, DRM_NAME, \
180 __func__, fmt, ##args); \ 210 __func__, fmt, ##args); \
181 } while (0) 211 } while (0)
182#define DRM_DEBUG_KMS(prefix, fmt, args...) \ 212#define DRM_DEBUG_KMS(fmt, args...) \
183 do { \ 213 do { \
184 drm_ut_debug_printk(DRM_UT_KMS, prefix, \ 214 drm_ut_debug_printk(DRM_UT_KMS, DRM_NAME, \
185 __func__, fmt, ##args); \
186 } while (0)
187#define DRM_DEBUG_MODE(prefix, fmt, args...) \
188 do { \
189 drm_ut_debug_printk(DRM_UT_MODE, prefix, \
190 __func__, fmt, ##args); \ 215 __func__, fmt, ##args); \
191 } while (0) 216 } while (0)
192#define DRM_LOG(fmt, args...) \ 217#define DRM_LOG(fmt, args...) \
@@ -210,9 +235,8 @@ extern void drm_ut_debug_printk(unsigned int request_level,
210 NULL, fmt, ##args); \ 235 NULL, fmt, ##args); \
211 } while (0) 236 } while (0)
212#else 237#else
213#define DRM_DEBUG_DRIVER(prefix, fmt, args...) do { } while (0) 238#define DRM_DEBUG_DRIVER(fmt, args...) do { } while (0)
214#define DRM_DEBUG_KMS(prefix, fmt, args...) do { } while (0) 239#define DRM_DEBUG_KMS(fmt, args...) do { } while (0)
215#define DRM_DEBUG_MODE(prefix, fmt, args...) do { } while (0)
216#define DRM_DEBUG(fmt, arg...) do { } while (0) 240#define DRM_DEBUG(fmt, arg...) do { } while (0)
217#define DRM_LOG(fmt, arg...) do { } while (0) 241#define DRM_LOG(fmt, arg...) do { } while (0)
218#define DRM_LOG_KMS(fmt, args...) do { } while (0) 242#define DRM_LOG_KMS(fmt, args...) do { } while (0)
@@ -786,6 +810,9 @@ struct drm_driver {
786 int (*gem_init_object) (struct drm_gem_object *obj); 810 int (*gem_init_object) (struct drm_gem_object *obj);
787 void (*gem_free_object) (struct drm_gem_object *obj); 811 void (*gem_free_object) (struct drm_gem_object *obj);
788 812
813 /* vga arb irq handler */
814 void (*vgaarb_irq)(struct drm_device *dev, bool state);
815
789 /* Driver private ops for this object */ 816 /* Driver private ops for this object */
790 struct vm_operations_struct *gem_vm_ops; 817 struct vm_operations_struct *gem_vm_ops;
791 818
@@ -1417,7 +1444,7 @@ drm_gem_object_unreference(struct drm_gem_object *obj)
1417 1444
1418int drm_gem_handle_create(struct drm_file *file_priv, 1445int drm_gem_handle_create(struct drm_file *file_priv,
1419 struct drm_gem_object *obj, 1446 struct drm_gem_object *obj,
1420 int *handlep); 1447 u32 *handlep);
1421 1448
1422static inline void 1449static inline void
1423drm_gem_object_handle_reference(struct drm_gem_object *obj) 1450drm_gem_object_handle_reference(struct drm_gem_object *obj)
@@ -1443,7 +1470,7 @@ drm_gem_object_handle_unreference(struct drm_gem_object *obj)
1443 1470
1444struct drm_gem_object *drm_gem_object_lookup(struct drm_device *dev, 1471struct drm_gem_object *drm_gem_object_lookup(struct drm_device *dev,
1445 struct drm_file *filp, 1472 struct drm_file *filp,
1446 int handle); 1473 u32 handle);
1447int drm_gem_close_ioctl(struct drm_device *dev, void *data, 1474int drm_gem_close_ioctl(struct drm_device *dev, void *data,
1448 struct drm_file *file_priv); 1475 struct drm_file *file_priv);
1449int drm_gem_flink_ioctl(struct drm_device *dev, void *data, 1476int drm_gem_flink_ioctl(struct drm_device *dev, void *data,