]> git.baikalelectronics.ru Git - kernel.git/commit
drm/edid: Don't parse garbage as DispID blocks
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 13 Mar 2020 16:20:51 +0000 (18:20 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 18 Mar 2020 15:52:36 +0000 (17:52 +0200)
commit92eca74cc6c39e300514256c7bbe295dd9a6d154
treead412b42eb8d484b23c2d758f004a16939ae90b4
parentdfc9756de53ded8da4588d44beef0a8813ff36f8
drm/edid: Don't parse garbage as DispID blocks

Currently the code assumes that the entire EDID extesion block
can be taken up by the DispID blocks. That is not true. There
is at least always the DispID checksum, and potentially fill
bytes if the extension block uses the interior fill scheme
to pad out to fill EDID block size.

So let's not parse the checksum or the fill bytes as DispID
blocks by having drm_find_displayid_extension() return the
actual length of the DispID data to the caller.

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