diff mbox series

[6/9] drm/msm: use drm_debug_enabled() to check for debug categories

Message ID 85a41fccdfca75ef47c9704761c959b5d53c0504.1568375189.git.jani.nikula@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/print: add and use drm_debug_enabled() | expand

Commit Message

Jani Nikula Sept. 13, 2019, 11:51 a.m. UTC
Allow better abstraction of the drm_debug global variable in the
future. No functional changes.

Cc: Rob Clark <robdclark@gmail.com>
Cc: Sean Paul <sean@poorly.run>
Cc: linux-arm-msm@vger.kernel.org
Cc: freedreno@lists.freedesktop.org
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Rob Clark Sept. 14, 2019, 3:46 p.m. UTC | #1
On Fri, Sep 13, 2019 at 4:52 AM Jani Nikula <jani.nikula@intel.com> wrote:
>
> Allow better abstraction of the drm_debug global variable in the
> future. No functional changes.
>
> Cc: Rob Clark <robdclark@gmail.com>
> Cc: Sean Paul <sean@poorly.run>
> Cc: linux-arm-msm@vger.kernel.org
> Cc: freedreno@lists.freedesktop.org
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>

Reviewed-by: Rob Clark <robdclark@gmail.com>

I don't think this should conflict w/ anything, so land via drm-misc?

BR,
-R

> ---
>  drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h
> index 9e40f559c51f..00e3353f9aad 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h
> @@ -29,7 +29,7 @@
>   */
>  #define DPU_DEBUG(fmt, ...)                                                \
>         do {                                                               \
> -               if (unlikely(drm_debug & DRM_UT_KMS))                      \
> +               if (unlikely(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 (unlikely(drm_debug_enabled(DRM_UT_DRIVER)))            \
>                         DRM_ERROR(fmt, ##__VA_ARGS__); \
>                 else                                                       \
>                         pr_debug(fmt, ##__VA_ARGS__);                      \
> --
> 2.20.1
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h
index 9e40f559c51f..00e3353f9aad 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h
@@ -29,7 +29,7 @@ 
  */
 #define DPU_DEBUG(fmt, ...)                                                \
 	do {                                                               \
-		if (unlikely(drm_debug & DRM_UT_KMS))                      \
+		if (unlikely(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 (unlikely(drm_debug_enabled(DRM_UT_DRIVER)))            \
 			DRM_ERROR(fmt, ##__VA_ARGS__); \
 		else                                                       \
 			pr_debug(fmt, ##__VA_ARGS__);                      \