summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2018-01-25 17:26:55 +0300
committerDaniel Vetter <daniel.vetter@ffwll.ch>2018-01-30 18:05:25 +0100
commit9eb8d7a93c81fdff68189979caff22a058891d15 (patch)
tree1b0a70ab540b44b5eda515a92b9eec789e5450f8 /drivers
parentb46310eecd9e23ec140ee2e1004f9335e776da82 (diff)
downloadlinux-9eb8d7a93c81fdff68189979caff22a058891d15.tar.bz2
drm/mgag200: fix a test in mga_vga_mode_valid()
The parentheses are in the wrong place here so we pass the bits per pixel as zero. Fixes: abbee6238775 ("drm/mgag200: Added resolution and bandwidth limits for various G200e products.") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20180125142655.GA23885@mwanda
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/mgag200/mgag200_mode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/mgag200/mgag200_mode.c b/drivers/gpu/drm/mgag200/mgag200_mode.c
index 68e5d9c94475..fb50a9ddaae8 100644
--- a/drivers/gpu/drm/mgag200/mgag200_mode.c
+++ b/drivers/gpu/drm/mgag200/mgag200_mode.c
@@ -1620,8 +1620,8 @@ static int mga_vga_mode_valid(struct drm_connector *connector,
return MODE_VIRTUAL_X;
if (mode->vdisplay > 1024)
return MODE_VIRTUAL_Y;
- if (mga_vga_calculate_mode_bandwidth(mode,
- bpp > (31877 * 1024)))
+ if (mga_vga_calculate_mode_bandwidth(mode, bpp) >
+ (31877 * 1024))
return MODE_BANDWIDTH;
} else if (mdev->type == G200_EV &&
(mga_vga_calculate_mode_bandwidth(mode, bpp)