diff options
author | Adam Jackson <ajax@redhat.com> | 2010-01-04 17:53:07 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-01-06 22:18:04 -0500 |
commit | 8e10ee9a0da12c586d3397150e34a946507c23f3 (patch) | |
tree | ef3ef465e5f09311e1232a5e2276706319ded296 /drivers/gpu/drm/drm_edid.c | |
parent | 69da301589b579f9619475e30cc449df9193410c (diff) |
drm/edid: Fix CVT width/height decode
Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/drm_edid.c')
-rw-r--r-- | drivers/gpu/drm/drm_edid.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index 7d6ac22f5b2d..defcaf108460 100644 --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c | |||
@@ -920,18 +920,18 @@ static int drm_cvt_modes(struct drm_connector *connector, | |||
920 | if (!memcmp(cvt->code, empty, 3)) | 920 | if (!memcmp(cvt->code, empty, 3)) |
921 | continue; | 921 | continue; |
922 | 922 | ||
923 | height = (cvt->code[0] + ((cvt->code[1] & 0xf0) << 8) + 1) * 2; | 923 | height = (cvt->code[0] + ((cvt->code[1] & 0xf0) << 4) + 1) * 2; |
924 | switch (cvt->code[1] & 0xc0) { | 924 | switch (cvt->code[1] & 0x0c) { |
925 | case 0x00: | 925 | case 0x00: |
926 | width = height * 4 / 3; | 926 | width = height * 4 / 3; |
927 | break; | 927 | break; |
928 | case 0x40: | 928 | case 0x04: |
929 | width = height * 16 / 9; | 929 | width = height * 16 / 9; |
930 | break; | 930 | break; |
931 | case 0x80: | 931 | case 0x08: |
932 | width = height * 16 / 10; | 932 | width = height * 16 / 10; |
933 | break; | 933 | break; |
934 | case 0xc0: | 934 | case 0x0c: |
935 | width = height * 15 / 9; | 935 | width = height * 15 / 9; |
936 | break; | 936 | break; |
937 | } | 937 | } |