]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/display: Don't call dm_log_to_buffer directly in dc_conn_log
authorMichel Dänzer <michel.daenzer@amd.com>
Tue, 28 Nov 2017 11:06:13 +0000 (12:06 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 6 Dec 2017 17:48:28 +0000 (12:48 -0500)
commitddf47a7ec0defb1f6c5a9caad6e84677f58c3d03
treef1cbf0fbf69f05f03268ac15f8883501d520c828
parenta9404dc3d2277be9703c62339720f3922c7d7c09
drm/amd/display: Don't call dm_log_to_buffer directly in dc_conn_log

dm_log_to_buffer logs unconditionally, so calling it directly resulted
in the main message being logged even when the event type isn't enabled
in the event mask.

To fix this, use the new dm_logger_append_va API.

Fixes spurious messages like

 [drm] {1920x1200, 2080x1235@154000Khz}

in dmesg when a mode is set.

v2:
* Use new dm_logger_append_va API, fixes incorrect va_list usage in v1
* Just use and decrease entry.buf_offset to get rid of the trailing
  newline

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/basics/log_helpers.c