[PATCH v5 06/13] drm/amd: Gate i2c transaction logs on drm_debug_syslog
Christian König
christian.koenig at amd.com
Tue Jun 9 07:10:29 UTC 2020
Am 08.06.20 um 23:04 schrieb Sean Paul:
> From: Sean Paul <seanpaul at chromium.org>
>
> Since the logs protected by these checks specifically target syslog,
> use the new drm_debug_syslog_enabled() call to avoid triggering
> these prints when only trace is enabled.
Mhm, of hand that doesn't looks like something which belongs into the
syslog in the first place. Maybe convert it into a trace point instead?
>
> Signed-off-by: Sean Paul <seanpaul at chromium.org>
Acked-by: Christian König <christian.koenig at amd.com> either way.
>
> Changes in v5:
> -Added to the set
> ---
> drivers/gpu/drm/amd/amdgpu/smu_v11_0_i2c.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/smu_v11_0_i2c.c b/drivers/gpu/drm/amd/amdgpu/smu_v11_0_i2c.c
> index 9bffbab35041..9bc6baddd302 100644
> --- a/drivers/gpu/drm/amd/amdgpu/smu_v11_0_i2c.c
> +++ b/drivers/gpu/drm/amd/amdgpu/smu_v11_0_i2c.c
> @@ -233,7 +233,7 @@ static uint32_t smu_v11_0_i2c_transmit(struct i2c_adapter *control,
> DRM_DEBUG_DRIVER("I2C_Transmit(), address = %x, bytes = %d , data: ",
> (uint16_t)address, numbytes);
>
> - if (drm_debug_enabled(DRM_UT_DRIVER)) {
> + if (drm_debug_syslog_enabled(DRM_UT_DRIVER)) {
> print_hex_dump(KERN_INFO, "data: ", DUMP_PREFIX_NONE,
> 16, 1, data, numbytes, false);
> }
> @@ -387,7 +387,7 @@ static uint32_t smu_v11_0_i2c_receive(struct i2c_adapter *control,
> DRM_DEBUG_DRIVER("I2C_Receive(), address = %x, bytes = %d, data :",
> (uint16_t)address, bytes_received);
>
> - if (drm_debug_enabled(DRM_UT_DRIVER)) {
> + if (drm_debug_syslog_enabled(DRM_UT_DRIVER)) {
> print_hex_dump(KERN_INFO, "data: ", DUMP_PREFIX_NONE,
> 16, 1, data, bytes_received, false);
> }
More information about the amd-gfx
mailing list