This reverts commit bb622e0c004404b6131633faa6bd8c4939b1df42. There are two issues in this commit:
1. Since commit a4056c2a6344, the output_tf_change bit of the stream update flags is not handled anywhere in the driver and only changes values in case of an UPDATE_TYPE_FULL, which sets update_flags.raw = 0xFFFFFFFF. However, this bit still conditions `.set_output_transfer_func` calls in the DCN2+ and DCN3+ hardware sequence. 2. Every time the plane state changes, the driver updates the output gamma LUT from empty data, since the color management has not changed and no new gamma LUT data has been passed, but the plane_changed bit calls set_output_transfer_func using only the initial/default value of the output TF, regardless of the user space request. Due to these unexpected calls to set output TF with empty data, regamma settings are lost even if color management has not been changed, as reported by Linux KDE/Plasma users. Link: https://gitlab.freedesktop.org/drm/amd/-/issues/4444 Reported-by: Xaver Hugl <xaver.h...@gmail.com> Signed-off-by: Melissa Wen <m...@igalia.com> --- drivers/gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c b/drivers/gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c index 7d24fa1517bf..226424ffcb08 100644 --- a/drivers/gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c +++ b/drivers/gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c @@ -1982,10 +1982,7 @@ static void dcn20_program_pipe( * updating on slave planes */ if (pipe_ctx->update_flags.bits.enable || - pipe_ctx->update_flags.bits.plane_changed || - pipe_ctx->stream->update_flags.bits.out_tf || - (pipe_ctx->plane_state && - pipe_ctx->plane_state->update_flags.bits.output_tf_change)) + pipe_ctx->stream->update_flags.bits.out_tf) hws->funcs.set_output_transfer_func(dc, pipe_ctx, pipe_ctx->stream); /* If the pipe has been enabled or has a different opp, we -- 2.47.2