* [PATCH] drm/mgag200: fix a test in mga_vga_mode_valid()
@ 2018-01-25 14:26 Dan Carpenter
2018-01-30 9:57 ` Daniel Vetter
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2018-01-25 14:26 UTC (permalink / raw)
To: Dave Airlie, Julia Lemire
Cc: David Airlie, Daniel Vetter, Sinclair Yeh, Patrik Jakobsson,
Peter Rosin, Keith Packard, Mathieu Larouche, dri-devel,
kernel-janitors
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>
---
Static analysis. Not tested.
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)
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/mgag200: fix a test in mga_vga_mode_valid()
2018-01-25 14:26 [PATCH] drm/mgag200: fix a test in mga_vga_mode_valid() Dan Carpenter
@ 2018-01-30 9:57 ` Daniel Vetter
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Vetter @ 2018-01-30 9:57 UTC (permalink / raw)
To: Dan Carpenter
Cc: Dave Airlie, Julia Lemire, David Airlie, Daniel Vetter,
Sinclair Yeh, Patrik Jakobsson, Peter Rosin, Keith Packard,
Mathieu Larouche, dri-devel, kernel-janitors
On Thu, Jan 25, 2018 at 05:26:55PM +0300, Dan Carpenter wrote:
> 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>
> ---
> Static analysis. Not tested.
Looks reasonable. Thanks for the patch, applied.
-Daniel
>
> 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)
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-01-30 9:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-25 14:26 [PATCH] drm/mgag200: fix a test in mga_vga_mode_valid() Dan Carpenter
2018-01-30 9:57 ` Daniel Vetter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).