Skip to content

Commit

Permalink
drm/crtc: Fix edid length computation
Browse files Browse the repository at this point in the history
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 d2ed343 (drm: Introduce helper for replacing blob properties)

Signed-off-by: Shixin Zeng <zeng.shixin@gmail.com>
Cc: Daniel Stone <daniels@collabora.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
[danvet: Add Cc: and fix commit summary.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
  • Loading branch information
Shixin Zeng authored and Daniel Vetter committed Jul 3, 2015
1 parent 8b72ce1 commit e24ff46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/drm_crtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit e24ff46

Please sign in to comment.