From patchwork Wed Mar 27 21:44:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Melissa Wen X-Patchwork-Id: 13607528 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 D481DC54E67 for ; Wed, 27 Mar 2024 21:50:36 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 05A811120AD; Wed, 27 Mar 2024 21:50:36 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=igalia.com header.i=@igalia.com header.b="c1h8XbKh"; dkim-atps=neutral Received: from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5542C1120AD; Wed, 27 Mar 2024 21:50:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=tFGicZQIUmWsJ3dtuEEd31n71M6r+s0nI2noz6miB54=; b=c1h8XbKhJfhDAHfU6QmilzmTEp frHNflOd27izsv15Uj9JH1SE9/Dmh+3foL7+ZcuwfPBwV4bZ93pEU3OPVoRKNggkdH1fdwxw/e4Rm A1MMOWaUZxrsV/MHrsYFImvOB5UHtmW9OWeewJAph0keiz4FOAxBsDzCVk/MlBhxboCo+cLZ95h2y v/nBQJjvllXMfmktFX0eHCKuTatZwl0mk245FOBrFzy5aT5s3zsJUmTdTnjz4hRKCTAQCduiaBWP4 trfd5zV+0ax4fX9TwKU0J+NFdt1bVE9Eyt2zYVeE0aisd/VKxD8L7ZEejgmabxGpbzUlVfwIkReq6 mAE0VK9g==; Received: from [189.6.17.125] (helo=killbill.home) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1rpbAD-00G1qx-Kw; Wed, 27 Mar 2024 22:50:30 +0100 From: Melissa Wen To: Harry Wentland , Alex Deucher , Leo Li , Rodrigo Siqueira , christian.koenig@amd.com, Xinhui.Pan@amd.com, Alex Hung , Mario Limonciello , airlied@gmail.com, daniel@ffwll.ch Cc: Jani Nikula , amd-gfx@lists.freedesktop.org, kernel-dev@igalia.com, dri-devel@lists.freedesktop.org Subject: [RFC PATCH v3 5/6] drm/amd/display: always call connector_update when parsing freesync_caps Date: Wed, 27 Mar 2024 18:44:06 -0300 Message-ID: <20240327214953.367126-6-mwen@igalia.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240327214953.367126-1-mwen@igalia.com> References: <20240327214953.367126-1-mwen@igalia.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Update connector caps with drm_edid data before parsing info for freesync. Signed-off-by: Melissa Wen --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 edc5418db5be..b3c396d626e9 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -3292,13 +3292,11 @@ void amdgpu_dm_update_connector_after_detect( "failed to create aconnector->requested_timing\n"); } - drm_edid_connector_update(connector, aconnector->edid); amdgpu_dm_update_freesync_caps(connector, aconnector->edid); update_connector_ext_caps(aconnector); } else { drm_dp_cec_unset_edid(&aconnector->dm_dp_aux.aux); amdgpu_dm_update_freesync_caps(connector, NULL); - drm_edid_connector_update(connector, NULL); aconnector->num_modes = 0; dc_sink_release(aconnector->dc_sink); aconnector->dc_sink = NULL; @@ -11249,6 +11247,8 @@ void amdgpu_dm_update_freesync_caps(struct drm_connector *connector, amdgpu_dm_connector->dc_sink : amdgpu_dm_connector->dc_em_sink; + drm_edid_connector_update(connector, drm_edid); + if (!drm_edid || !sink) { dm_con_state = to_dm_connector_state(connector->state);