mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-03 20:34:58 +08:00
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: abbee62387
("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
This commit is contained in:
parent
b46310eecd
commit
9eb8d7a93c
@ -1620,8 +1620,8 @@ static int mga_vga_mode_valid(struct drm_connector *connector,
|
|||||||
return MODE_VIRTUAL_X;
|
return MODE_VIRTUAL_X;
|
||||||
if (mode->vdisplay > 1024)
|
if (mode->vdisplay > 1024)
|
||||||
return MODE_VIRTUAL_Y;
|
return MODE_VIRTUAL_Y;
|
||||||
if (mga_vga_calculate_mode_bandwidth(mode,
|
if (mga_vga_calculate_mode_bandwidth(mode, bpp) >
|
||||||
bpp > (31877 * 1024)))
|
(31877 * 1024))
|
||||||
return MODE_BANDWIDTH;
|
return MODE_BANDWIDTH;
|
||||||
} else if (mdev->type == G200_EV &&
|
} else if (mdev->type == G200_EV &&
|
||||||
(mga_vga_calculate_mode_bandwidth(mode, bpp)
|
(mga_vga_calculate_mode_bandwidth(mode, bpp)
|
||||||
|
Loading…
Reference in New Issue
Block a user