summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/mgag200
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-06-20 13:54:22 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2015-06-20 13:54:22 -0700
commit8f4ce072bf4b65f47dada7e74e3d95cc900866b2 (patch)
tree659b85807ce31797d71f066c96bc9679aacdb832 /drivers/gpu/drm/mgag200
parentbb16140a2cab5415ffcbb23594da9e495df1bab7 (diff)
parentfcee3c73a2c51982057b93fe599b7c68e16d0636 (diff)
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Pull drm fixes from Dave Airlie: "A smattering of fixes, mgag200: don't accept modes that aren't aligned properly as hw can't do it i915: two regression fixes radeon: one query to allow userspace fixes one oops fixer for older hw with new options enabled" * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: drm/radeon: don't probe MST on hw we don't support it on drm/radeon: Add RADEON_INFO_VA_UNMAP_WORKING query drm/mgag200: Reject non-character-cell-aligned mode widths Revert "drm/i915: Don't skip request retirement if the active list is empty" drm/i915: Always reset vma->ggtt_view.pages cache on unbinding
Diffstat (limited to 'drivers/gpu/drm/mgag200')
-rw-r--r--drivers/gpu/drm/mgag200/mgag200_mode.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/mgag200/mgag200_mode.c b/drivers/gpu/drm/mgag200/mgag200_mode.c
index 6e84df9369a6..ad4b9010dfb0 100644
--- a/drivers/gpu/drm/mgag200/mgag200_mode.c
+++ b/drivers/gpu/drm/mgag200/mgag200_mode.c
@@ -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 ||