]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/edid: Don't include ext block csum in DispID size
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 13 Mar 2020 16:20:52 +0000 (18:20 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 18 Mar 2020 15:52:36 +0000 (17:52 +0200)
The EDID extension block checksum byte is not part of the
actual DispID data, so don't use it in validate_displayid().

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200313162054.16009-8-ville.syrjala@linux.intel.com
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/drm_edid.c

index 35d46f5ffb604d4c2de20bc1431daa466822ba54..d86062d53a67d7fb8a0f81b31bdbc9972d7f14a4 100644 (file)
@@ -3222,7 +3222,8 @@ static u8 *drm_find_displayid_extension(const struct edid *edid,
        if (!displayid)
                return NULL;
 
-       *length = EDID_LENGTH;
+       /* EDID extensions block checksum isn't for us */
+       *length = EDID_LENGTH - 1;
        *idx = 1;
 
        ret = validate_displayid(displayid, *length, *idx);