Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp270096ybi; Wed, 29 May 2019 21:04:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqy50Y2riaWAoqNT1Jkb4SjD6jv/KrY9+5KHoQ+/hTdKRm/w/VDpNUkFZpXQeswXVa5wafaB X-Received: by 2002:a65:4907:: with SMTP id p7mr1826284pgs.288.1559189055605; Wed, 29 May 2019 21:04:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559189055; cv=none; d=google.com; s=arc-20160816; b=NunQ22TFRqA3Mlf2K7CLxmk4KgEbk0UGtlNRDPyh4wbwIAkuV1Xj/OakbVhobfgfOO vieX2QqAgXXqqP7qg9st+UJLtnXGFjkeVyry78qSqGJNlJDqW+L9BT6uFUeb6myaRaFu TPvYCpfRQuD6Iz4FvcvrdAApi8/pog7r1DmDbRUi0JyeQpA1d7v3ILaTiqojbkKuPyfF H+7RHo7mR/dGK05EyeH22mgfa/Wz1MV+t9IDHXtGEJXtORBzdoTaKL9A08wad98PcQ4Q EaveViuqwU/ZEcrJ5Tgbo1yTQNL4PxirDTW7f+Z5bhSC1BLmM3SwS0foXwxPY5ZDucI8 dvlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=oWgFN+41SLzeguzO/DyI2obEaeO/oMPKFdWpMcgWj+Y=; b=p0v3j1WPx7fabxUT2i3EeSB7m5vOulp/AzsXfb1rwKTmVvlxTFfvQsi9RJ17grAaoM OaYz9J7oBAHms7eXfw8l3UMQPHWlmchQSnMqfAkhJTjquMsNF84+aCESRqR5s0OVKTrR FxgtUXaj98AJY+OJ72obm3H9jsqCqSnBhFEBIYV99F17ZS5O/ScYc+KeUY6RQK73xKO9 uO3ZNzY9yfwSaE2ArupnCXPu3Ao+XRQENZXOMl3K6Zkqnvi0wpprHIKjrVNPDd8N037k l42q/c4QYYe2JZ95TvkyShWUNWiClNLCUxrvCGTzz3hDQH5aTInf4jEqUNcPF036/SN2 vMbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=FAXThNxs; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t11si1930961pgj.284.2019.05.29.21.03.58; Wed, 29 May 2019 21:04:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=FAXThNxs; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730623AbfE3EBb (ORCPT + 99 others); Thu, 30 May 2019 00:01:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:50012 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731433AbfE3DSJ (ORCPT ); Wed, 29 May 2019 23:18:09 -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 9A4C324771; Thu, 30 May 2019 03:18:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559186288; bh=6er5g/8CYKetSS9XvwMOYRCiloLvfcJOKlkvmk3cSYs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FAXThNxsTkrVUSUsVais8Tk2gIXlbmzduap+rvqMWbGfJIDlSyvl69Zqk9/XXzpSG OSorOOzjyxHB0euanVPYkrQJCZ+vFmyTtuvTxoJ1fLEFnXpKi6r+jghFgplZBd+EKF GjtFhNmtEZK5NBLSPDuDDythuP5pRF8g7LlGDwOg= 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 4.19 244/276] drm/amd/display: fix releasing planes when exiting odm Date: Wed, 29 May 2019 20:06:42 -0700 Message-Id: <20190530030540.397421697@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190530030523.133519668@linuxfoundation.org> References: <20190530030523.133519668@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 87bf422f16be7..e0a96abb3c46c 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)); } } -- 2.20.1