diff options
author | Maarten Maathuis <madman2003@gmail.com> | 2009-12-13 10:53:12 -0500 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2009-12-16 02:04:48 -0500 |
commit | ef2bb506687a5f1cc8ef2fef370bb168b2808106 (patch) | |
tree | 5dbd6bbc7e2f6754be4e0875d532beae2456081b /drivers/gpu/drm/nouveau/nouveau_drv.h | |
parent | dc4a684ae80d914b2b7fe75b2733a3296a8b92d2 (diff) |
drm/nouveau: use drm debug levels
- Use driver level (0x2) for NV_DEBUG instead of all levels
- Create a NV_DEBUG_KMS for KMS level (0x4) and use them in modesetting code
- Remove a few odd NV_TRACE calls and replace some of them with NV_DEBUG_KMS or
NV_INFO
Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_drv.h')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_drv.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h index 88b4c7b77e7f..bc6ffa5eeac7 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drv.h +++ b/drivers/gpu/drm/nouveau/nouveau_drv.h | |||
@@ -1207,14 +1207,24 @@ static inline void nv_wo32(struct drm_device *dev, struct nouveau_gpuobj *obj, | |||
1207 | pci_name(d->pdev), ##arg) | 1207 | pci_name(d->pdev), ##arg) |
1208 | #ifndef NV_DEBUG_NOTRACE | 1208 | #ifndef NV_DEBUG_NOTRACE |
1209 | #define NV_DEBUG(d, fmt, arg...) do { \ | 1209 | #define NV_DEBUG(d, fmt, arg...) do { \ |
1210 | if (drm_debug) { \ | 1210 | if (drm_debug & DRM_UT_DRIVER) { \ |
1211 | NV_PRINTK(KERN_DEBUG, d, "%s:%d - " fmt, __func__, \ | ||
1212 | __LINE__, ##arg); \ | ||
1213 | } \ | ||
1214 | } while (0) | ||
1215 | #define NV_DEBUG_KMS(d, fmt, arg...) do { \ | ||
1216 | if (drm_debug & DRM_UT_KMS) { \ | ||
1211 | NV_PRINTK(KERN_DEBUG, d, "%s:%d - " fmt, __func__, \ | 1217 | NV_PRINTK(KERN_DEBUG, d, "%s:%d - " fmt, __func__, \ |
1212 | __LINE__, ##arg); \ | 1218 | __LINE__, ##arg); \ |
1213 | } \ | 1219 | } \ |
1214 | } while (0) | 1220 | } while (0) |
1215 | #else | 1221 | #else |
1216 | #define NV_DEBUG(d, fmt, arg...) do { \ | 1222 | #define NV_DEBUG(d, fmt, arg...) do { \ |
1217 | if (drm_debug) \ | 1223 | if (drm_debug & DRM_UT_DRIVER) \ |
1224 | NV_PRINTK(KERN_DEBUG, d, fmt, ##arg); \ | ||
1225 | } while (0) | ||
1226 | #define NV_DEBUG_KMS(d, fmt, arg...) do { \ | ||
1227 | if (drm_debug & DRM_UT_KMS) \ | ||
1218 | NV_PRINTK(KERN_DEBUG, d, fmt, ##arg); \ | 1228 | NV_PRINTK(KERN_DEBUG, d, fmt, ##arg); \ |
1219 | } while (0) | 1229 | } while (0) |
1220 | #endif | 1230 | #endif |