drm/radeon: Do not use deprecated drm log API
Subsystems (3)
PATCH 1/2 drm/radeon: Do not use deprecated drm log API
Replace deprecated DRM_DEBUG_KMS_RATELIMITED() and DRM_ERROR() with proper APIs.
--- 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
@@ -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); +pr_err ("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
PATCH 2/2 drm_print: Remove deprecated DRM_DEBUG_KMS_RATELIMITED()
There are no current users of DRM_DEBUG_KMS_RATELIMITED() so remove it.
--- include/drm/drm_print.h | 3 --- 1 file changed, 3 deletions(-)
include/drm/drm_print.h +0 -3
@@ -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
Re: [PATCH 2/2] drm_print: Remove deprecated DRM_DEBUG_KMS_RATELIMITED()
Quoted 2 lines · Nirmoy Das
There are no current users of
DRM_DEBUG_KMS_RATELIMITED()so remove it.
Thanks
Quoted 9 lines
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]>Signed-off-by Nirmoy Das <[email protected]>
Quoted 20 lines
--- include/drm/drm_print.h | 3 --- 1 file changed, 3 deletions(-)include/drm/drm_print.h +0
-3@@ -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
Quoted 17 lines · Nirmoy Das
Replace deprecated
DRM_DEBUG_KMS_RATELIMITED()andDRM_ERROR()with proper APIs.Cc Alex Deucher <[email protected]>Cc Christian König <[email protected]>Signed-off-by Nirmoy Das <[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 +0
-0
drivers/gpu/drm/radeon/radeon_dp_auxch.c radeon_dp_aux_transfer_native(struct drm_dp_aux *aux, struct drm_dp_aux_msg *msg · line 161
Quoted 5 lines
drivers/gpu/drm/radeon/radeon_dp_auxch.c +1
-1@@ -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); +pr_err ("auxch hw never signalled completion, error %08x\n" , tmp);
Please use dev_err() instead so we get device identification on error messages. Makes it much easier when you have multiple GPUs in a system.
Alex
Quoted 16 lines
drivers/gpu/drm/radeon/radeon_dp_auxch.c +1
-3ret = -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; } --2.39.0
Quoted 19 lines · Alex Deucher
Quoted 18 lines · Nirmoy Das
Replace deprecated
DRM_DEBUG_KMS_RATELIMITED()andDRM_ERROR()with proper APIs.Cc Alex Deucher <[email protected]>Cc Christian König <[email protected]>Signed-off-by Nirmoy Das <[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 +0
-0@@ -158,7 +158,7 @@ radeon_dp_aux_transfer_native(struct drm_dp_aux *aux, struct drm_dp_aux_msg *msg }while (retry_count++ <1000 );
Quoted 6 lines
drivers/gpu/drm/radeon/radeon_dp_auxch.c radeon_dp_aux_transfer_native(struct drm_dp_aux *aux, struct drm_dp_aux_msg *msg · line 161
Quoted 3 lines
drivers/gpu/drm/radeon/radeon_dp_auxch.c +1
-1if (retry_count >=1000 ) { -DRM_ERROR ("auxch hw never signalled completion, error %08x\n" , tmp); +pr_err ("auxch hw never signalled completion, error %08x\n" , tmp);Please use
dev_err()instead so we get device identification on error messages. Makes it much easier when you have multiple GPUs in a system.
Thanks for your quick review, Alex. I will resend with dev_err().
Nirmoy
Quoted 19 lines
Alex
Quoted 16 lines
drivers/gpu/drm/radeon/radeon_dp_auxch.c +1
-3ret = -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; } --2.39.0