Skip to contentSkip to conversation

drm/radeon: Do not use deprecated drm log API

PATCH In review Nirmoy Das 4 participants 7 messages Jan 17, 2023 – Jan 19, 2023

Subsystems (3)
lore
Share & tools
lore

Nirmoy Das

author
#0 lore raw

PATCH v2 1/1 drm/radeon: Do not use deprecated drm log API

Replace deprecated DRM_DEBUG_KMS_RATELIMITED() and DRM_ERROR() with proper APIs.

v2: replace pr_err with dev_err(Alex).

Cc Alex Deucher <[email protected]>
Cc Christian König <[email protected]>
---
 drivers/gpu/drm/radeon/radeon_dp_auxch.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/gpu/drm/radeon/radeon_dp_auxch.c +2 -3
index 69379b95146e..1e5b6baf76a1 100644
@@ -158,7 +158,7 @@ radeon_dp_aux_transfer_native(struct drm_dp_aux *aux, struct drm_dp_aux_msg *msg
 	} while (retry_count++ < 1000);
 
 	if (retry_count >= 1000) {
-		DRM_ERROR("auxch hw never signalled completion, error %08x\n", tmp);
+		dev_err(rdev->dev, "auxch hw never signalled completion, error %08x\n", tmp);
 		ret = -EIO;
 		goto done;
 	}
@@ -168,8 +168,7 @@ radeon_dp_aux_transfer_native(struct drm_dp_aux *aux, struct drm_dp_aux_msg *msg
 		goto done;
 	}
 	if (tmp & AUX_RX_ERROR_FLAGS) {
-		DRM_DEBUG_KMS_RATELIMITED("dp_aux_ch flags not zero: %08x\n",
-					  tmp);
+		drm_dbg_kms_ratelimited(dev, "dp_aux_ch flags not zero: %08x\n", tmp);
 		ret = -EIO;
 		goto done;
 	}
Signature · 1 line
2.39.0
author
#1 lore raw

PATCH 2/2 drm_print: Remove deprecated DRM_DEBUG_KMS_RATELIMITED()

There are no current users of DRM_DEBUG_KMS_RATELIMITED() so remove it.

Cc Maarten Lankhorst <[email protected]>
Cc Maxime Ripard <[email protected]>
Cc Thomas Zimmermann <[email protected]>
Cc David Airlie <[email protected]>
Cc Daniel Vetter <[email protected]>
Cc Sam Ravnborg <[email protected]>
---
 include/drm/drm_print.h | 3 ---
 1 file changed, 3 deletions(-)
include/drm/drm_print.h +0 -3
index a44fb7ef257f..c3753da97c4e 100644
@@ -605,9 +605,6 @@ void __drm_err(const char *format, ...);
 #define drm_dbg_kms_ratelimited(drm, fmt, ...) \
 	__DRM_DEFINE_DBG_RATELIMITED(KMS, drm, fmt, ## __VA_ARGS__)
 
-/* NOTE: this is deprecated in favor of drm_dbg_kms_ratelimited(NULL, ...). */
-#define DRM_DEBUG_KMS_RATELIMITED(fmt, ...) drm_dbg_kms_ratelimited(NULL, fmt, ## __VA_ARGS__)
-
 /*
  * struct drm_device based WARNs
  *
Signature · 1 line
2.39.0
Reviewed-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] drm_print: Remove deprecated DRM_DEBUG_KMS_RATELIMITED()

Quoted 11 lines · Nirmoy Das

There are no current users of DRM_DEBUG_KMS_RATELIMITED() so remove it.

Cc Maarten Lankhorst <[email protected]>
Cc Maxime Ripard <[email protected]>
Cc Thomas Zimmermann <[email protected]>
Cc David Airlie <[email protected]>
Cc Daniel Vetter <[email protected]>
Cc Sam Ravnborg <[email protected]>
Quoted 2 lines

Series is:

Feel free to take the patches through whatever tree you want.

Alex

Quoted 21 lines
---
 include/drm/drm_print.h | 3 ---
 1 file changed, 3 deletions(-)
include/drm/drm_print.h +0 -4
index a44fb7ef257f..c3753da97c4e 100644
@@ -605,9 +605,6 @@ void __drm_err(const char *format, ...);
 #define drm_dbg_kms_ratelimited(drm, fmt, ...) \
        __DRM_DEFINE_DBG_RATELIMITED(KMS, drm, fmt, ## __VA_ARGS__)
 
-/* NOTE: this is deprecated in favor of drm_dbg_kms_ratelimited(NULL, ...). */
-#define DRM_DEBUG_KMS_RATELIMITED(fmt, ...) drm_dbg_kms_ratelimited(NULL, fmt, ## __VA_ARGS__)
-
 /*
  * struct drm_device based WARNs
  *
--

2.39.0

#3 lore raw

Re: [PATCH 2/2] drm_print: Remove deprecated DRM_DEBUG_KMS_RATELIMITED()

Hi Alex,

Quoted 11 lines · Alex Deucher
Quoted 10 lines · Nirmoy Das

There are no current users of DRM_DEBUG_KMS_RATELIMITED() so remove it.

Cc Maarten Lankhorst <[email protected]>
Cc Maxime Ripard <[email protected]>
Cc Thomas Zimmermann <[email protected]>
Cc David Airlie <[email protected]>
Cc Daniel Vetter <[email protected]>
Cc Sam Ravnborg <[email protected]>
Quoted 6 lines
Quoted 2 lines

Series is:

Feel free to take the patches through whatever tree you want.

Please help me with this, I don't have committer rights for any tree.

Nirmoy

Quoted 24 lines

Alex

Quoted 21 lines
---
  include/drm/drm_print.h | 3 ---
  1 file changed, 3 deletions(-)
include/drm/drm_print.h +0 -4
index a44fb7ef257f..c3753da97c4e 100644
@@ -605,9 +605,6 @@ void __drm_err(const char *format, ...);
  #define drm_dbg_kms_ratelimited(drm, fmt, ...) \
         __DRM_DEFINE_DBG_RATELIMITED(KMS, drm, fmt, ## __VA_ARGS__)
 
-/* NOTE: this is deprecated in favor of drm_dbg_kms_ratelimited(NULL, ...). */
-#define DRM_DEBUG_KMS_RATELIMITED(fmt, ...) drm_dbg_kms_ratelimited(NULL, fmt, ## __VA_ARGS__)
-
  /*
   * struct drm_device based WARNs
   *
--

2.39.0

#4 lore raw

Re: [PATCH 2/2] drm_print: Remove deprecated DRM_DEBUG_KMS_RATELIMITED()

Am 17.01.23 um 19:12 schrieb Das, Nirmoy:

Quoted 16 lines

Hi Alex,

Quoted 13 lines · Alex Deucher
Quoted 12 lines · Nirmoy Das

There are no current users of DRM_DEBUG_KMS_RATELIMITED() so remove it.

Cc Maarten Lankhorst <[email protected]>
Cc Maxime Ripard <[email protected]>
Cc Thomas Zimmermann <[email protected]>
Cc David Airlie <[email protected]>
Cc Daniel Vetter <[email protected]>
Cc Sam Ravnborg <[email protected]>
Quoted 7 lines
Quoted 4 lines

Series is:

Feel free to take the patches through whatever tree you want.

Please help me with this, I don't have committer rights for any tree.

Going to push that into drm-misc-next later today.

Thanks,
Christian.

Quoted 31 lines

Nirmoy

Quoted 26 lines

Alex

Quoted 23 lines

---
  include/drm/drm_print.h | 3 ---

  1 file changed, 3 deletions(-)
include/drm/drm_print.h +0 -1
index a44fb7ef257f..c3753da97c4e 100644
@@ -605,9 +605,6 @@ void __drm_err(const char *format, ...);
   #define drm_dbg_kms_ratelimited(drm, fmt, ...) \
          __DRM_DEFINE_DBG_RATELIMITED(KMS, drm, fmt, ## __VA_ARGS__)
 
-/* NOTE: this is deprecated in favor of 

drm_dbg_kms_ratelimited(NULL, ...). */ -#define DRM_DEBUG_KMS_RATELIMITED(fmt, ...) drm_dbg_kms_ratelimited(NULL, fmt, ## __VA_ARGS__) -
  /*
   * struct drm_device based WARNs
   *

Signature · 1 line
2.39.0
#5 lore raw

Re: [PATCH 2/2] drm_print: Remove deprecated DRM_DEBUG_KMS_RATELIMITED()

Quoted 22 lines · Christian König

Am 17.01.23 um 19:12 schrieb Das, Nirmoy:

Quoted 19 lines

Hi Alex,

Quoted 16 lines · Alex Deucher
Quoted 10 lines · Nirmoy Das

There are no current users of DRM_DEBUG_KMS_RATELIMITED() so remove it.

Cc Maarten Lankhorst <[email protected]>
Cc Maxime Ripard <[email protected]>
Cc Thomas Zimmermann <[email protected]>
Cc David Airlie <[email protected]>
Cc Daniel Vetter <[email protected]>
Cc Sam Ravnborg <[email protected]>
Quoted 2 lines

Series is:

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

Feel free to take the patches through whatever tree you want.

Please help me with this, I don't have committer rights for any tree.

Going to push that into drm-misc-next later today.

Thanks, Christian.

Quoted 36 lines

Thanks,
Christian.

Quoted 31 lines

Nirmoy

Quoted 26 lines

Alex

Quoted 23 lines

---
  include/drm/drm_print.h | 3 ---

  1 file changed, 3 deletions(-)
include/drm/drm_print.h +0 -1
index a44fb7ef257f..c3753da97c4e 100644
@@ -605,9 +605,6 @@ void __drm_err(const char *format, ...);
   #define drm_dbg_kms_ratelimited(drm, fmt, ...) \
          __DRM_DEFINE_DBG_RATELIMITED(KMS, drm, fmt, ## __VA_ARGS__)
 
-/* NOTE: this is deprecated in favor of 

drm_dbg_kms_ratelimited(NULL, ...). */ -#define DRM_DEBUG_KMS_RATELIMITED(fmt, ...) drm_dbg_kms_ratelimited(NULL, fmt, ## __VA_ARGS__) -
  /*
   * struct drm_device based WARNs
   *

Signature · 1 line
2.39.0
#6 lore raw
In reply to Nirmoy Das

Hi Nirmoy,

Quoted 2 lines · Nirmoy Das

Replace deprecated DRM_DEBUG_KMS_RATELIMITED() and DRM_ERROR() with proper APIs.

Thanks for working on this!

Also thanks for Christian to take care and apply the patches.

Sam