]> 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)
commit69ece0cecd1429a86fee0cdc3b7e5536994c0a17
treead412b42eb8d484b23c2d758f004a16939ae90b4
parent27771b2bf838a947369e4f10691e2080fd2a92ed
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