From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,T_DKIMWL_WL_HIGH,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E15D1C28CC0 for ; Thu, 30 May 2019 04:43:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BB1F525A4E for ; Thu, 30 May 2019 04:43:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559191382; bh=KUAQ4pPIJBzQNDsZKpTMqipZiufG+ViwToA0BemVxNA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=aFIEFBdB1ikimc9leCy48ZnkT+NwC9UwrSyfpwN2foRGAZHqCM7fWblKuq1aKEXHE yXk1OnrEZE7KKBd2kBnY/BPRRhPD3jgBIJZ/fm6surLAL54VUTQnmg1JpatQe1aRJO VMWyAN7Dkx9Oc7yRzMQEX9iI1/vxhf+sVm9LHMmU= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729112AbfE3Em4 (ORCPT ); Thu, 30 May 2019 00:42:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:54040 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728890AbfE3DMO (ORCPT ); Wed, 29 May 2019 23:12:14 -0400 Received: from localhost (ip67-88-213-2.z213-88-67.customer.algx.net [67.88.213.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 81399244D4; Thu, 30 May 2019 03:12:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559185933; bh=KUAQ4pPIJBzQNDsZKpTMqipZiufG+ViwToA0BemVxNA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sb0GvuZCjIgr2Lz/TfwY0tgdZcEG9UbApH7xc8NfYDOQUTHzIhBB9FTJ1zsP4wyJ3 YbT0HWif3fwMwawLcY8FQJfjN39p8yX7EjZQ1WkZYXvCpuO/yKWulfbNjms0Tlv0Gj N+m/iUbDE4ng6vH0lHbT+HHcaXOS53/BHi9287q8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dmytro Laktyushkin , Tony Cheng , Bhawanpreet Lakha , Alex Deucher , Sasha Levin Subject: [PATCH 5.1 330/405] drm/amd/display: fix releasing planes when exiting odm Date: Wed, 29 May 2019 20:05:28 -0700 Message-Id: <20190530030557.434745429@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190530030540.291644921@linuxfoundation.org> References: <20190530030540.291644921@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org [ 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 Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 6 ++++-- 1 file 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 349ab80177761..4c06eb52ab734 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c @@ -1266,10 +1266,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)); } } -- 2.20.1