From patchwork Wed Mar 27 16:54:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Melissa Wen X-Patchwork-Id: 13607081 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 9C8C7C54E67 for ; Wed, 27 Mar 2024 16:59:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BAF4910FE64; Wed, 27 Mar 2024 16:59:10 +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="rLoUFVqr"; dkim-atps=neutral Received: from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56]) by gabe.freedesktop.org (Postfix) with ESMTPS id BA00E10FE60; Wed, 27 Mar 2024 16:59:04 +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=avL7qCn1g5IAe0g2VenqKyAhopYdXXva2eLK9wbfsJE=; b=rLoUFVqrBU2HsuWATdxqoiDeVp WTDc+jEv55n8o37k7Dy/kwy8soJ4xLr4f7uOlDaLZ6ZgTIaq1+l8LfaJDM5mrI2k9Jouu8gA5CcnO ZZ1UfB/W0Z7/tJ0k3Y4+JZ32z7vRNt7Og+1b9dv4OwxBaQjm0AigEyruBKoP3umxi34sLUqAD6rSu mOGjMERgtJl5ynLlXUeFLePnQgFp/S/zQjHKPP7uXWl18mRQEOnQzW7Hos+RMoAyrpoIhGuij+2y+ pdRFwSMVsQ8g4/Fhz2h6QmD71WANeI9jF/E1EbIWVIW6jlOI75VTILMjvH4biFsLGil5z4JbeWp6J e5iWztug==; 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 1rpWc7-00Fx4M-AK; Wed, 27 Mar 2024 17:58:59 +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 v2 4/6] drm/amd/display: switch to setting physical address directly Date: Wed, 27 Mar 2024 13:54:45 -0300 Message-ID: <20240327165828.288792-5-mwen@igalia.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240327165828.288792-1-mwen@igalia.com> References: <20240327165828.288792-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" Connectors have source physical address available in display info. Use drm_dp_cec_attach() to use it instead of parsing the EDID again. Signed-off-by: Melissa Wen --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 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 bbbf9c9d40d5..edc5418db5be 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -3277,11 +3277,11 @@ void amdgpu_dm_update_connector_after_detect( } else { const struct edid *edid = (const struct edid *)sink->dc_edid.raw_edid; aconnector->edid = drm_edid_alloc(edid, sink->dc_edid.length); + drm_edid_connector_update(connector, aconnector->edid); - /* FIXME: Get rid of drm_edid_raw() */ if (aconnector->dc_link->aux_mode) - drm_dp_cec_set_edid(&aconnector->dm_dp_aux.aux, - drm_edid_raw(aconnector->edid)); + drm_dp_cec_attach(&aconnector->dm_dp_aux.aux, + connector->display_info.source_physical_address); } if (!aconnector->timing_requested) {