aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/display/dc/dcn35
diff options
context:
space:
mode:
authorGravatar Hamza Mahfooz <hamza.mahfooz@amd.com> 2023-09-20 13:38:11 -0400
committerGravatar Alex Deucher <alexander.deucher@amd.com> 2023-09-26 17:00:21 -0400
commit5d72e247e58c966f4e50cffebf0d414de7fc90ed (patch)
tree4ca212b1c2a1d44d52538d53a9f32c15c37443ab /drivers/gpu/drm/amd/display/dc/dcn35
parentdrm/amd/display: skip audio config for virtual signal (diff)
downloadlinux-5d72e247e58c966f4e50cffebf0d414de7fc90ed.tar.gz
linux-5d72e247e58c966f4e50cffebf0d414de7fc90ed.tar.bz2
linux-5d72e247e58c966f4e50cffebf0d414de7fc90ed.zip
drm/amd/display: switch DC over to the new DRM logging macros
For multi-GPU systems it is difficult to tell which GPU a particular message is being printed for and that is undesirable because it complicates debugging efforts. Also, the new macros allow us to enable logging for particular parts of the codebase more selectively (since we no longer need to throw everything at DRM_DEBUG_KMS()). So, for the reasons outlined above we should switch to the new macros. We can accomplish this by using the existing DC_LOGGER code to pass around the relevant `struct drm_device` which will be fed to the new macros in logger_types.h. Also, we must get rid of all instances of the DC_LOG_.*() functions that are currently in amdgpu_dm since we don't use the DC logger there and we can simply refer to the macros directly there instead. Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com> Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/dcn35')
-rw-r--r--drivers/gpu/drm/amd/display/dc/dcn35/dcn35_hwseq.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dcn35/dcn35_hwseq.c b/drivers/gpu/drm/amd/display/dc/dcn35/dcn35_hwseq.c
index 03ef7820139a..2be2a2f91434 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn35/dcn35_hwseq.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn35/dcn35_hwseq.c
@@ -55,14 +55,15 @@
#include "dcn31/dcn31_hwseq.h"
#include "dcn20/dcn20_hwseq.h"
-#define DC_LOGGER_INIT(logger)
+#define DC_LOGGER_INIT(logger) \
+ struct dal_logger *dc_logger = logger
#define CTX \
hws->ctx
#define REG(reg)\
hws->regs->reg
#define DC_LOGGER \
- dc->ctx->logger
+ dc_logger
#undef FN
@@ -341,6 +342,8 @@ static void update_dsc_on_stream(struct pipe_ctx *pipe_ctx, bool enable)
struct pipe_ctx *odm_pipe;
int opp_cnt = 1;
+ DC_LOGGER_INIT(stream->ctx->logger);
+
ASSERT(dsc);
for (odm_pipe = pipe_ctx->next_odm_pipe; odm_pipe; odm_pipe = odm_pipe->next_odm_pipe)
opp_cnt++;