Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1012921yba; Thu, 4 Apr 2019 02:25:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqwt4c7fyFtC0hXVJy4XF3EQpMcJn8rOQIeqFKb/spK8ITt4qcM/yikgTcsshHR1/W4aJImQ X-Received: by 2002:a63:5858:: with SMTP id i24mr4754402pgm.222.1554369912861; Thu, 04 Apr 2019 02:25:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554369912; cv=none; d=google.com; s=arc-20160816; b=UODvlGZhzRqa8MQoOpMZ+GZK2AIlDVnPFuDUBVKgNpKWj2zb41cHHW54EfggE7F4Yo AyRCepyQ0NDGADrrepuY0cxUi8FmGBp/oI7x8OpHfwBg7bA3+2AsiLxkvaJtgW8rFrD5 bgnT9B95dKeknNCttWhJ6p5RY6my7gecIWHwZS5DPmr1HzuK/T4Qf+8qZB2zbOL3Fk3m 8dZcChyGaNr0iT/oLrSP5+rkF/Xon+vas4uyF6Qbu7VuMGer5evtiHkqBNydnspJ5EMH RBIvMLj9CNjKaObexbU4H4qJ+WmB5PpaBQnyMjcqT1y6nKED4RDbTb/0CENrgoWyWuhi dtDQ== 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=Yqs0JiR2iOH4HgfPV1U4iB7rvtWeke+NCZJReO+9YuA=; b=mdzEEv+N5qsA1Srz4zCo/Vpb/cd1GoJ6eYPjSIGvyKt1w8rb/2qqSqyCV+1ZWUaMOm bR55ryfXQ0VO+aglPgbK3E1SXimuUQP0pKzu54UrquizZyp7iTQHa7J/QNf2dRrFbSqA pL/bYa5w/8f3/G4O/Lns3IHue6RnAQUYsoZWFtoBncVutDmlfzUO4YZd+77zomPBAN+9 WUc64tmIeSesEls/Vu2CMNZjkWlqPMRUABNHOXptY52DjlD7pSRZWSGlT4Qpe2bNrP5c qqi6Lo2/Oq0913kTo6PtbeoUG3rJ21hq4LFPF21AgShnFxN9BxUu0dfnWwLTTYOAK5kE DOKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tNcFoQ0B; 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 t22si15810738plo.74.2019.04.04.02.24.57; Thu, 04 Apr 2019 02:25:12 -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=tNcFoQ0B; 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 S2387831AbfDDJPK (ORCPT + 99 others); Thu, 4 Apr 2019 05:15:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:56038 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387403AbfDDJPH (ORCPT ); Thu, 4 Apr 2019 05:15:07 -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 BFF1E2054F; Thu, 4 Apr 2019 09:15:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1554369307; bh=1XBMWzmyoaSDiyIN1So87avbBwSH5uN/ymx2n/0Gkbw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tNcFoQ0BSfBb+F4b9lo6HwBBj9laoOQ1hQw0aRJMnk2ADMZsGjCZl2qFsy+fJPqw8 YFcRkDB7vJqNUNd2kRlf3K+s+uGO4jEhjTqDxRi9Y2OqQ/oCpVJ3N0NwpiOq0/OWm+ iaTfC7Ks6vgWxwLJ2gOk3kJcBYLblUJTImnaxMeg= 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 5.0 161/246] drm/amd/display: Dont re-program planes for DPMS changes Date: Thu, 4 Apr 2019 10:47:41 +0200 Message-Id: <20190404084624.807062146@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190404084619.236418459@linuxfoundation.org> References: <20190404084619.236418459@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 5.0-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 6d77fd966dbd..0040605cace8 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -4975,7 +4975,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