diff options
author | Dmytro Laktyushkin | 2019-03-07 19:26:13 +0100 |
---|---|---|
committer | Greg Kroah-Hartman | 2019-05-31 15:46:31 +0200 |
commit | 70611b1b81c4ec8ce99d3c00107e89697ec1f495 (patch) | |
tree | bcffbf0a587b7c114b712c8af796196d3898ba11 /drivers/gpu/drm/amd | |
parent | thunderbolt: Fix to check for kmemdup failure (diff) | |
download | kernel-qcow2-linux-70611b1b81c4ec8ce99d3c00107e89697ec1f495.tar.gz kernel-qcow2-linux-70611b1b81c4ec8ce99d3c00107e89697ec1f495.tar.xz kernel-qcow2-linux-70611b1b81c4ec8ce99d3c00107e89697ec1f495.zip |
drm/amd/display: fix releasing planes when exiting odm
[ Upstream commit bc2193992b00488f5734613ac95b78ef2d2803ab ]
Releasing planes should not release the 2nd odm pipe right away,
this change leaves us with 2 pipes with null planes and same stream
when planes are released during odm.
Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/gpu/drm/amd')
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c index 87bf422f16be..e0a96abb3c46 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c @@ -1401,10 +1401,12 @@ bool dc_remove_plane_from_context( * For head pipe detach surfaces from pipe for tail * pipe just zero it out */ - if (!pipe_ctx->top_pipe) { + if (!pipe_ctx->top_pipe || + (!pipe_ctx->top_pipe->top_pipe && + pipe_ctx->top_pipe->stream_res.opp != pipe_ctx->stream_res.opp)) { pipe_ctx->plane_state = NULL; pipe_ctx->bottom_pipe = NULL; - } else { + } else { memset(pipe_ctx, 0, sizeof(*pipe_ctx)); } } |