[DRM] Fix a regression caused by a typo
diff mbox

Message ID 1435863439-28660-1-git-send-email-szeng@atronixengineering.com
State New
Headers show

Commit Message

Shixin Zeng July 2, 2015, 6:57 p.m. UTC
From: Shixin Zeng <zeng.shixin@gmail.com>

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)

Signed-off-by: Shixin Zeng <zeng.shixin@gmail.com>
---
 drivers/gpu/drm/drm_crtc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Daniel Vetter July 3, 2015, 6:44 a.m. UTC | #1
On Thu, Jul 02, 2015 at 02:57:19PM -0400, Shixin Zeng wrote:
> From: Shixin Zeng <zeng.shixin@gmail.com>
> 
> 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

> 
> Signed-off-by: Shixin Zeng <zeng.shixin@gmail.com>
> ---
>  drivers/gpu/drm/drm_crtc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
> index b69ed97..b9ba061 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,
> -- 
> 2.4.5
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
Daniel Vetter July 3, 2015, 6:45 a.m. UTC | #2
On Fri, Jul 03, 2015 at 08:44:41AM +0200, Daniel Vetter wrote:
> On Thu, Jul 02, 2015 at 02:57:19PM -0400, Shixin Zeng wrote:
> > From: Shixin Zeng <zeng.shixin@gmail.com>
> > 
> > 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
Daniel Stone July 3, 2015, 7:23 a.m. UTC | #3
Hi,

> On 2 Jul 2015, at 7:57 pm, Shixin Zeng <zeng.shixin@gmail.com> wrote:
> 
> From: Shixin Zeng <zeng.shixin@gmail.com>
> 
> 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)
> 
> Signed-off-by: Shixin Zeng <zeng.shixin@gmail.com>

Good catch, thanks!

Reviewed-by: Daniel Stone <daniels@collabora.com>

> drivers/gpu/drm/drm_crtc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
> index b69ed97..b9ba061 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,
> -- 
> 2.4.5
>

Patch
diff mbox

diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index b69ed97..b9ba061 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,