Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1023239yba; Thu, 4 Apr 2019 02:39:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqzH7vjYtqjQ1Vb9R0DbSyy+WqNkKqz7Keg4GW5x8ycB0PIVQy1JecrOgDB2082S9Z711pNj X-Received: by 2002:a62:304:: with SMTP id 4mr4703934pfd.99.1554370754907; Thu, 04 Apr 2019 02:39:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554370754; cv=none; d=google.com; s=arc-20160816; b=vejPoLsWedxMdmSSCFN7E2t7LMlS7s8ApA/x9d0QgRVWFvXgx/JA+TOFaQXRX/7BPu J/QHQuJ5KjNyOPb1zLLNHhyKzQHyYPBD96n0QOsacZmTBkJL36w0ca9YJYgRmUoQedzN xubZXfcZin7KfKLmJiWT3QfcN9G0kVBBJdNTafeuxLk3hYUD1qTQXkvNXsh361pUoo1B fPROslD0dRiU4OeqaCTlsFmC0wiRiYA03Mm2Ke0fcBm8sbR/fEgKF82T1RTCPjtYCAcr mxfHKbx6MGQ9xocdWul18wvw8TzEqoLzgFooVw7DShky60FF1mMnLIUsM/LRDrZZEFHL sfuw== 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=AW3kSY5077s3xSx2nak+EBVlIKtvuj4MLLtinqdRdIo=; b=pD+2A51kOi/2Nz99MAI3AQ5uiQNAAR0VWP665F5Dj2/OJ3W63y00Vrlo61ovIQsfx6 F88yXvThD7GrKW6lRe/02E1Z9h/+MjTaZAYX0ybLPgGc9iBiy74xB9rwPJxb5e7GO0eW mg5i335NLxFXZ7OLkoQkn3sXwl/1VtcEE40+Q1wbIU8t0Hwl2uGDN3/QxIzamo1gie2/ kJJiIMZp2ltB7Yu+CUOwG6TB04fUXHyH/2S3+hazCyNYxsyPDhIR0P8RiH1ttDNv80B4 65UWwGpL0vqHUdBhD4A3O9t9htPkEuK5V1rOcaDuczj7ma8GM8RLbkRtsuq7moAtTwYh ApnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="e3AnE/wE"; 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 n31si15914021pgm.10.2019.04.04.02.38.59; Thu, 04 Apr 2019 02:39:14 -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="e3AnE/wE"; 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 S1731970AbfDDJE1 (ORCPT + 99 others); Thu, 4 Apr 2019 05:04:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:42210 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729879AbfDDJEZ (ORCPT ); Thu, 4 Apr 2019 05:04:25 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 5FBAF2147C; Thu, 4 Apr 2019 09:04:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1554368664; bh=BVcqPrLL44npZx+5H8LlHov+wp51HvVv+pcHGACAg7w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=e3AnE/wEFdGbD42qyhb76xrv+uijwmLbIKksCHso1w5JIkZT2yCeJDaEALVaN9YJh dzMlrJ2In8E8NsZarRKCQ34LhimmlX0i7BYZk+rI26rKtupVD43o5Ono9Kxb7eTKqC s989UQ/hPdhpplu71hXPx9axe1ztkghPBIrKwfU4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nicholas Kazlauskas , Dmytro Laktyushkin , Tony Cheng , Bhawanpreet Lakha , Alex Deucher , Sasha Levin Subject: [PATCH 4.19 123/187] drm/amd/display: Disconnect mpcc when changing tg Date: Thu, 4 Apr 2019 10:47:40 +0200 Message-Id: <20190404084609.031490097@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190404084603.119654039@linuxfoundation.org> References: <20190404084603.119654039@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore 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 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 77476360f173c127c191bfe8ca8113130ef283b8 ] [Why] This fixes an mpc programming error for the following sequence of atomic commits when pipe split is enabled: Commit 1: CRTC0 (plane 4, plane 3) Pipe 0: old_plane_state = A0, new_plane_state = A1, new_tg = T0 Pipe 1: old_plane_state = B0, new_plane_state = B1, new_tg = T0 Pipe 2: old_plane_state = A0, new_plane_state = A1, new_tg = T0 Pipe 3: old_plane_state = B0, new_plane_state = B1, new_tg = T0 Commit 2: CRTC0 (plane 3), CRTC1 (plane 2) Pipe 0: old_plane_state = A1, new_plane_state = A2, new_tg = T0 Pipe 1: old_plane_state = B1, new_plane_state = B2, new_tg = T1 Pipe 2: old_plane_state = A1, new_plane_state = NULL, new_tg = NULL Pipe 3: old_plane_state = B1, new_plane_state = NULL, new_tg = NULL In the second commit the assertion for mpcc in use is hit because mpcc disconnect never occurs for pipe 1. This is because the stream changes for pipe 1 and the opp_list is empty. This sequence occurs when running the "igt@kms_plane_multiple@atomic-pipe-A-tiling-none" test with two displays connected. [How] Expand the reset condition to include: "old_pipe_ctx->stream_res.tg != new_pipe_ctx->stream_res.tg" ...but only when the plane state is non-NULL for both old and new. Signed-off-by: Nicholas Kazlauskas Reviewed-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/dcn10/dcn10_hw_sequencer.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c index 4058b59d9bea..a0355709abd1 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c @@ -2336,9 +2336,10 @@ static void dcn10_apply_ctx_for_surface( } } - if (!pipe_ctx->plane_state && - old_pipe_ctx->plane_state && - old_pipe_ctx->stream_res.tg == tg) { + if ((!pipe_ctx->plane_state || + pipe_ctx->stream_res.tg != old_pipe_ctx->stream_res.tg) && + old_pipe_ctx->plane_state && + old_pipe_ctx->stream_res.tg == tg) { dc->hwss.plane_atomic_disconnect(dc, old_pipe_ctx); removed_pipe[i] = true; -- 2.19.1