From: Shixin Zeng Date: Fri, 3 Jul 2015 06:46:50 +0000 (+0200) Subject: drm/crtc: Fix edid length computation X-Git-Tag: MMI-PSA29.97-13-9~9777^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e24ff467e12e1560de753313976c46e84fa6306a;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git drm/crtc: Fix edid length computation The length of each EDID block is EDID_LENGTH, and number of blocks is (1 + edid->extensions) - we need to multiply not add them. This causes wrong EDID to be passed on, and is a regression introduced by d2ed34362a52 (drm: Introduce helper for replacing blob properties) Signed-off-by: Shixin Zeng Cc: Daniel Stone Cc: Maarten Lankhorst Reviewed-by: Daniel Stone [danvet: Add Cc: and fix commit summary.] Signed-off-by: Daniel Vetter --- diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index b69ed97d447c..b9ba06176eb1 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -4732,7 +4732,7 @@ int drm_mode_connector_update_edid_property(struct drm_connector *connector, return 0; if (edid) - size = EDID_LENGTH + (1 + edid->extensions); + size = EDID_LENGTH * (1 + edid->extensions); ret = drm_property_replace_global_blob(dev, &connector->edid_blob_ptr,