Skip to content

Commit

Permalink
drm/radeon/kms: Only add common modes which fit in both panel dimensi…
Browse files Browse the repository at this point in the history
…ons.

Signed-off-by: Michel Dänzer <daenzer@vmware.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
  • Loading branch information
Michel Dänzer authored and Dave Airlie committed Sep 15, 2009
1 parent 70ba2a3 commit fb1fbf8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/gpu/drm/radeon/radeon_connectors.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,10 @@ static void radeon_add_common_modes(struct drm_encoder *encoder, struct drm_conn

for (i = 0; i < 17; i++) {
if (radeon_encoder->devices & (ATOM_DEVICE_LCD_SUPPORT)) {
if (common_modes[i].w >= native_mode->panel_xres &&
common_modes[i].h >= native_mode->panel_yres)
if (common_modes[i].w > native_mode->panel_xres ||
common_modes[i].h > native_mode->panel_yres ||
(common_modes[i].w == native_mode->panel_xres &&
common_modes[i].h == native_mode->panel_yres))
continue;
}
if (common_modes[i].w < 320 || common_modes[i].h < 200)
Expand Down

0 comments on commit fb1fbf8

Please sign in to comment.