diff options
author | Adam Jackson <ajax@redhat.com> | 2010-01-04 17:53:06 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-01-06 22:17:48 -0500 |
commit | 69da301589b579f9619475e30cc449df9193410c (patch) | |
tree | f2a63491fd039411d019cd3b5a4a11452ad3f53b | |
parent | e6be8d9d17bd44061116f601fe2609b3ace7aa69 (diff) |
drm/edid: Skip empty CVT codepoints
Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r-- | drivers/gpu/drm/drm_edid.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index 5c9f79877cbf..7d6ac22f5b2d 100644 --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c | |||
@@ -911,11 +911,15 @@ static int drm_cvt_modes(struct drm_connector *connector, | |||
911 | struct drm_device *dev = connector->dev; | 911 | struct drm_device *dev = connector->dev; |
912 | struct cvt_timing *cvt; | 912 | struct cvt_timing *cvt; |
913 | const int rates[] = { 60, 85, 75, 60, 50 }; | 913 | const int rates[] = { 60, 85, 75, 60, 50 }; |
914 | const u8 empty[3] = { 0, 0, 0 }; | ||
914 | 915 | ||
915 | for (i = 0; i < 4; i++) { | 916 | for (i = 0; i < 4; i++) { |
916 | int uninitialized_var(width), height; | 917 | int uninitialized_var(width), height; |
917 | cvt = &(timing->data.other_data.data.cvt[i]); | 918 | cvt = &(timing->data.other_data.data.cvt[i]); |
918 | 919 | ||
920 | if (!memcmp(cvt->code, empty, 3)) | ||
921 | continue; | ||
922 | |||
919 | height = (cvt->code[0] + ((cvt->code[1] & 0xf0) << 8) + 1) * 2; | 923 | height = (cvt->code[0] + ((cvt->code[1] & 0xf0) << 8) + 1) * 2; |
920 | switch (cvt->code[1] & 0xc0) { | 924 | switch (cvt->code[1] & 0xc0) { |
921 | case 0x00: | 925 | case 0x00: |