drm cleanup 14/x: Slightly rewrite drm debug subsystem.
commit91fff9508a3e728a36f31cd3d1d080cb76cadc2e
authorzrj <rimvydas.jasinskas@gmail.com>
Wed, 18 May 2016 11:02:01 +0000 (18 14:02 +0300)
committerzrj <zrj@dragonflybsd.org>
Fri, 20 May 2016 08:50:50 +0000 (20 11:50 +0300)
treeae28e6c3e8b18886c2844622a7d3d5fed40ceb31
parent742b09c6f1a3cd52379978af7dce057e38b1c62e
drm cleanup 14/x: Slightly rewrite drm debug subsystem.

Changes:
  * Bring back kernel options handling through opt_drm.h that
    got lost in: ba55f2f542af67c1331fd80f611891b0a29f57bc
  * Explicitly disable DRM_LINUX option, breaks LINT64
  * Add some DragonFly specific debug categories to ease up
    the debugging, some DRM_DEBUG prints are quite noisy
  * By default don't include PID number, hard on diffs
  * Handle ioctl debug prints with separate debug bits
  * Implement DRM_ERROR_RATELIMITED that uses krateprintf()
  * Implement and use drm_err() and drm_ut_debug_printk()
    note: that current implementation might lead to more
    garbled text on a very frequent writes by several cpus

After this cleanup drm modules shrink a bit in size:
 [rw@_ drm]$ size z*/*.ko
    text    data     bss     dec     hex filename
  281585    3592     944  286121   45da9 znew/drm.ko
  780618    8180     608  789406   c0b9e znew/i915.ko
 1262735   45896     100 1308731  13f83b znew/radeonkms.ko
  301045    3592     944  305581   4a9ad zref/drm.ko
  887378    8180     608  896166   daca6 zref/i915.ko
 1377609   45896     100 1423605  15b8f5 zref/radeonkms.ko
sys/dev/drm/drm_drv.c
sys/dev/drm/drm_ioctl.c
sys/dev/drm/include/drm/drmP.h
sys/dev/drm/include/drm/drm_os_linux.h