Skip to contentSkip to conversation

Fix a regression caused by a typo

DRM Shixin Zeng 3 participants 4 messages Jul 2, 2015 – Jul 3, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

From: Shixin Zeng <[email protected]>

The length of each EDID block is EDID_LENGTH, and number of blocks is (1
+ edid->extensions)

This causes wrong EDID to be passed on, and is a regression introduced by d2ed34362a52 (drm: Introduce helper for replacing blob properties)

---
 drivers/gpu/drm/drm_crtc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/drm_crtc.c +1 -1
index b69ed97..b9ba061 100644
@@ -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,
Signature · 6 lines
2.4.5

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw
Quoted 7 lines · Shixin Zeng

From: Shixin Zeng <[email protected]>

The length of each EDID block is EDID_LENGTH, and number of blocks is (1
+ edid->extensions)

This causes wrong EDID to be passed on, and is a regression introduced by d2ed34362a52 (drm: Introduce helper for replacing blob properties)

When fixing a regression, please cc the people who wrote/reviewed the offending patch. Added them and merged the patch to topic/drm-fixes.

Thanks, Daniel

Quoted 26 lines
---
 drivers/gpu/drm/drm_crtc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/drm_crtc.c +1 -1
index b69ed97..b9ba061 100644
@@ -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,
Signature · 6 lines
2.4.5

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#2 lore raw
Quoted 11 lines · Daniel Vetter
Quoted 7 lines · Shixin Zeng

From: Shixin Zeng <[email protected]>

The length of each EDID block is EDID_LENGTH, and number of blocks is (1
+ edid->extensions)

This causes wrong EDID to be passed on, and is a regression introduced by d2ed34362a52 (drm: Introduce helper for replacing blob properties)

When fixing a regression, please cc the people who wrote/reviewed the offending patch. Added them and merged the patch to topic/drm-fixes.

Ok this time cc'ed for real.
-Daniel

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Reviewed-by
#3 lore raw
In reply to Shixin Zeng

Hi,

Quoted 11 lines · Shixin Zeng

From: Shixin Zeng <[email protected]>

The length of each EDID block is EDID_LENGTH, and number of blocks is (1
+ edid->extensions)

This causes wrong EDID to be passed on, and is a regression introduced by d2ed34362a52 (drm: Introduce helper for replacing blob properties)

Good catch, thanks!

Quoted 19 lines

drivers/gpu/drm/drm_crtc.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/drm_crtc.c +1 -1
index b69ed97..b9ba061 100644
@@ -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,
Signature · 1 line
2.4.5

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel