drm/amd/display: use mpcc_count to log MPC state
Subsystems (3)
PATCH 1/1 drm/amd/display: use mpcc_count to log MPC state
According to [1]:
``` DTN only logs 'pipe_count' instances of MPCC. However in some cases there are different number of MPCC than DPP (pipe_count). ```
As DTN log still relies on pipe_count to print mpcc state, switch to mpcc_count in all occurrences.
[1] https://lore.kernel.org/amd-gfx/[email protected]/
Signed-off-by Melissa Wen <[email protected]>
--- drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c | 2 +- drivers/gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c | 2 +- drivers/gpu/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c +1 -1
@@ -367,7 +367,7 @@ static void dcn10_log_color_state(struct dc *dc, dc->caps.color.dpp.ocsc);DTN_INFO ("MPCC: OPP DPP MPCCBOT MODE ALPHA_MODE PREMULT OVERLAP_ONLY IDLE\n" ); -for (i =0 ; i < pool->pipe_count; i++) { +for (i =0 ; i < pool->mpcc_count; i++) {struct mpcc_state s = {0 }; pool->mpc->funcs->read_mpcc_state (pool->mpc, i, &s);
drivers/gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c +1 -1
@@ -155,7 +155,7 @@ void dcn20_log_color_state(struct dc *dc,DTN_INFO ("MPCC: OPP DPP MPCCBOT MODE ALPHA_MODE PREMULT OVERLAP_ONLY IDLE" " OGAM mode\n" ); -for (i =0 ; i < pool->pipe_count; i++) { +for (i =0 ; i < pool->mpcc_count; i++) {struct mpcc_state s = {0 }; pool->mpc->funcs->read_mpcc_state (pool->mpc, i, &s);
drivers/gpu/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c +1 -1
@@ -166,7 +166,7 @@ void dcn30_log_color_state(struct dc *dc,"C21 C22 C23 C24 " "C31 C32 C33 C34 \n"); -for (i =0 ; i < pool->pipe_count; i++) { +for (i =0 ; i < pool->mpcc_count; i++) {struct mpcc_state s = {0 }; pool->mpc->funcs->read_mpcc_state (pool->mpc, i, &s);
Signature · 1 line
2.43.0
Quoted 49 lines · Melissa Wen
According to [1]:
``` DTN only logs 'pipe_count' instances of MPCC. However in some cases there are different number of MPCC than DPP (pipe_count). ```As DTN log still relies on
pipe_countto print mpcc state, switch tompcc_countin all occurrences.[1] https://lore.kernel.org/amd-gfx/[email protected]/
Signed-off-by Melissa Wen <[email protected]>--- drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c | 2 +- drivers/gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c | 2 +- drivers/gpu/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c +1
-1@@ -367,7 +367,7 @@ static void dcn10_log_color_state(struct dc *dc, dc->caps.color.dpp.ocsc);DTN_INFO ("MPCC: OPP DPP MPCCBOT MODE ALPHA_MODE PREMULT OVERLAP_ONLY IDLE\n" ); -for (i =0 ; i < pool->pipe_count; i++) { +for (i =0 ; i < pool->mpcc_count; i++) {struct mpcc_state s = {0 }; pool->mpc->funcs->read_mpcc_state (pool->mpc, i, &s);drivers/gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c +1
-1@@ -155,7 +155,7 @@ void dcn20_log_color_state(struct dc *dc,DTN_INFO ("MPCC: OPP DPP MPCCBOT MODE ALPHA_MODE PREMULT OVERLAP_ONLY IDLE" " OGAM mode\n" ); -for (i =0 ; i < pool->pipe_count; i++) { +for (i =0 ; i < pool->mpcc_count; i++) {struct mpcc_state s = {0 }; pool->mpc->funcs->read_mpcc_state (pool->mpc, i, &s);drivers/gpu/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c +0
-0
drivers/gpu/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c void dcn30_log_color_state(struct dc *dc, · line 172
Quoted 8 lines
drivers/gpu/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c +1
-1@@ -166,7 +166,7 @@ void dcn30_log_color_state(struct dc *dc,"C21 C22 C23 C24 " "C31 C32 C33 C34 \n"); -for (i =0 ; i < pool->pipe_count; i++) { +for (i =0 ; i < pool->mpcc_count; i++) {struct mpcc_state s = {0 }; pool->mpc->funcs->read_mpcc_state (pool->mpc, i, &s);
Hi Melissa,
Thanks a lot for your patch.
Reviewed-by Rodrigo Siqueira <[email protected]>
I already merged this change to asdn.
Thanks
Siqueira