From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 87DD5C3DA49 for ; Tue, 16 Jul 2024 14:25:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 08AB910E062; Tue, 16 Jul 2024 14:25:53 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="FmnxSbAs"; dkim-atps=neutral Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by gabe.freedesktop.org (Postfix) with ESMTPS id D3E9410E71C; Tue, 16 Jul 2024 14:25:51 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id B8DBF60DBA; Tue, 16 Jul 2024 14:25:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2148BC116B1; Tue, 16 Jul 2024 14:25:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1721139950; bh=Xn+6qUzEpTK6qfPzPjy3rGiaLoMBOtgvKgPsCnJsxrw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FmnxSbAsnQkWj/lqjVx7qGHXsOObpICYIPisn2JHYdlvpGUbF++S/ahnSQiaXlkoe 1Ia6b77eiZA9SWz+kxSXNo2mra5JlKz0w6vpr1nznrsbyDLXxdUy3/JmkZTLghL/T4 JHziIraQIMIv8mXmBUQ/uUoOR+6QJq9/XpJfcnwx9Ap3pReFJTRqPGxuommu0Luqia i7ZJADI5EpVuXUCbk9RpHUgK/B1saR8XtgnJuI+cbnycbMjEbESDJMrxhFjWhZcW1m s0UiBlgoCs8iPsX/4mottu7ov1YADDXLLLiEgAuZITv7KpJznACVjJvvPCWmEp6WL0 8pqWmXlV+1GUw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Tom Chung , Sun peng Li , Jerry Zuo , Daniel Wheeler , Alex Deucher , Sasha Levin , harry.wentland@amd.com, Rodrigo.Siqueira@amd.com, christian.koenig@amd.com, Xinhui.Pan@amd.com, airlied@gmail.com, daniel@ffwll.ch, alex.hung@amd.com, hamza.mahfooz@amd.com, roman.li@amd.com, mario.limonciello@amd.com, joshua@froggi.es, wayne.lin@amd.com, srinivasan.shanmugam@amd.com, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [PATCH AUTOSEL 6.9 11/22] drm/amd/display: Reset freesync config before update new state Date: Tue, 16 Jul 2024 10:24:18 -0400 Message-ID: <20240716142519.2712487-11-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240716142519.2712487-1-sashal@kernel.org> References: <20240716142519.2712487-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.9.9 Content-Transfer-Encoding: 8bit X-BeenThere: amd-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for AMD gfx List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: amd-gfx-bounces@lists.freedesktop.org Sender: "amd-gfx" From: Tom Chung [ Upstream commit 6b8487cdf9fc7bae707519ac5b5daeca18d1e85b ] [Why] Sometimes the new_crtc_state->vrr_infopacket did not sync up with the current state. It will affect the update_freesync_state_on_stream() does not update the state correctly. [How] Reset the freesync config before get_freesync_config_for_crtc() to make sure we have the correct new_crtc_state for VRR. Reviewed-by: Sun peng Li Signed-off-by: Jerry Zuo Signed-off-by: Tom Chung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 + 1 file changed, 1 insertion(+) 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 f866a02f4f489..53a55270998cc 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -10028,6 +10028,7 @@ static int dm_update_crtc_state(struct amdgpu_display_manager *dm, } /* Update Freesync settings. */ + reset_freesync_config_for_crtc(dm_new_crtc_state); get_freesync_config_for_crtc(dm_new_crtc_state, dm_new_conn_state); -- 2.43.0