@@ -394,7 +394,7 @@ long drm_ioctl(struct file *filp,
atomic_inc(&dev->counts[_DRM_STAT_IOCTLS]);
++file_priv->ioctl_count;
- DRM_DEBUG("pid=%d, cmd=0x%02x, nr=0x%02x, dev 0x%lx, auth=%d\n",
+ DRM_VERB("pid=%d, cmd=0x%02x, nr=0x%02x, dev 0x%lx, auth=%d\n",
task_pid_nr(current), cmd, nr,
(long)old_encode_dev(file_priv->minor->device),
file_priv->authenticated);
@@ -475,8 +475,13 @@ long drm_ioctl(struct file *filp,
if (kdata != stack_kdata)
kfree(kdata);
atomic_dec(&dev->ioctl_count);
- if (retcode)
+ if (retcode) {
+ DRM_DEBUG("pid=%d, cmd=0x%02x, nr=0x%02x, dev 0x%lx, auth=%d\n",
+ task_pid_nr(current), cmd, nr,
+ (long)old_encode_dev(file_priv->minor->device),
+ file_priv->authenticated);
DRM_DEBUG("ret = %d\n", retcode);
+ }
return retcode;
}
@@ -411,7 +411,7 @@ void drm_vm_open_locked(struct drm_device *dev,
{
struct drm_vma_entry *vma_entry;
- DRM_DEBUG("0x%08lx,0x%08lx\n",
+ DRM_VERB("0x%08lx,0x%08lx\n",
vma->vm_start, vma->vm_end - vma->vm_start);
atomic_inc(&dev->vma_count);
@@ -438,7 +438,7 @@ void drm_vm_close_locked(struct drm_device *dev,
{
struct drm_vma_entry *pt, *temp;
- DRM_DEBUG("0x%08lx,0x%08lx\n",
+ DRM_VERB("0x%08lx,0x%08lx\n",
vma->vm_start, vma->vm_end - vma->vm_start);
atomic_dec(&dev->vma_count);
@@ -92,6 +92,8 @@ struct drm_device;
#define DRM_UT_DRIVER 0x02
#define DRM_UT_KMS 0x04
#define DRM_UT_PRIME 0x08
+#define DRM_UT_CORE_VERB 0x10
+
/*
* Three debug levels are defined.
* drm_core, drm_driver, drm_kms
@@ -206,7 +208,11 @@ int drm_err(const char *func, const char *format, ...);
drm_ut_debug_printk(DRM_UT_CORE, DRM_NAME, \
__func__, fmt, ##args); \
} while (0)
-
+#define DRM_VERB(fmt, args...) \
+ do { \
+ drm_ut_debug_printk(DRM_UT_CORE_VERB, DRM_NAME, \
+ __func__, fmt, ##args); \
+ } while (0)
#define DRM_DEBUG_DRIVER(fmt, args...) \
do { \
drm_ut_debug_printk(DRM_UT_DRIVER, DRM_NAME, \
@@ -247,6 +253,7 @@ int drm_err(const char *func, const char *format, ...);
#define DRM_DEBUG_KMS(fmt, args...) do { } while (0)
#define DRM_DEBUG_PRIME(fmt, args...) do { } while (0)
#define DRM_DEBUG(fmt, arg...) do { } while (0)
+#define DRM_VERB(fmt, arg...) do { } while (0)
#define DRM_LOG(fmt, arg...) do { } while (0)
#define DRM_LOG_KMS(fmt, args...) do { } while (0)
#define DRM_LOG_MODE(fmt, arg...) do { } while (0)