Commit 3f4dee59 authored by Dillon Varone's avatar Dillon Varone Committed by Alex Deucher
Browse files

drm/amd/display: Fix merging dynamic ODM+MPO configs on DCN32



[WHY&HOW?]
When merging ODM pipes that are using MPO, we must copy the stream_res
from the new top pipe to the bottom pipe so that the overlayed plane is
not pointing to the wrong stream assets.

Reviewed-by: default avatarMartin Leung <Martin.Leung@amd.com>
Reviewed-by: default avatarJun Lei <Jun.Lei@amd.com>
Acked-by: default avatarHamza Mahfooz <hamza.mahfooz@amd.com>
Signed-off-by: default avatarDillon Varone <Dillon.Varone@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent f1b47f00
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1598,6 +1598,9 @@ bool dcn32_internal_validate_bw(struct dc *dc,
					/*MPC split rules will handle this case*/
					pipe->bottom_pipe->top_pipe = NULL;
				} else {
					/* when merging an ODM pipes, the bottom MPC pipe must now point to
					 * the previous ODM pipe and its associated stream assets
					 */
					if (pipe->prev_odm_pipe->bottom_pipe) {
						/* 3 plane MPO*/
						pipe->bottom_pipe->top_pipe = pipe->prev_odm_pipe->bottom_pipe;
@@ -1607,6 +1610,8 @@ bool dcn32_internal_validate_bw(struct dc *dc,
						pipe->bottom_pipe->top_pipe = pipe->prev_odm_pipe;
						pipe->prev_odm_pipe->bottom_pipe = pipe->bottom_pipe;
					}

					memcpy(&pipe->bottom_pipe->stream_res, &pipe->bottom_pipe->top_pipe->stream_res, sizeof(struct stream_resource));
				}
			}