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 AA743FD374D for ; Wed, 25 Feb 2026 12:19:48 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1239C10E75E; Wed, 25 Feb 2026 12:19:48 +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="Wj+RUsB1"; dkim-atps=neutral Received: from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56]) by gabe.freedesktop.org (Postfix) with ESMTPS id 49A5E10E75B; Wed, 25 Feb 2026 12:19:45 +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=0AbNUcbVTDIpTiTwV5aQFscbMCY8Oe+Uiq8cmwVbmRs=; b=Wj+RUsB1SIWofTEb/CarzoX0U2 hUetzj8M/EsddNNqeX0xBji6SB00OGzCHBVuBF06VJ4rwbYYKoYn6k86Y8wg789MjSKM62z/R2QQi Zdh0CD+hxmYBGLCqUVYyT3NaKvPDBw2dAorB7VMjGHquNwNalyL/lqpdBQN+Vinmz+80Os3pqEXWA fMuUfKFof4y6R7/uN2q/eZ6mwe80LzNej4hSl8Vra31re1KZgfHoSCe+MeYkFV9yCzECTTkHkNRbR uQgk7nX3qDHIjwmoP1t9OtGSXshdlWqcS2XVyEK6q5fO5/6JkrlYvptu+xqP8JI/UvRN55g2csMK0 nzsKD8qA==; Received: from [186.208.68.119] (helo=killbill.home) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1vvDrX-005DpP-63; Wed, 25 Feb 2026 13:19:31 +0100 From: Melissa Wen To: airlied@gmail.com, alexander.deucher@amd.com, alex.hung@amd.com, andrzej.hajda@intel.com, christian.koenig@amd.com, harry.wentland@amd.com, jernej.skrabec@gmail.com, jonas@kwiboo.se, Laurent.pinchart@ideasonboard.com, maarten.lankhorst@linux.intel.com, mario.limonciello@amd.com, mripard@kernel.org, mwen@igalia.com, neil.armstrong@linaro.org, rfoss@kernel.org, simona@ffwll.ch, siqueira@igalia.com, sunpeng.li@amd.com, tzimmermann@suse.de Cc: Jani Nikula , Michel Daenzer , =?UTF-8?q?Timur=20Krist=C3=B3f?= , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, kernel-dev@igalia.com Subject: [PATCH v8 3/8] drm/amd/display: use drm_edid_product_id for parsing EDID product info Date: Wed, 25 Feb 2026 09:04:32 -0300 Message-ID: <20260225121903.236115-4-mwen@igalia.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260225121903.236115-1-mwen@igalia.com> References: <20260225121903.236115-1-mwen@igalia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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" commit 3ddbd345539e ("drm/edid: add drm_edid_get_product_id()") introduced drm_edid_product_id. Use this to get debug info from drm_edid instead of directly parsing the raw EDID. Signed-off-by: Melissa Wen --- v5: - replace series url to commit hash (Mario) v8: - fix syntax in the commit message (Mario) --- .../drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c index ef7f27ce4b50..93db85543440 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c @@ -111,6 +111,7 @@ enum dc_edid_status dm_helpers_parse_edid_caps( struct drm_device *dev = connector->dev; struct edid *edid_buf = edid ? (struct edid *) edid->raw_edid : NULL; const struct drm_edid *drm_edid; + struct drm_edid_product_id product_id; struct cea_sad *sads; int sad_count = -1; int sadb_count = -1; @@ -127,13 +128,13 @@ enum dc_edid_status dm_helpers_parse_edid_caps( if (!drm_edid_valid(drm_edid)) result = EDID_BAD_CHECKSUM; - edid_caps->manufacturer_id = (uint16_t) edid_buf->mfg_id[0] | - ((uint16_t) edid_buf->mfg_id[1])<<8; - edid_caps->product_id = (uint16_t) edid_buf->prod_code[0] | - ((uint16_t) edid_buf->prod_code[1])<<8; - edid_caps->serial_number = edid_buf->serial; - edid_caps->manufacture_week = edid_buf->mfg_week; - edid_caps->manufacture_year = edid_buf->mfg_year; + drm_edid_get_product_id(drm_edid, &product_id); + + edid_caps->manufacturer_id = product_id.manufacturer_name; + edid_caps->product_id = le16_to_cpu(product_id.product_code); + edid_caps->serial_number = le32_to_cpu(product_id.serial_number); + edid_caps->manufacture_week = product_id.week_of_manufacture; + edid_caps->manufacture_year = product_id.year_of_manufacture; edid_caps->analog = !(edid_buf->input & DRM_EDID_INPUT_DIGITAL); drm_edid_get_monitor_name(edid_buf, -- 2.51.0