Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp641682pxv; Thu, 15 Jul 2021 12:14:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxEWv58Kb5qvtfnpVvahX7yVIEZ7axt9xPkUj4RvoyiAB5HFCqGHsJuPbWDuUImfjMRNib2 X-Received: by 2002:a5e:9e4a:: with SMTP id j10mr4223532ioq.29.1626376485360; Thu, 15 Jul 2021 12:14:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626376485; cv=none; d=google.com; s=arc-20160816; b=DShusWD+rVk/Wy2w44T1MDs1NeE5ZbPi24FuWODgED/CPIpiExSQlZ//D5LyuhT+Pc YyoICcq2cSHlBizBz4BLebc3hKK5tDGVrjHJEaKeQf8pSbBDLQPeduGeB+OqPgn1xI9n T8BqkXWXJuS8xHGbuXThCudG4KYOIJZcAWfu1vWKL91RJGjdME85Woq3zNPA8Alveiqc Id8cmIKXwF5BisadEJe3/mcFM08lsvrpyieBgoWC3zrVBTEGllMprI/Hd7u7Oyx0dplV /G8qxdM9S5Onw6F/FNQAub1Pyu27yp4x2brfs2q5mF0yBtVQt+RniWmieJWfJSxOrCxI 8uSQ== 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=HDJl95hwB92DHqkX+IpiT14nLMs3EGwzhUcHJoEiu0M=; b=tkrfBs8AlFVcsEFkVL15F6Adg/k9NROVJTgl+FANSvgyarToWSDO3CulGFZRy9K/UI WsEDsvyoo/exr9fiqOdfoDcudGC6mhF7zDuFDoVU7pU9xotGauwCaKPwb9Ydlogsz7yR N0tFTDPFtJLUIWmJWRhVz6qIDbimHipMpz/2loYsFWfojzTfscVVx7eJgX0xa6fv2gyi xwc8tXRAOCwa4XYQ6k+JpsPCeC076d6EwbNKKarib2TIJWqV8UvQq7r5+xIZ/VCt4Gv5 XiSAwEZUf1YV3X7u4LCuqg5+e+MbkfQry61+i3ZvrOU4E+j72usBm1ZaNY1qQDC4DK/N CFIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=GtBw4j7Q; 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 x1si8401705jan.58.2021.07.15.12.14.33; Thu, 15 Jul 2021 12:14:45 -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=GtBw4j7Q; 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 S244769AbhGOTPO (ORCPT + 99 others); Thu, 15 Jul 2021 15:15:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:38800 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239026AbhGOTBq (ORCPT ); Thu, 15 Jul 2021 15:01:46 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3FBC4613CA; Thu, 15 Jul 2021 18:58:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626375501; bh=LEIu0K0lZXzyYQK/yABpqL+4X7tsqpZ7mBTFqukTQGY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GtBw4j7Q9KSmaOK35bHqgYDIXJXxb9MH3JSyVoddFq09Va92DgegYuIyp76yyOfim 5qfb422RnJZocAB51l6Ho31UM2v3iDTOFx/5xJWIJRqsZHn1NF8nZTkAu3Zv7JmbGd 14Hfkjic1XbyN9BzsFUy4RY/RRqOwOvhNyYGkBks= 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.12 071/242] drm/amd/display: Update scaling settings on modeset Date: Thu, 15 Jul 2021 20:37:13 +0200 Message-Id: <20210715182605.070249601@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210715182551.731989182@linuxfoundation.org> References: <20210715182551.731989182@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 0858e0c7b7a1..74e74971df74 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -8939,7 +8939,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