Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp997515yba; Thu, 4 Apr 2019 02:04:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqzvx6v2iio4HwUQK98kcsDBN9sdtAPazuXfeBIzruLRfYIlAALLu2zaSW/yZMmQqJvYDcrj X-Received: by 2002:a63:b811:: with SMTP id p17mr4658250pge.219.1554368641173; Thu, 04 Apr 2019 02:04:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554368641; cv=none; d=google.com; s=arc-20160816; b=hgnuT/p/I+i1SAiSnoQIPMx/5h99W6s6eAi5h0CTctut2m+rnAzpN4UluCeDYHGiuF OoxCKIAcE8Yv/sr/aL3KFai33b6RysKuAYDhbq1F64BoAfNh34ilAG6W3xpkneXGFqc9 XyNNHhIxeoa5t4ghD8huUYQaIKyL6vR8BlRQXLPksyDJKDHeYQ/M011JofEyI1TqovJt zKivT/nSt3Xr3RTv2X7LAl3spgys0rXxiXZL3k+K10kIJp05IYDzTXASBRdjMfvLgFOI xtqdY8C1zUOgRmKsnug052mLSsmedFa7EF7TK07L4wsibNMad2L6y1BF2p62NlhaNVUS p1yw== 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=sgEFX89EWdzSLozOPYpJqD/yvl0kGb4k2RFgPN/iCgY=; b=HsNDUBgz2BMJXffm3hyWZNlRIXLQjoAUSVHBuJCopppRHe4SQvYLH/XoNsrcWX7ls0 rfREzCYwx/3rrS8bSdE3CIMQsd5rIYrq01UN//t7UjSX0l5M4cJcOP3T+TEp5xywmNOU aPxOedGc44QCp06+ZqNjn2X3ehVfnKs17H9nWvihgiQsxSzyKIIjuXwgB3fuXs+Z+tTn eBcmv0w8tJa9R4Io2qUgMMyzYuaSLcKRx2+CdRTF8/LBQdHAbmIWcqn8rASGK3X3WLdK HIkPpWE3uWPsckGowTxPVYefPCJs7va5GcclLDwmc22J2J/C3wv6WaCRQHtl1uVxrJhv 9SqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="ygN4/WIQ"; 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 v7si5267011pgn.193.2019.04.04.02.03.46; Thu, 04 Apr 2019 02:04:01 -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="ygN4/WIQ"; 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 S1731746AbfDDJDO (ORCPT + 99 others); Thu, 4 Apr 2019 05:03:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:40770 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731719AbfDDJDK (ORCPT ); Thu, 4 Apr 2019 05:03:10 -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 1036A2177E; Thu, 4 Apr 2019 09:03:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1554368589; bh=KS49ZRQXFQhsf3hD5VUKYfYlK87+W2Kb8wM8JpGowVI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ygN4/WIQ9ZstrNc1wiZykqF3b/LTv6p6bKzPP1yW1wAzKw6AwADkcj5mOTitbiPwt 4Lw48IkfdYENRVdxQ9qsaPsLqllmFXCj88Q0K22m99lglqKX4jDN0TX5KVtrgnOxUx P/2rhuIvNR1qHvuP/HMmthEzwDymsoBX5Ci5c218= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nicholas Kazlauskas , Leo Li , Tony Cheng , Alex Deucher , Sasha Levin Subject: [PATCH 4.19 079/187] drm/amd/display: Clear stream->mode_changed after commit Date: Thu, 4 Apr 2019 10:46:56 +0200 Message-Id: <20190404084606.751762291@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 d8d2f174bcc2c26c3485c70e0c6fe22b27bce739 ] [Why] The stream->mode_changed flag can persist in the following sequence of atomic commits: Commit 1: Enable CRTC0 (mode_changed = true), Enable CRTC1 (mode_changed = true) Commit 2: Disable CRTC1 (mode_changed = false) In this sequence we want to keep the exiting CRTC0 but it's not in the atomic state for the commit since it hasn't been modified. In this case the stream->mode_changed flag persists as true and we don't re-program the planes for the existing stream. [How] The flag needs to be cleared and it makes the most sense to do it within DC after the state has been committed. Nothing following dc_commit_state should think that the stream's mode has changed. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Leo Li Acked-by: Tony Cheng Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/display/dc/core/dc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c index 9045e6fa0780..bb0cda727605 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc.c @@ -958,6 +958,9 @@ static enum dc_status dc_commit_state_no_check(struct dc *dc, struct dc_state *c /* pplib is notified if disp_num changed */ dc->hwss.set_bandwidth(dc, context, true); + for (i = 0; i < context->stream_count; i++) + context->streams[i]->mode_changed = false; + dc_release_state(dc->current_state); dc->current_state = context; -- 2.19.1