Commit fd0293dd authored by Hugo Hu's avatar Hugo Hu Committed by Alex Deucher

drm/amd/display: enable plane if container of plane_status changed

[why]
We hit an issue which driver reallocate a pipe from desktop bottom
pipe to video bottom pipe. In this case, driver need to re-enable
plane.

[how]
Enable plane if container of plane status changed.
Signed-off-by: default avatarHugo Hu <hugo.hu@amd.com>
Reviewed-by: default avatarTony Cheng <Tony.Cheng@amd.com>
Acked-by: default avatarQingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 84034ad4
......@@ -1160,13 +1160,20 @@ void dcn20_pipe_control_lock(
static void dcn20_detect_pipe_changes(struct pipe_ctx *old_pipe, struct pipe_ctx *new_pipe)
{
bool plane_state_update = false;
new_pipe->update_flags.raw = 0;
/* Exit on unchanged, unused pipe */
if (!old_pipe->plane_state && !new_pipe->plane_state)
return;
/* Detect plane state update */
if (old_pipe->plane_state && new_pipe->plane_state
&& (old_pipe->plane_state != new_pipe->plane_state)) {
plane_state_update = true;
}
/* Detect pipe enable/disable */
if (!old_pipe->plane_state && new_pipe->plane_state) {
if ((!old_pipe->plane_state && new_pipe->plane_state) || plane_state_update) {
new_pipe->update_flags.bits.enable = 1;
new_pipe->update_flags.bits.mpcc = 1;
new_pipe->update_flags.bits.dppclk = 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment