Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm: remove drm_debug_printer in favor of drm_dbg_printer

Convert the remaining drm_debug_printer users over to drm_dbg_printer,
as it can handle the cases without struct drm_device pointer, and also
provides drm debug category and prefix support. Remove drm_debug_printer
altogether.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Luca Coelho <luciano.coelho@intel.com>
Acked-by: Maxime Ripard <mripard@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/18b5b91e62d071675a651f6f91c58f05ad74134a.1705410327.git.jani.nikula@intel.com

+2 -26
+1 -1
drivers/gpu/drm/drm_modeset_lock.c
··· 91 91 92 92 static void __drm_stack_depot_print(depot_stack_handle_t stack_depot) 93 93 { 94 - struct drm_printer p = drm_debug_printer("drm_modeset_lock"); 94 + struct drm_printer p = drm_dbg_printer(NULL, DRM_UT_KMS, "drm_modeset_lock"); 95 95 unsigned long *entries; 96 96 unsigned int nr_entries; 97 97 char *buf;
-7
drivers/gpu/drm/drm_print.c
··· 182 182 } 183 183 EXPORT_SYMBOL(__drm_printfn_info); 184 184 185 - void __drm_printfn_debug(struct drm_printer *p, struct va_format *vaf) 186 - { 187 - /* pr_debug callsite decorations are unhelpful here */ 188 - printk(KERN_DEBUG "%s %pV", p->prefix, vaf); 189 - } 190 - EXPORT_SYMBOL(__drm_printfn_debug); 191 - 192 185 void __drm_printfn_dbg(struct drm_printer *p, struct va_format *vaf) 193 186 { 194 187 const struct drm_device *drm = p->arg;
+1 -1
drivers/gpu/drm/ttm/ttm_bo.c
··· 49 49 static void ttm_bo_mem_space_debug(struct ttm_buffer_object *bo, 50 50 struct ttm_placement *placement) 51 51 { 52 - struct drm_printer p = drm_debug_printer(TTM_PFX); 52 + struct drm_printer p = drm_dbg_printer(NULL, DRM_UT_CORE, TTM_PFX); 53 53 struct ttm_resource_manager *man; 54 54 int i, mem_type; 55 55
-17
include/drm/drm_print.h
··· 184 184 void __drm_printfn_seq_file(struct drm_printer *p, struct va_format *vaf); 185 185 void __drm_puts_seq_file(struct drm_printer *p, const char *str); 186 186 void __drm_printfn_info(struct drm_printer *p, struct va_format *vaf); 187 - void __drm_printfn_debug(struct drm_printer *p, struct va_format *vaf); 188 187 void __drm_printfn_dbg(struct drm_printer *p, struct va_format *vaf); 189 188 void __drm_printfn_err(struct drm_printer *p, struct va_format *vaf); 190 189 ··· 312 313 struct drm_printer p = { 313 314 .printfn = __drm_printfn_info, 314 315 .arg = dev, 315 - }; 316 - return p; 317 - } 318 - 319 - /** 320 - * drm_debug_printer - construct a &drm_printer that outputs to pr_debug() 321 - * @prefix: debug output prefix 322 - * 323 - * RETURNS: 324 - * The &drm_printer object 325 - */ 326 - static inline struct drm_printer drm_debug_printer(const char *prefix) 327 - { 328 - struct drm_printer p = { 329 - .printfn = __drm_printfn_debug, 330 - .prefix = prefix 331 316 }; 332 317 return p; 333 318 }