Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3798195ybi; Mon, 29 Jul 2019 12:50:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqyYWdeECpZGFL+8y9b5kC88w5LFspQRyXYeSgkcfJPtYGmXaRELfoiHn9o4P8BSc1WZOOU3 X-Received: by 2002:a63:6f81:: with SMTP id k123mr107787326pgc.12.1564429822658; Mon, 29 Jul 2019 12:50:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564429822; cv=none; d=google.com; s=arc-20160816; b=Aju7qpr+qk61vL0tJ5Nq/e76b3OKnTp0VDgZVZLwRReALGqsg9VvZka8oSgcKsBzum WM1g2yfI91fOd/DBa7Bm9Tlk9DFv/ZUVuwNLX8TQjXaLxabeBxoMbu5a0375E41cZ65+ D2fI7Zb2XDMAiBQlgkiWVwoAHsppzqJx0nccxfl7EfqwEMSi+iKYxu/A6detW+3/1FSC non9+Jgx+nCrFHrWPlZkxCaWnGscpomT6Q4KHLqfYork4opfqsqkcl6QnwO0Op8uvM1s B5TGZCcb34KNVeVd1sgaEYY9u9C4OWLP4ZPWk5uQwLRHaulzqplV/wUqa1jjkpLdU6el esUQ== 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=lOJZQm2O3fWV0BHa249mpV6tEl52y/BrGOTXMcoB1Dg=; b=zW2x1mcVXp/2sqVn2ThabS1EYuBwudNMQAY87aP+tDTb77ezUwDklopsRaCsRiBRBw FvIKHXAtVX0h8eWpiBo7TAwFTchgejrSa4VNmLhUK+NkREfzRm3KRyDTLoPwUcF7aiIM VpuPu9bVmUHRcW7Y6I6NiAtsAREx5VcA1IUaHa4uo7urAi3ghmqhhbfoSwXXK7l19Tbt 0YxGv9iimKBX1nw+whdgEB+EiXykdi2psCOmqCOKjUL7v4F7De7rPqvpIuYwOMeXPBBS tdAUheRI1bKtN6/JQvnVcPQZdbCyAm10Ptjyp8eY2fVV4KJlJRb/0TCfOCvZGOAFE6Gd Q3Cg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=0KH1lNkO; 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 n17si25144455pgh.164.2019.07.29.12.50.07; Mon, 29 Jul 2019 12:50:22 -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=0KH1lNkO; 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 S2390449AbfG2Tsy (ORCPT + 99 others); Mon, 29 Jul 2019 15:48:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:39132 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390237AbfG2Tst (ORCPT ); Mon, 29 Jul 2019 15:48:49 -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 1B58E2054F; Mon, 29 Jul 2019 19:48:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564429728; bh=ZmJcYVj3vIaFeFPJxeMpF8uhIBbkm+iqJEjV41m3/1M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0KH1lNkOA2b4RYqNsbqVCP+PHUgtAKZ6Bm0P5QFZMSoYUkKUzpS3LzTf0IVWQjXrU JDt4/d7HKDC+ngkASM5CxUs+0tND5bbhgc7f56FSgIlPFbvLhWHMTkdP4QwNFbJTZl dCqa9W4QH+MKLHjyelFdH9ylrKLJzagUN8WA+FFM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nicholas Kazlauskas , Harry Wentland , Leo Li , Alex Deucher , Sasha Levin Subject: [PATCH 5.2 037/215] drm/amd/display: Reset planes for color management changes Date: Mon, 29 Jul 2019 21:20:33 +0200 Message-Id: <20190729190746.833737256@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190729190739.971253303@linuxfoundation.org> References: <20190729190739.971253303@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 7316c4ad299663a16ca9ce13e5e817b4ca760809 ] [Why] For commits with allow_modeset=false and CRTC degamma changes the planes aren't reset. This results in incorrect rendering. [How] Reset the planes when color management has changed on the CRTC. Technically this will include regamma changes as well, but it doesn't really after legacy userspace since those commit with allow_modeset=true. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Harry Wentland Acked-by: Leo Li Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++++ 1 file changed, 4 insertions(+) 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 31530bfd002a..0e482349a5cb 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -6331,6 +6331,10 @@ static bool should_reset_plane(struct drm_atomic_state *state, if (!new_crtc_state) return true; + /* CRTC Degamma changes currently require us to recreate planes. */ + if (new_crtc_state->color_mgmt_changed) + return true; + if (drm_atomic_crtc_needs_modeset(new_crtc_state)) return true; -- 2.20.1