Skip to content

Commit

Permalink
drm/mgag200: Reject non-character-cell-aligned mode widths
Browse files Browse the repository at this point in the history
Turns out 1366x768 does not in fact work on this hardware.

Signed-off-by: Adam Jackson <[email protected]>
Cc: [email protected]
Signed-off-by: Dave Airlie <[email protected]>
  • Loading branch information
nwnk authored and airlied committed Jun 16, 2015
1 parent 0f57d86 commit 2516108
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/gpu/drm/mgag200/mgag200_mode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1526,6 +1526,11 @@ static int mga_vga_mode_valid(struct drm_connector *connector,
return MODE_BANDWIDTH;
}

if ((mode->hdisplay % 8) != 0 || (mode->hsync_start % 8) != 0 ||
(mode->hsync_end % 8) != 0 || (mode->htotal % 8) != 0) {
return MODE_H_ILLEGAL;
}

if (mode->crtc_hdisplay > 2048 || mode->crtc_hsync_start > 4096 ||
mode->crtc_hsync_end > 4096 || mode->crtc_htotal > 4096 ||
mode->crtc_vdisplay > 2048 || mode->crtc_vsync_start > 4096 ||
Expand Down

0 comments on commit 2516108

Please sign in to comment.