]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
drm/msm: use drm_debug_enabled() to check for debug categories
authorJani Nikula <jani.nikula@intel.com>
Tue, 24 Sep 2019 12:59:02 +0000 (15:59 +0300)
committerJani Nikula <jani.nikula@intel.com>
Wed, 2 Oct 2019 13:31:13 +0000 (16:31 +0300)
Allow better abstraction of the drm_debug global variable in the
future. No functional changes.

v2: Move unlikely() to drm_debug_enabled()

Cc: Rob Clark <robdclark@gmail.com>
Cc: Sean Paul <sean@poorly.run>
Cc: linux-arm-msm@vger.kernel.org
Cc: freedreno@lists.freedesktop.org
Reviewed-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/c7142cdebb5f6fed527272b333cd6c43c0aa68ec.1569329774.git.jani.nikula@intel.com
drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h

index 9e40f559c51f3c6b70327a8b5f8505cabc8e5a5e..e1ec7110eb2e36da369985d69c0eb30cb66eea09 100644 (file)
@@ -29,7 +29,7 @@
  */
 #define DPU_DEBUG(fmt, ...)                                                \
        do {                                                               \
-               if (unlikely(drm_debug & DRM_UT_KMS))                      \
+               if (drm_debug_enabled(DRM_UT_KMS))                         \
                        DRM_DEBUG(fmt, ##__VA_ARGS__); \
                else                                                       \
                        pr_debug(fmt, ##__VA_ARGS__);                      \
@@ -41,7 +41,7 @@
  */
 #define DPU_DEBUG_DRIVER(fmt, ...)                                         \
        do {                                                               \
-               if (unlikely(drm_debug & DRM_UT_DRIVER))                   \
+               if (drm_debug_enabled(DRM_UT_DRIVER))                      \
                        DRM_ERROR(fmt, ##__VA_ARGS__); \
                else                                                       \
                        pr_debug(fmt, ##__VA_ARGS__);                      \