lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 21 Dec 2022 11:13:46 +0100
From:   Thomas Zimmermann <tzimmermann@...e.de>
To:     Jani Nikula <jani.nikula@...ux.intel.com>,
        Siddh Raman Pant <code@...dh.me>,
        Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
        Maxime Ripard <mripard@...nel.org>,
        David Airlie <airlied@...il.com>,
        Daniel Vetter <daniel@...ll.ch>
Cc:     linux-kernel <linux-kernel@...r.kernel.org>,
        dri-devel <dri-devel@...ts.freedesktop.org>
Subject: Re: [PATCH 06/10] drm: Remove usage of deprecated DRM_DEBUG_DRIVER

Hi

Am 21.12.22 um 11:00 schrieb Jani Nikula:
> On Wed, 21 Dec 2022, Siddh Raman Pant <code@...dh.me> wrote:
>> drm_print.h says DRM_DEBUG_DRIVER is deprecated.
>> Thus, use newer drm_dbg_driver().
>>
>> Also fix the deprecation comment in drm_print.h which
>> mentions drm_dbg() instead of drm_dbg_driver().
>>
>> Signed-off-by: Siddh Raman Pant <code@...dh.me>
>> ---
>>   drivers/gpu/drm/drm_mipi_dbi.c | 10 +++++-----
>>   include/drm/drm_print.h        |  2 +-
>>   2 files changed, 6 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/drm_mipi_dbi.c b/drivers/gpu/drm/drm_mipi_dbi.c
>> index 24af507bb687..6ad399f6ab03 100644
>> --- a/drivers/gpu/drm/drm_mipi_dbi.c
>> +++ b/drivers/gpu/drm/drm_mipi_dbi.c
>> @@ -69,11 +69,11 @@
>>   #define MIPI_DBI_DEBUG_COMMAND(cmd, data, len) \
>>   ({ \
>>   	if (!len) \
>> -		DRM_DEBUG_DRIVER("cmd=%02x\n", cmd); \
>> +		drm_dbg_driver(NULL, "cmd=%02x\n", cmd); \
>>   	else if (len <= 32) \
>> -		DRM_DEBUG_DRIVER("cmd=%02x, par=%*ph\n", cmd, (int)len, data);\
>> +		drm_dbg_driver(NULL, "cmd=%02x, par=%*ph\n", cmd, (int)len, data);\
>>   	else \
>> -		DRM_DEBUG_DRIVER("cmd=%02x, len=%zu\n", cmd, len); \
>> +		drm_dbg_driver(NULL, "cmd=%02x, len=%zu\n", cmd, len); \
>>   })
>>   
>>   static const u8 mipi_dbi_dcs_read_commands[] = {
>> @@ -632,7 +632,7 @@ bool mipi_dbi_display_is_on(struct mipi_dbi *dbi)
>>   	    DCS_POWER_MODE_DISPLAY_NORMAL_MODE | DCS_POWER_MODE_SLEEP_MODE))
>>   		return false;
>>   
>> -	DRM_DEBUG_DRIVER("Display is ON\n");
>> +	drm_dbg_driver(NULL, "Display is ON\n");
>>   
>>   	return true;
>>   }
>> @@ -1168,7 +1168,7 @@ int mipi_dbi_spi_init(struct spi_device *spi, struct mipi_dbi *dbi,
>>   
>>   	mutex_init(&dbi->cmdlock);
>>   
>> -	DRM_DEBUG_DRIVER("SPI speed: %uMHz\n", spi->max_speed_hz / 1000000);
>> +	drm_dbg_driver(NULL, "SPI speed: %uMHz\n", spi->max_speed_hz / 1000000);
>>   
>>   	return 0;
>>   }
>> diff --git a/include/drm/drm_print.h b/include/drm/drm_print.h
>> index 53702d830291..10261faec8b6 100644
>> --- a/include/drm/drm_print.h
>> +++ b/include/drm/drm_print.h
>> @@ -614,7 +614,7 @@ void __drm_err(const char *format, ...);
>>   #define DRM_DEBUG(fmt, ...)						\
>>   	__drm_dbg(DRM_UT_CORE, fmt, ##__VA_ARGS__)
>>   
>> -/* NOTE: this is deprecated in favor of drm_dbg(NULL, ...). */
>> +/* NOTE: this is deprecated in favor of drm_dbg_driver(NULL, ...). */
> 
> Way back the idea was to make the shorter drm_dbg() the driver debug,
> and drm_dbg_core() the drm core debug, because the former vastly
> outnumbers the the latter.
> 
> I don't know if that changed with the dyndbg stuff.

I've recently grepped for these macros and nothing uses drm_dbg_driver() 
directly.

I also wondered whether the driver debug macro makes much sense. For 
example, if a driver implements its own atomic helpers, it's much more 
useful to use drm_dbg_kms() within those functions. If enabled, their 
output would then blend into the overall KMS-related debugging. 
drm_dbg/drm_dbg_driver() appears to be mostly useful for init and status 
reporting.

Best regards
Thomas

> 
> 
> BR,
> Jani.
> 
> 
>>   #define DRM_DEBUG_DRIVER(fmt, ...)					\
>>   	__drm_dbg(DRM_UT_DRIVER, fmt, ##__VA_ARGS__)
> 

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Ivo Totev

Download attachment "OpenPGP_signature" of type "application/pgp-signature" (841 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ