Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1106169pxa; Thu, 20 Aug 2020 02:38:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyEHWJo+FSD0NQq+ttFKP7Hat/GqSo1HaoGMbJfmCyZQX0L69GOnvgJNyhmY3IdiofU6vkP X-Received: by 2002:aa7:da48:: with SMTP id w8mr1955412eds.329.1597916318088; Thu, 20 Aug 2020 02:38:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597916318; cv=none; d=google.com; s=arc-20160816; b=AVUOv+7bqU44bCw83ULv+a0S3zs8Y+e8pWBVJlWaCMhjrPgk6w909xoloIjLSo6n4e EGfKpwKyNPDmKwFoaAisLqsY87ykfQK4uBv/CVE7hYmHW62Vm7mxuw3VJP9evCIJux6d RUjbLSh65QF7lgTE5P1WW3md1VsvTj4WoioPQK+TMqBaEj8+s9PNHctGGGykiW6Bm0rz I3P20eaAZ5Q+eH0bhIhYawMJ9xI6FiDdWZjMX/FLUPakpDNOi8TLFW6zGjRwzfRjFY8E 5wEiIY4pvKnD3x75GFtaK9B3V1XbQREC6JrZzbjHxj8iPyTRcXBhH2aCr0YfmBo9Ztoc SulQ== 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=UOQKpglOGWotxMLsXr8DTLhr5TVj8sNXctbnhqYf4f8=; b=xBqlCEBMRR/2vm8ZHrS2OevoRzAXnCg9gcHDXFbmqN/NSxxvc5FHxjnPXqXenTluZ2 EAsG2TMUMtgZP5D7njGO+YqbypQ6zobx1q++9ItXeG2nOLfJ7zh4YiCEzsO/Vd8BHnBv 388xv0jYQSqwuHgQotMi6hrwtNa7VrU9VubrdhQq0zY7y9vy/0ii9XzI8qh2qflvwkR4 tFVrTFeERLZTwrSz+qAlOD5w+bkXRfSHXI0WP/KeOMg5CTVcKsYVvDQoylB5AYVikfcR KavnPIPZoPnDtNsvmYi9mc3sDV0IOGdT+aIUYWGIAdLMyafedkOqciK6Euxrxq8JAjwO j+JA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=2Bptu01Y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w6si821387ejb.150.2020.08.20.02.38.14; Thu, 20 Aug 2020 02:38:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=2Bptu01Y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728528AbgHTJfZ (ORCPT + 99 others); Thu, 20 Aug 2020 05:35:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:47290 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728341AbgHTJeX (ORCPT ); Thu, 20 Aug 2020 05:34:23 -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 84C4222B3F; Thu, 20 Aug 2020 09:34:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597916063; bh=JmvoH12REXjL9EBO/7KCFCSOXI0pWy/npFzouLzuJbQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2Bptu01YFBhu4anD7ZF6DtuJwO+WYNJbU+pbi9bdoc11WkioiNjEH7z8NxiMFY3Tn aCk4K5ThN+bWDVhtyZMwFV9mgPQFa2gKmXYXlyDhsfj88OaTbuXZsKDpA/37y7FDyw u0BTm1z3H+2v2sRSp1EN3nentQXaSjRBNO6zdFwE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Stylon Wang , Nicholas Kazlauskas , Eryk Brol , Alex Deucher Subject: [PATCH 5.8 231/232] drm/amd/display: Fix dmesg warning from setting abm level Date: Thu, 20 Aug 2020 11:21:22 +0200 Message-Id: <20200820091623.965829893@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200820091612.692383444@linuxfoundation.org> References: <20200820091612.692383444@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 From: Stylon Wang commit c5892a10218214d729699ab61bad6fc109baf0ce upstream. [Why] Setting abm level does not correctly update CRTC state. As a result no surface update is added to dc stream state and triggers warning. [How] Correctly update CRTC state when setting abm level property. CC: Stable Signed-off-by: Stylon Wang Reviewed-by: Nicholas Kazlauskas Acked-by: Eryk Brol Signed-off-by: Alex Deucher Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -8686,6 +8686,29 @@ static int amdgpu_dm_atomic_check(struct if (ret) goto fail; + /* Check connector changes */ + for_each_oldnew_connector_in_state(state, connector, old_con_state, new_con_state, i) { + struct dm_connector_state *dm_old_con_state = to_dm_connector_state(old_con_state); + struct dm_connector_state *dm_new_con_state = to_dm_connector_state(new_con_state); + + /* Skip connectors that are disabled or part of modeset already. */ + if (!old_con_state->crtc && !new_con_state->crtc) + continue; + + if (!new_con_state->crtc) + continue; + + new_crtc_state = drm_atomic_get_crtc_state(state, new_con_state->crtc); + if (IS_ERR(new_crtc_state)) { + ret = PTR_ERR(new_crtc_state); + goto fail; + } + + if (dm_old_con_state->abm_level != + dm_new_con_state->abm_level) + new_crtc_state->connectors_changed = true; + } + #if defined(CONFIG_DRM_AMD_DC_DCN) if (!compute_mst_dsc_configs_for_state(state, dm_state->context)) goto fail;