diff mbox series

[1/2] drm/radeon: Do not use deprecated drm log API

Message ID 20230117174447.21870-1-nirmoy.das@intel.com (mailing list archive)
State New, archived
Headers show
Series [1/2] drm/radeon: Do not use deprecated drm log API | expand

Commit Message

Nirmoy Das Jan. 17, 2023, 5:44 p.m. UTC
Replace deprecated DRM_DEBUG_KMS_RATELIMITED() and DRM_ERROR()
with proper APIs.

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian König <christian.koenig@amd.com>

Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
---
 drivers/gpu/drm/radeon/radeon_dp_auxch.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Alex Deucher Jan. 17, 2023, 5:48 p.m. UTC | #1
On Tue, Jan 17, 2023 at 12:45 PM Nirmoy Das <nirmoy.das@intel.com> wrote:
>
> Replace deprecated DRM_DEBUG_KMS_RATELIMITED() and DRM_ERROR()
> with proper APIs.
>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: Christian König <christian.koenig@amd.com>
>
> Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
> ---
>  drivers/gpu/drm/radeon/radeon_dp_auxch.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_dp_auxch.c b/drivers/gpu/drm/radeon/radeon_dp_auxch.c
> index 69379b95146e..76ce66efb5f8 100644
> --- a/drivers/gpu/drm/radeon/radeon_dp_auxch.c
> +++ b/drivers/gpu/drm/radeon/radeon_dp_auxch.c
> @@ -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

>                 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;
>         }
> --
> 2.39.0
>
Nirmoy Das Jan. 17, 2023, 5:51 p.m. UTC | #2
On 1/17/2023 6:48 PM, Alex Deucher wrote:
> On Tue, Jan 17, 2023 at 12:45 PM Nirmoy Das <nirmoy.das@intel.com> wrote:
>> Replace deprecated DRM_DEBUG_KMS_RATELIMITED() and DRM_ERROR()
>> with proper APIs.
>>
>> Cc: Alex Deucher <alexander.deucher@amd.com>
>> Cc: Christian König <christian.koenig@amd.com>
>>
>> Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
>> ---
>>   drivers/gpu/drm/radeon/radeon_dp_auxch.c | 5 ++---
>>   1 file changed, 2 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/radeon/radeon_dp_auxch.c b/drivers/gpu/drm/radeon/radeon_dp_auxch.c
>> index 69379b95146e..76ce66efb5f8 100644
>> --- a/drivers/gpu/drm/radeon/radeon_dp_auxch.c
>> +++ b/drivers/gpu/drm/radeon/radeon_dp_auxch.c
>> @@ -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.


Thanks for your quick review, Alex. I will resend with dev_err().


Nirmoy

>
> Alex
>
>>                  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;
>>          }
>> --
>> 2.39.0
>>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/radeon/radeon_dp_auxch.c b/drivers/gpu/drm/radeon/radeon_dp_auxch.c
index 69379b95146e..76ce66efb5f8 100644
--- a/drivers/gpu/drm/radeon/radeon_dp_auxch.c
+++ b/drivers/gpu/drm/radeon/radeon_dp_auxch.c
@@ -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;
 	}