]> 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)
commit8e88c75245a3f84e3503bff2fa39a9178e8efb5f
treead412b42eb8d484b23c2d758f004a16939ae90b4
parentea0aa608a8e89f112761d6f91733f27513d2b657
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