summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2019-05-31 23:53:29 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2019-05-31 23:53:29 +0000
commit4fdda96a3af81d279b3578392e2489b1f984c4ab (patch)
tree57e3d29de9ca558beb6fd17c5ecb627053aeda7b
parent826cc98932bd8908186fc8574c3c3f31129d2b80 (diff)
drm/amd/display: fix releasing planes when exiting odm
From Dmytro Laktyushkin 70611b1b81c4ec8ce99d3c00107e89697ec1f495 in linux 4.19.y/4.19.47 bc2193992b00488f5734613ac95b78ef2d2803ab in mainline linux
-rw-r--r--sys/dev/pci/drm/amd/display/dc/core/dc_resource.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/pci/drm/amd/display/dc/core/dc_resource.c b/sys/dev/pci/drm/amd/display/dc/core/dc_resource.c
index cb020e929a5..cb522395556 100644
--- a/sys/dev/pci/drm/amd/display/dc/core/dc_resource.c
+++ b/sys/dev/pci/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));
}
}