Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp626747pxv; Thu, 15 Jul 2021 11:53:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxoyfO8kMj72q16JzWxmnIp2UgKecoKGAncWDAKo+3kmylWSpcruv0c7WIg6HGM+lFrZm7w X-Received: by 2002:a6b:8b0d:: with SMTP id n13mr3782652iod.169.1626375234877; Thu, 15 Jul 2021 11:53:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626375234; cv=none; d=google.com; s=arc-20160816; b=BKNNxU/4zxo1btnZoLd6u4+Og19od12GD/9+N0ma91OX6qcSHYCQ9sceI0qnCn1r1p gRQ8ziXL4DbqCEvsOr5k3b1KyQIq3sIdMe0KBqVn2gX1aCrXqXn4zLHFUYj8MJz5gUY4 0XJy4ZnGN09A4QJYh00Q8a+IsNBK9upTnhppu5oAAChzNXi6BQwi5McNBXiLv2Md5H6F jvtunBIRxho0ukFH1SpYP8Hzl0hkKepwFRST52k0iAE3hBThcwE0nNZJZnJTH3jBeskX i4u9BZGK8k6xeKolvvfbT03VT1lUafzwvyjPmERm+ynu8CBvhPtxhS4TTot8Tg39AJ7w ZkBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=v23hZawquIEYi7E1YbxdOCiaV8s4Ubd8EKOiIgDtYb8=; b=vNSTtGaWdt3rP1RY8425etUaGnRO0d9wwlUxh++dAgR2mq4GxCdXA3+pYfmZPS6a2v DeH62lyZwYH+29qNvtjfuE0EI53PLMXmUK0MwZUhBb5h8BNex7QxCpOPlOy7Ei5MTFoS g0riCOO4VHXu6YduWgijKd9WwC67HVrroaQuoSv0BVO4sfHGsa59z7EvPBLwlM3/zcIj wWXICY1WCisf19FcxXy7kT9w9JlbPNYt6jV/t56WJZdK2zOKjCLyoW1bjurDuxVM7Mw8 K0obAOC/l+QeVCuHE172D1A+TjqlsaQOnJ9XMPZs6PRoKL4JOw+cbDp65Z/EA+AFdPmf /05Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=2EfVV7OO; 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=pass (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 z10si8133392ioq.37.2021.07.15.11.53.42; Thu, 15 Jul 2021 11:53:54 -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=@linuxfoundation.org header.s=korg header.b=2EfVV7OO; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242041AbhGOSzx (ORCPT + 99 others); Thu, 15 Jul 2021 14:55:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:53088 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239816AbhGOSu4 (ORCPT ); Thu, 15 Jul 2021 14:50:56 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id F1A6D613E4; Thu, 15 Jul 2021 18:47:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626374877; bh=FrBFz7/w6+PKW1mVMpwaR/JBwSjt+rMNS1Y/1JJj+qs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2EfVV7OO4JOoQgpk8u8od2h1pVxvGXHU1Wc0SKtK9xjXajTIo8XIKoky1tVYIXzKb X/mK7Q0uMP0je57+/9osvU8OQL6qhmY1479W0yeNHCHom400R3WbX609a16U0osQ1p v4PpXBKCPGAzDvzxvnvs9ewBkFTGQ2GOjGbEC7+4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Roman Li , Nicholas Kazlauskas , Stylon Wang , Daniel Wheeler , Alex Deucher , Sasha Levin Subject: [PATCH 5.10 065/215] drm/amd/display: Update scaling settings on modeset Date: Thu, 15 Jul 2021 20:37:17 +0200 Message-Id: <20210715182610.887608218@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210715182558.381078833@linuxfoundation.org> References: <20210715182558.381078833@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Roman Li [ Upstream commit c521fc316d12fb9ea7b7680e301d673bceda922e ] [Why] We update scaling settings when scaling mode has been changed. However when changing mode from native resolution the scaling mode previously set gets ignored. [How] Perform scaling settings update on modeset. Signed-off-by: Roman Li Reviewed-by: Nicholas Kazlauskas Acked-by: Stylon Wang Tested-by: Daniel Wheeler 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 df26c07cb912..b413a7a2e92f 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -8291,7 +8291,8 @@ skip_modeset: BUG_ON(dm_new_crtc_state->stream == NULL); /* Scaling or underscan settings */ - if (is_scaling_state_different(dm_old_conn_state, dm_new_conn_state)) + if (is_scaling_state_different(dm_old_conn_state, dm_new_conn_state) || + drm_atomic_crtc_needs_modeset(new_crtc_state)) update_stream_scaling_settings( &new_crtc_state->mode, dm_new_conn_state, dm_new_crtc_state->stream); -- 2.30.2