[Intel-gfx] [PATCH 01/17] drm/i915/audio: use struct drm_device based logging
Jani Nikula
jani.nikula at intel.com
Wed Apr 8 10:54:40 UTC 2020
On Tue, 07 Apr 2020, Wambui Karuga <wambui.karugax at gmail.com> wrote:
> On Thu, 2 Apr 2020, Jani Nikula wrote:
>
>> Convert all the DRM_* logging macros to the struct drm_device based
>> macros to provide device specific logging.
>>
>> No functional changes.
>>
>> Generated using the following semantic patch, originally written by
>> Wambui Karuga <wambui.karugax at gmail.com>, with manual fixups on top:
>>
>> @@
>> identifier fn, T;
>> @@
>>
>> fn(...,struct drm_i915_private *T,...) {
>> <+...
>> (
>> -DRM_INFO(
>> +drm_info(&T->drm,
>> ...)
>> |
>> -DRM_NOTE(
>> +drm_notice(&T->drm,
>> ...)
>> |
>> -DRM_ERROR(
>> +drm_err(&T->drm,
>> ...)
>> |
>> -DRM_WARN(
>> +drm_warn(&T->drm,
>> ...)
>> |
>> -DRM_DEBUG_DRIVER(
>> +drm_dbg(&T->drm,
>> ...)
>> |
>> -DRM_DEBUG_KMS(
>> +drm_dbg_kms(&T->drm,
>> ...)
>> |
>> -DRM_DEBUG_ATOMIC(
>> +drm_dbg_atomic(&T->drm,
>> ...)
>> )
>> ...+>
>> }
>>
>> @@
>> identifier fn, T;
>> @@
>>
>> fn(...) {
>> ...
>> struct drm_i915_private *T = ...;
>> <+...
>> (
>> -DRM_INFO(
>> +drm_info(&T->drm,
>> ...)
>> |
>> -DRM_NOTE(
>> +drm_notice(&T->drm,
>> ...)
>> |
>> -DRM_ERROR(
>> +drm_err(&T->drm,
>> ...)
>> |
>> -DRM_WARN(
>> +drm_warn(&T->drm,
>> ...)
>> |
>> -DRM_DEBUG_DRIVER(
>> +drm_dbg(&T->drm,
>> ...)
>> |
>> -DRM_DEBUG_KMS(
>> +drm_dbg_kms(&T->drm,
>> ...)
>> |
>> -DRM_DEBUG_ATOMIC(
>> +drm_dbg_atomic(&T->drm,
>> ...)
>> )
>> ...+>
>> }
>>
>> Cc: Wambui Karuga <wambui.karugax at gmail.com>
>> Signed-off-by: Jani Nikula <jani.nikula at intel.com>
>
> Reviewed-by: Wambui Karuga <wambui.karugax at gmail.com>
Many thanks for all the reviews, pushed the lot.
BR,
Jani.
>
>> ---
>> drivers/gpu/drm/i915/display/intel_audio.c | 12 +++++++-----
>> 1 file changed, 7 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/display/intel_audio.c b/drivers/gpu/drm/i915/display/intel_audio.c
>> index 950160f1a89f..47402c2869db 100644
>> --- a/drivers/gpu/drm/i915/display/intel_audio.c
>> +++ b/drivers/gpu/drm/i915/display/intel_audio.c
>> @@ -252,14 +252,16 @@ static u32 audio_config_hdmi_pixel_clock(const struct intel_crtc_state *crtc_sta
>> i = ARRAY_SIZE(hdmi_audio_clock);
>>
>> if (i == ARRAY_SIZE(hdmi_audio_clock)) {
>> - DRM_DEBUG_KMS("HDMI audio pixel clock setting for %d not found, falling back to defaults\n",
>> - adjusted_mode->crtc_clock);
>> + drm_dbg_kms(&dev_priv->drm,
>> + "HDMI audio pixel clock setting for %d not found, falling back to defaults\n",
>> + adjusted_mode->crtc_clock);
>> i = 1;
>> }
>>
>> - DRM_DEBUG_KMS("Configuring HDMI audio for pixel clock %d (0x%08x)\n",
>> - hdmi_audio_clock[i].clock,
>> - hdmi_audio_clock[i].config);
>> + drm_dbg_kms(&dev_priv->drm,
>> + "Configuring HDMI audio for pixel clock %d (0x%08x)\n",
>> + hdmi_audio_clock[i].clock,
>> + hdmi_audio_clock[i].config);
>>
>> return hdmi_audio_clock[i].config;
>> }
>> --
>> 2.20.1
>>
>>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Jani Nikula, Intel Open Source Graphics Center
More information about the Intel-gfx
mailing list