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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241027075108.14273-4-vamsikrishna.brahmajosyula@gmail.com>
Date: Sun, 27 Oct 2024 13:21:06 +0530
From: Vamsi Krishna Brahmajosyula <vamsikrishna.brahmajosyula@...il.com>
To: maarten.lankhorst@...ux.intel.com,
	mripard@...nel.org,
	tzimmermann@...e.de,
	airlied@...il.com,
	simona@...ll.ch,
	jani.nikula@...ux.intel.com
Cc: skhan@...uxfoundation.org,
	dri-devel@...ts.freedesktop.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH 3/5] drm/edid: convert drm_parse_microsoft_vsdb to use struct cea_db *

Address the following
	FIXME: convert parsers to use struct cea_db
in the parser drm_parse_microsoft_vsdb

cea_db contains len and then data. Appropriately change the indices
when referring to individual elements (db[n] becomes data[n-1]).

Signed-off-by: Vamsi Krishna Brahmajosyula <vamsikrishna.brahmajosyula@...il.com>
---
 drivers/gpu/drm/drm_edid.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index f79d8fbdb62b..e2ef07d00aaf 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -6361,11 +6361,12 @@ drm_parse_hdmi_vsdb_video(struct drm_connector *connector, const struct cea_db *
  * https://docs.microsoft.com/en-us/windows-hardware/drivers/display/specialized-monitors-edid-extension
  */
 static void drm_parse_microsoft_vsdb(struct drm_connector *connector,
-				     const u8 *db)
+				     const struct cea_db *db)
 {
 	struct drm_display_info *info = &connector->display_info;
-	u8 version = db[4];
-	bool desktop_usage = db[5] & BIT(6);
+	const u8 *data = cea_db_data(db);
+	u8 version = data[3];
+	bool desktop_usage = data[4] & BIT(6);
 
 	/* Version 1 and 2 for HMDs, version 3 flags desktop usage explicitly */
 	if (version == 1 || version == 2 || (version == 3 && !desktop_usage))
@@ -6373,7 +6374,7 @@ static void drm_parse_microsoft_vsdb(struct drm_connector *connector,
 
 	drm_dbg_kms(connector->dev,
 		    "[CONNECTOR:%d:%s] HMD or specialized display VSDB version %u: 0x%02x\n",
-		    connector->base.id, connector->name, version, db[5]);
+		    connector->base.id, connector->name, version, data[4]);
 }
 
 static void drm_parse_cea_ext(struct drm_connector *connector,
@@ -6423,7 +6424,7 @@ static void drm_parse_cea_ext(struct drm_connector *connector,
 			 cea_db_is_hdmi_forum_scdb(db))
 			drm_parse_hdmi_forum_scds(connector, db);
 		else if (cea_db_is_microsoft_vsdb(db))
-			drm_parse_microsoft_vsdb(connector, data);
+			drm_parse_microsoft_vsdb(connector, db);
 		else if (cea_db_is_y420cmdb(db))
 			parse_cta_y420cmdb(connector, db, &y420cmdb_map);
 		else if (cea_db_is_y420vdb(db))
-- 
2.47.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ