diff options
author | Maxime Ripard <maxime.ripard@bootlin.com> | 2019-02-26 15:25:48 +0100 |
---|---|---|
committer | Maxime Ripard <maxime.ripard@bootlin.com> | 2019-03-07 14:46:44 +0100 |
commit | 9f7dfd0cb50f93662b182c05e59987ba9db9505e (patch) | |
tree | 0f58497e4476f7e38bec615271290a2d18d5644f /drivers/gpu/drm | |
parent | 19d0ffe0ed79e2e801d0a07f3096f22436f76e4a (diff) | |
download | linux-stable-9f7dfd0cb50f93662b182c05e59987ba9db9505e.tar.gz linux-stable-9f7dfd0cb50f93662b182c05e59987ba9db9505e.tar.bz2 linux-stable-9f7dfd0cb50f93662b182c05e59987ba9db9505e.zip |
drm/sun4i: Move rate variables to long long
Our clock rate variables are getting pretty close to the LONG_MAX / ULONG_MAX
limit, especially since we will start doing arithmetic on it. Move those
types to unsigned long long to be sure we don't overflow their type.
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Tested-by: Vasily Khoruzhick <anarsoul@gmail.com> # tested on pinebook
Reviewed-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/022c3b850413edd6afbca20062f100971de2f5af.1551191081.git-series.maxime.ripard@bootlin.com
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/sun4i/sun4i_rgb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/sun4i/sun4i_rgb.c b/drivers/gpu/drm/sun4i/sun4i_rgb.c index fb32cce7ece2..8df2c17f8427 100644 --- a/drivers/gpu/drm/sun4i/sun4i_rgb.c +++ b/drivers/gpu/drm/sun4i/sun4i_rgb.c @@ -60,8 +60,8 @@ static enum drm_mode_status sun4i_rgb_mode_valid(struct drm_encoder *crtc, struct sun4i_tcon *tcon = rgb->tcon; u32 hsync = mode->hsync_end - mode->hsync_start; u32 vsync = mode->vsync_end - mode->vsync_start; - unsigned long rate = mode->clock * 1000; - long rounded_rate; + unsigned long long rate = mode->clock * 1000; + unsigned long long rounded_rate; DRM_DEBUG_DRIVER("Validating modes...\n"); |