[SRU][O][PATCH 6/6] drm/amd/display: Fix ACPI edid parsing on some Lenovo systems
Aaron Ma
aaron.ma at canonical.com
Fri May 23 06:25:23 UTC 2025
From: Mario Limonciello <mario.limonciello at amd.com>
BugLink: https://bugs.launchpad.net/bugs/2111545
[Why]
The ACPI EDID in the BIOS of a Lenovo laptop includes 3 blocks, but
dm_helpers_probe_acpi_edid() has a start that is 'char'. The 3rd
block index starts after 255, so it can't be indexed properly.
This leads to problems with the display when the EDID is parsed.
[How]
Change the variable type to 'short' so that larger values can be indexed.
Cc: Renjith Pananchikkal <renjith.pananchikkal at amd.com>
Reported-by: Mark Pearson <mpearson at lenovo.com>
Suggested-by: David Ober <dober at lenovo.com>
Fixes: c6a837088bed ("drm/amd/display: Fetch the EDID from _DDC if available for eDP")
Reviewed-by: Alex Hung <alex.hung at amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello at amd.com>
Signed-off-by: Zaeem Mohamed <zaeem.mohamed at amd.com>
Tested-by: Mark Broadworth <mark.broadworth at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
(cherry picked from commit a918bb4a90d423ced2976a794f2724c362c1f063)
Cc: stable at vger.kernel.org
(cherry picked from commit 870bea21fdf88f45c94c0a3dbb0e3cc1b219680f)
Signed-off-by: Aaron Ma <aaron.ma at canonical.com>
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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 ea42bfacdb58c..d5b15fbd16c28 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
@@ -899,7 +899,7 @@ dm_helpers_probe_acpi_edid(void *data, u8 *buf, unsigned int block, size_t len)
{
struct drm_connector *connector = data;
struct acpi_device *acpidev = ACPI_COMPANION(connector->dev->dev);
- unsigned char start = block * EDID_LENGTH;
+ unsigned short start = block * EDID_LENGTH;
struct edid *edid;
int r;
--
2.43.0
More information about the kernel-team
mailing list