[Nouveau] [PATCH] drm/nouveau: use drm debug levels

Maarten Maathuis madman2003 at gmail.com
Mon Dec 14 10:40:55 PST 2009


On Sun, Dec 13, 2009 at 8:56 PM, Francisco Jerez <currojerez at riseup.net> wrote:
> Maarten Maathuis <madman2003 at gmail.com> writes:
>
>> - Use driver level (0x2) for NV_DEBUG instead of all levels
>> - Create a NV_DEBUG_KMS for KMS level (04) and use them in modesetting code
>> - Remove a few odd NV_TRACE calls and replace with NV_DEBUG_KMS
>>
>> Signed-off-by: Maarten Maathuis <madman2003 at gmail.com>
>> ---
>>  drivers/gpu/drm/nouveau/nouveau_bios.c      |   12 +++++-----
>>  drivers/gpu/drm/nouveau/nouveau_connector.c |    8 +++---
>>  drivers/gpu/drm/nouveau/nouveau_dp.c        |   28 +++++++++++++-------------
>>  drivers/gpu/drm/nouveau/nouveau_drv.h       |   14 +++++++++++-
>>  drivers/gpu/drm/nouveau/nouveau_fbcon.c     |    2 +-
>>  drivers/gpu/drm/nouveau/nv04_crtc.c         |   10 ++++----
>>  drivers/gpu/drm/nouveau/nv04_dac.c          |    8 ++----
>>  drivers/gpu/drm/nouveau/nv04_dfp.c          |    8 ++++--
>>  drivers/gpu/drm/nouveau/nv04_display.c      |    4 +-
>>  drivers/gpu/drm/nouveau/nv17_tv.c           |    4 +-
>>  drivers/gpu/drm/nouveau/nv50_crtc.c         |   22 ++++++++++----------
>>  drivers/gpu/drm/nouveau/nv50_cursor.c       |    8 +++---
>>  drivers/gpu/drm/nouveau/nv50_dac.c          |   20 +++++++++---------
>>  drivers/gpu/drm/nouveau/nv50_display.c      |   20 +++++++++---------
>>  drivers/gpu/drm/nouveau/nv50_sor.c          |   16 +++++++-------
>>  15 files changed, 97 insertions(+), 87 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c
>> index 5eec5ed..62fadbb 100644
>>
>> [...]
>>
>> diff --git a/drivers/gpu/drm/nouveau/nv04_dac.c b/drivers/gpu/drm/nouveau/nv04_dac.c
>> index a5fa517..e6b690e 100644
>> --- a/drivers/gpu/drm/nouveau/nv04_dac.c
>> +++ b/drivers/gpu/drm/nouveau/nv04_dac.c
>> @@ -205,7 +205,7 @@ out:
>>       NVWriteVgaSeq(dev, 0, NV_VIO_SR_CLOCK_INDEX, saved_seq1);
>>
>>       if (blue == 0x18) {
>> -             NV_TRACE(dev, "Load detected on head A\n");
>> +             NV_DEBUG_KMS(dev, "Load detected on head A\n");
>>               return connector_status_connected;
>>       }
>
> This is a bit inconsistent with the other "Load detected" messages
> below (in nv17_dac_detect), which are NV_INFO.

Will change to NV_INFO.

>
>>
>> @@ -350,13 +350,11 @@ static void nv04_dac_mode_set(struct drm_encoder *encoder,
>>                             struct drm_display_mode *mode,
>>                             struct drm_display_mode *adjusted_mode)
>>  {
>> -     struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
>>       struct drm_device *dev = encoder->dev;
>>       struct drm_nouveau_private *dev_priv = dev->dev_private;
>>       int head = nouveau_crtc(encoder->crtc)->index;
>>
>> -     NV_TRACE(dev, "%s called for encoder %d\n", __func__,
>> -                   nv_encoder->dcb->index);
>> +     NV_DEBUG_KMS(dev, "Output mode on CRTC %d:\n", head);
>>
>
> I don't understand what that debugging message means, I guess you didn't
> mean to do that?

A bad attempt at making it consistent with nv04_dfp, which has
"drm_mode_debug_printmodeline(output_mode);" below it.
Will remove it as it is redundant(nv04_dac_commit gives plenty already).

>
>>
>> [...]
>>
>> diff --git a/drivers/gpu/drm/nouveau/nv17_tv.c b/drivers/gpu/drm/nouveau/nv17_tv.c
>> index 46cfd9c..7c4d7c0 100644
>> --- a/drivers/gpu/drm/nouveau/nv17_tv.c
>> +++ b/drivers/gpu/drm/nouveau/nv17_tv.c
>> @@ -219,7 +219,7 @@ static void  nv17_tv_dpms(struct drm_encoder *encoder, int mode)
>>               return;
>>       nouveau_encoder(encoder)->last_dpms = mode;
>>
>> -     NV_TRACE(dev, "Setting dpms mode %d on TV encoder (output %d)\n",
>> +     NV_DEBUG_KMS(dev, "Setting dpms mode %d on TV encoder (output %d)\n",
>>                mode, nouveau_encoder(encoder)->dcb->index);
>>
>>       regs->ptv_200 &= ~1;
>
> This is inconsistent too with the DPMS messages in nv04_dfp/dac/tv.c,
> which are NV_INFO (I'm OK either way but IMHO it would be nice to keep
> all the DPMS messages at the same debug level).

Will change to NV_INFO.

>
>>
>> [...]
>>
>


More information about the Nouveau mailing list