diff options
author | Jim Cromie <jim.cromie@gmail.com> | 2022-09-11 23:28:44 -0600 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-09-24 15:02:01 +0200 |
commit | 0406faf25fb12d29cb1823e641c6f3f3e2037735 (patch) | |
tree | 3ab0605a3dbd20d26a2a091a0fcbbf93f1939c05 /drivers/gpu/drm/i915/i915_params.c | |
parent | 19029f3f47c7f2dd796cecd001619a37034d658a (diff) |
drm_print: condense enum drm_debug_category
enum drm_debug_category has 10 categories, but is initialized with
bitmasks which require 10 bits of underlying storage. By using
natural enumeration, and moving the BIT(cat) into drm_debug_enabled(),
the enum fits in 4 bits, allowing the category to be represented
directly in pr_debug callsites, via the ddebug.class_id field.
While this slightly pessimizes the bit-test in drm_debug_enabled(),
using dyndbg with JUMP_LABEL will avoid the function entirely.
NOTE: this change forecloses the possibility of doing:
drm_dbg(DRM_UT_CORE|DRM_UT_KMS, "weird 2-cat experiment")
but thats already strongly implied by the use of the enum itself; its
not a normal enum if it can be 2 values simultaneously.
Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Link: https://lore.kernel.org/r/20220912052852.1123868-2-jim.cromie@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_params.c')
0 files changed, 0 insertions, 0 deletions