drm: Skip too big EDID extensions
Subsystems (2)
PATCH 1/1 drm: Skip too big EDID extensions
When the number of extension blocks in EDID is too big, it's more likely a broken data, thus better to skip them.
We've got a bug report that a machine spews "invalid block EDID" errors at boot for 400 times which delays the boot very much, and this patch fixes it. Certainly it's a hardware-specific problem, but it's anyway safer to avoid such almost unrealistic setups.
Signed-off-by Takashi Iwai <[email protected]>
--- drivers/gpu/drm/drm_edid.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/gpu/drm/drm_edid.c +7 -0
@@ -321,6 +321,13 @@ drm_do_get_edid(struct drm_connector *connector, struct i2c_adapter *adapter)if (i ==4 ) goto carp; +if (block[0x7e ] >20 ) { +/* too many extensions -- something is wrong */ +DRM_DEBUG_KMS ("drm: %s: ignoring too many extensions %d\n" , + adapter->name, block[0x7e ]); + block[0x7e ] =0 ; + } +/* if there's no extensions, we're done */ if (block[0x7e ] ==0 )return block;
Signature · 1 line
1.7.10.3