Skip to content

Commit df24373

Browse files
lumagAbhinav Kumar
authored andcommitted
drm/msm/dpu: don't play tricks with debug macros
DPU debugging macros need to be converted to a proper drm_debug_* macros, however this is a going an intrusive patch, not suitable for a fix. Wire DPU_DEBUG and DPU_DEBUG_DRIVER to always use DRM_DEBUG_DRIVER to make sure that DPU debugging messages always end up in the drm debug messages and are controlled via the usual drm.debug mask. I don't think that it is a good idea for a generic DPU_DEBUG macro to be tied to DRM_UT_KMS. It is used to report a debug message from driver, so by default it should go to the DRM_UT_DRIVER channel. While refactoring debug macros later on we might end up with particular messages going to ATOMIC or KMS, but DRIVER should be the default. Fixes: 25fdd59 ("drm/msm: Add SDM845 DPU support") Signed-off-by: Dmitry Baryshkov <[email protected]> Reviewed-by: Abhinav Kumar <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/606932/ Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Abhinav Kumar <[email protected]>
1 parent fe34394 commit df24373

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,24 +31,14 @@
3131
* @fmt: Pointer to format string
3232
*/
3333
#define DPU_DEBUG(fmt, ...) \
34-
do { \
35-
if (drm_debug_enabled(DRM_UT_KMS)) \
36-
DRM_DEBUG(fmt, ##__VA_ARGS__); \
37-
else \
38-
pr_debug(fmt, ##__VA_ARGS__); \
39-
} while (0)
34+
DRM_DEBUG_DRIVER(fmt, ##__VA_ARGS__)
4035

4136
/**
4237
* DPU_DEBUG_DRIVER - macro for hardware driver logging
4338
* @fmt: Pointer to format string
4439
*/
4540
#define DPU_DEBUG_DRIVER(fmt, ...) \
46-
do { \
47-
if (drm_debug_enabled(DRM_UT_DRIVER)) \
48-
DRM_ERROR(fmt, ##__VA_ARGS__); \
49-
else \
50-
pr_debug(fmt, ##__VA_ARGS__); \
51-
} while (0)
41+
DRM_DEBUG_DRIVER(fmt, ##__VA_ARGS__)
5242

5343
#define DPU_ERROR(fmt, ...) pr_err("[dpu error]" fmt, ##__VA_ARGS__)
5444
#define DPU_ERROR_RATELIMITED(fmt, ...) pr_err_ratelimited("[dpu error]" fmt, ##__VA_ARGS__)

0 commit comments

Comments
 (0)