Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 166520
b: refs/heads/master
c: f066a17
h: refs/heads/master
v: v3
  • Loading branch information
Adam Jackson authored and Dave Airlie committed Sep 23, 2009
1 parent 83b6dea commit d62cc68
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 93dc6c2b0d97a55508144073838e041140b206cd
refs/heads/master: f066a17d9f8d0a20d01d1aa9badce7f43c7bd6ad
17 changes: 12 additions & 5 deletions trunk/drivers/gpu/drm/drm_edid.c
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,7 @@ bad_std_timing(u8 a, u8 b)
*/
struct drm_display_mode *drm_mode_std(struct drm_device *dev,
struct std_timing *t,
int revision,
int timing_level)
{
struct drm_display_mode *mode;
Expand All @@ -546,9 +547,12 @@ struct drm_display_mode *drm_mode_std(struct drm_device *dev,
/* vrefresh_rate = vfreq + 60 */
vrefresh_rate = vfreq + 60;
/* the vdisplay is calculated based on the aspect ratio */
if (aspect_ratio == 0)
vsize = (hsize * 10) / 16;
else if (aspect_ratio == 1)
if (aspect_ratio == 0) {
if (revision < 3)
vsize = hsize;
else
vsize = (hsize * 10) / 16;
} else if (aspect_ratio == 1)
vsize = (hsize * 3) / 4;
else if (aspect_ratio == 2)
vsize = (hsize * 4) / 5;
Expand Down Expand Up @@ -797,7 +801,7 @@ static int add_standard_modes(struct drm_connector *connector, struct edid *edid
continue;

newmode = drm_mode_std(dev, &edid->standard_timings[i],
timing_level);
edid->revision, timing_level);
if (newmode) {
drm_mode_probed_add(connector, newmode);
modes++;
Expand Down Expand Up @@ -853,6 +857,7 @@ static int add_detailed_info(struct drm_connector *connector,

std = &data->data.timings[j];
newmode = drm_mode_std(dev, std,
edid->revision,
timing_level);
if (newmode) {
drm_mode_probed_add(connector, newmode);
Expand Down Expand Up @@ -981,7 +986,9 @@ static int add_detailed_info_eedid(struct drm_connector *connector,
struct drm_display_mode *newmode;

std = &data->data.timings[j];
newmode = drm_mode_std(dev, std, timing_level);
newmode = drm_mode_std(dev, std,
edid->revision,
timing_level);
if (newmode) {
drm_mode_probed_add(connector, newmode);
modes++;
Expand Down

0 comments on commit d62cc68

Please sign in to comment.