diff mbox

[1/1] (pre-stable) drm/edid: allow certain bogus edids to hit a fixup path rather than fail

Message ID 1270728326-25553-2-git-send-email-apw@canonical.com
State Accepted
Delegated to: Andy Whitcroft
Headers show

Commit Message

Andy Whitcroft April 8, 2010, 12:05 p.m. UTC
From: Ben Skeggs <bskeggs@redhat.com>

commit 44fef22416886a04d432043f741a6faf2c6ffefd upstream.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

BugLink: http://bugs.launchpad.net/bugs/540632
Signed-off-by: Andy Whitcroft <apw@canonical.com>
---
 drivers/gpu/drm/drm_edid.c |    9 ---------
 1 files changed, 0 insertions(+), 9 deletions(-)

Comments

Leann Ogasawara April 8, 2010, 6:10 p.m. UTC | #1
On Thu, 2010-04-08 at 13:05 +0100, Andy Whitcroft wrote:
> From: Ben Skeggs <bskeggs@redhat.com>
> 
> commit 44fef22416886a04d432043f741a6faf2c6ffefd upstream.
> 
> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
> Signed-off-by: Dave Airlie <airlied@redhat.com>
> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
> 
> BugLink: http://bugs.launchpad.net/bugs/540632
> Signed-off-by: Andy Whitcroft <apw@canonical.com>

Looks fine.

Acked-by: Leann Ogasawara <leann.ogasawara@canonical.com>

> ---
>  drivers/gpu/drm/drm_edid.c |    9 ---------
>  1 files changed, 0 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> index ab6c973..99d7eb3 100644
> --- a/drivers/gpu/drm/drm_edid.c
> +++ b/drivers/gpu/drm/drm_edid.c
> @@ -707,15 +707,6 @@ static struct drm_display_mode *drm_mode_detailed(struct drm_device *dev,
>  	mode->vsync_end = mode->vsync_start + vsync_pulse_width;
>  	mode->vtotal = mode->vdisplay + vblank;
>  
> -	/* perform the basic check for the detailed timing */
> -	if (mode->hsync_end > mode->htotal ||
> -		mode->vsync_end > mode->vtotal) {
> -		drm_mode_destroy(dev, mode);
> -		DRM_DEBUG_KMS("Incorrect detailed timing. "
> -				"Sync is beyond the blank.\n");
> -		return NULL;
> -	}
> -
>  	/* Some EDIDs have bogus h/vtotal values */
>  	if (mode->hsync_end > mode->htotal)
>  		mode->htotal = mode->hsync_end + 1;
> -- 
> 1.7.0
> 
>
Colin Ian King April 8, 2010, 6:30 p.m. UTC | #2
On Thu, 2010-04-08 at 13:05 +0100, Andy Whitcroft wrote:
> From: Ben Skeggs <bskeggs@redhat.com>
> 
> commit 44fef22416886a04d432043f741a6faf2c6ffefd upstream.
> 
> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
> Signed-off-by: Dave Airlie <airlied@redhat.com>
> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

Well, this relaxes the checks which seems to cater for these bogus EDIDs
which looks sane to me.

Acked-by: Colin King <colin.king@canonical.com>

> 
> BugLink: http://bugs.launchpad.net/bugs/540632
> Signed-off-by: Andy Whitcroft <apw@canonical.com>
> ---
>  drivers/gpu/drm/drm_edid.c |    9 ---------
>  1 files changed, 0 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> index ab6c973..99d7eb3 100644
> --- a/drivers/gpu/drm/drm_edid.c
> +++ b/drivers/gpu/drm/drm_edid.c
> @@ -707,15 +707,6 @@ static struct drm_display_mode *drm_mode_detailed(struct drm_device *dev,
>  	mode->vsync_end = mode->vsync_start + vsync_pulse_width;
>  	mode->vtotal = mode->vdisplay + vblank;
>  
> -	/* perform the basic check for the detailed timing */
> -	if (mode->hsync_end > mode->htotal ||
> -		mode->vsync_end > mode->vtotal) {
> -		drm_mode_destroy(dev, mode);
> -		DRM_DEBUG_KMS("Incorrect detailed timing. "
> -				"Sync is beyond the blank.\n");
> -		return NULL;
> -	}
> -
>  	/* Some EDIDs have bogus h/vtotal values */
>  	if (mode->hsync_end > mode->htotal)
>  		mode->htotal = mode->hsync_end + 1;
> -- 
> 1.7.0
> 
>
diff mbox

Patch

diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index ab6c973..99d7eb3 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -707,15 +707,6 @@  static struct drm_display_mode *drm_mode_detailed(struct drm_device *dev,
 	mode->vsync_end = mode->vsync_start + vsync_pulse_width;
 	mode->vtotal = mode->vdisplay + vblank;
 
-	/* perform the basic check for the detailed timing */
-	if (mode->hsync_end > mode->htotal ||
-		mode->vsync_end > mode->vtotal) {
-		drm_mode_destroy(dev, mode);
-		DRM_DEBUG_KMS("Incorrect detailed timing. "
-				"Sync is beyond the blank.\n");
-		return NULL;
-	}
-
 	/* Some EDIDs have bogus h/vtotal values */
 	if (mode->hsync_end > mode->htotal)
 		mode->htotal = mode->hsync_end + 1;