lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241112-amdgpu-drm_edid-v2-6-1399dc0f0469@weissschuh.net>
Date: Tue, 12 Nov 2024 19:34:15 +0100
From: Thomas Weißschuh <linux@...ssschuh.net>
To: Harry Wentland <harry.wentland@....com>, Leo Li <sunpeng.li@....com>, 
 Rodrigo Siqueira <Rodrigo.Siqueira@....com>, 
 Alex Deucher <alexander.deucher@....com>, 
 Christian König <christian.koenig@....com>, 
 Xinhui Pan <Xinhui.Pan@....com>, David Airlie <airlied@...il.com>, 
 jinzh <jinzh@...hub.amd.com>, Aric Cyr <Aric.Cyr@....com>, 
 Alan Liu <HaoPing.Liu@....com>, Tony Cheng <Tony.Cheng@....com>, 
 Andrey Grodzovsky <Andrey.Grodzovsky@....com>, 
 Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>, 
 Maxime Ripard <mripard@...nel.org>, Thomas Zimmermann <tzimmermann@...e.de>, 
 Simona Vetter <simona@...ll.ch>
Cc: amd-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org, 
 linux-kernel@...r.kernel.org, Harry Wentland <Harry.Wentland@....com>, 
 Melissa Wen <mwen@...lia.com>, 
 Thomas Weißschuh <linux@...ssschuh.net>
Subject: [PATCH v2 6/7] drm/amd/display: Drop opencoded edid panel id
 extraction

Now that a struct drm_edid is available make use of the standard
drm_edid_get_panel_id().

Signed-off-by: Thomas Weißschuh <linux@...ssschuh.net>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 13 +++----------
 1 file changed, 3 insertions(+), 10 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 57b4a58eb9c8bfcb7b76622cf303ba01450e30ba..6f51395bf02cd6fd647de5c1a63822853deb23c9 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
@@ -48,16 +48,9 @@
 #include "ddc_service_types.h"
 #include "clk_mgr.h"
 
-static u32 edid_extract_panel_id(const struct edid *edid)
+static void apply_edid_quirks(const struct drm_edid *edid, struct dc_edid_caps *edid_caps)
 {
-	return (u32)edid->mfg_id[0] << 24   |
-	       (u32)edid->mfg_id[1] << 16   |
-	       (u32)EDID_PRODUCT_ID(edid);
-}
-
-static void apply_edid_quirks(const struct edid *edid, struct dc_edid_caps *edid_caps)
-{
-	uint32_t panel_id = edid_extract_panel_id(edid);
+	u32 panel_id = drm_edid_get_panel_id(edid);
 
 	switch (panel_id) {
 	/* Workaround for some monitors which does not work well with FAMS */
@@ -130,7 +123,7 @@ enum dc_edid_status dm_helpers_parse_edid_caps(
 
 	edid_caps->edid_hdmi = connector->display_info.is_hdmi;
 
-	apply_edid_quirks(edid_buf, edid_caps);
+	apply_edid_quirks(drm_edid, edid_caps);
 
 	sad_count = drm_edid_to_sad(edid_buf, &sads);
 	if (sad_count <= 0)

-- 
2.47.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ