Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp998498yba; Thu, 4 Apr 2019 02:05:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqy8j+UG+DCEvOCAiu7lZX13xuLfib0sJoPeaEqiB3MRmEwy5JCIskdX2WikRcEnnuNo5yRz X-Received: by 2002:a17:902:9a83:: with SMTP id w3mr5205412plp.241.1554368711894; Thu, 04 Apr 2019 02:05:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554368711; cv=none; d=google.com; s=arc-20160816; b=vnNzVIHbeZdJrFcIewbJikACdL3d0Bs9JJaLEKaJYzFCtcS/AWwkt3Fq4kcNDt2v9q 0QKizFnZgNWdtRARifG/zzlw2sM9WzLZTyjYvXxjO+NcuiJ/nVoz2LN3/bS15ZkmE5d7 ojIdZbdpbcn9N/5NGZHp/ISSNHOQXIbPBzmkUVqyeQWXryxFDRtTn1Bqvxn47hyOWuA2 BHEbYa+lrAl0apYtEYXptIL2J35Rf4zu3klqIJnRTpOvEgXNzRF3GNuVy/B/MeC+1Qua ey12E6S5mKoRokHW7G9hmTlieNxr0UKJ2TGK+PCleNMwB7I4polr1X1J8zJ9kWf1b1UL dDZA== 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=hRR6utkVVvp1Of5aT5L15WCjhgxSBBW1o3UFsCw1cSg=; b=zlQ7nduBE7RXIS0tPTlTy1AbyM7SwZhKIsmohp0uxapZvGMK+zKAyZNkqbQwwhGENA SpQLuDaYHEi/CCegtSyvAkz3N/ktgEKY6qPADRho1oSN70rOAQTq6Xidzfnha3a7en2U ZY3unajupN3oilAlZdV96At3iw38ytAgiUA78WOcLsoNXIksqUHvi5yViGs1AJFQGu0/ yAitgBusA8wCS368dxtXx5+eBe0P09JMWiyLo2Fvmq7C3mMy43+9myF5v5Wd/xhqLSz+ lRJ+IlfqlyA4SF31YSBGEIemNyDuk04qnI6LEc8di1L6glIpdFjm9sFeDgCso0+tPmJa pdtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=DWflh9ub; 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 k3si16492147pfb.100.2019.04.04.02.04.57; Thu, 04 Apr 2019 02:05:11 -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=DWflh9ub; 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 S1731960AbfDDJEY (ORCPT + 99 others); Thu, 4 Apr 2019 05:04:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:42150 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729879AbfDDJEW (ORCPT ); Thu, 4 Apr 2019 05:04:22 -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 B3EE221741; Thu, 4 Apr 2019 09:04:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1554368662; bh=1lfBzk8SrmoxwSDnma05OF4zxIGJE/MaHosHdZmKu8k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DWflh9ubTynXgc0lFt8Nt2922JjKODoslYV0YdWJQR0XYcmJV1oAKtUa4uHY0gAEB uMdlFKEgDVYDrucElcGt16oSguKl1adSGPqTTSAilbC8jajVgKKNGWMxG45+PXtLK6 r5KwS+TNBlQBs9mtu45pors3NCyE7sHvELFTt0pA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nicholas Kazlauskas , Sun peng Li , Bhawanpreet Lakha , Tony Cheng , Alex Deucher , Sasha Levin Subject: [PATCH 4.19 122/187] drm/amd/display: Dont re-program planes for DPMS changes Date: Thu, 4 Apr 2019 10:47:39 +0200 Message-Id: <20190404084608.987667855@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 5062b797db4103218fa00ee254417b8ecaab7401 ] [Why] There are opt1c lock warnings and CRTC read timeouts when running the "igt@kms_plane@plane-position-hole-dpms-pipe-*" tests. These are caused by trying to reprogram planes that are not in the current context. DPMS off removes the stream from the context. In this case: new_crtc_state->active_changed = true new_crtc_state->mode_changed = false The planes are reprogrammed before the stream is removed from the context because stream_state->mode_changed = false. For DPMS adds the stream and planes back to the context: new_crtc_state->active_changed = true new_crtc_state->mode_changed = false The planes are also reprogrammed here before the stream is added to the context because stream_state->mode_changed = true. They were not previously in the current context so warnings occur here. [How] Set stream_state->mode_changed = true when new_crtc_state->active_changed = true too. This prevents reprogramming before the context is applied in DC. The programming will be done after the context is applied. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Sun peng Li Acked-by: Bhawanpreet Lakha Acked-by: Tony Cheng Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index c5ba9128b736..c57e85f08e23 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -4368,7 +4368,8 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state, static void amdgpu_dm_crtc_copy_transient_flags(struct drm_crtc_state *crtc_state, struct dc_stream_state *stream_state) { - stream_state->mode_changed = crtc_state->mode_changed; + stream_state->mode_changed = + crtc_state->mode_changed || crtc_state->active_changed; } static int amdgpu_dm_atomic_commit(struct drm_device *dev, -- 2.19.1