diff options
author | Dave Airlie <airlied@redhat.com> | 2017-06-27 07:24:49 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2017-06-27 08:28:30 +1000 |
commit | 6d61e70ccc21606ffb8a0a03bd3aba24f659502b (patch) | |
tree | 69f5bfb29d085cc42839445d34170bd3ee4f7408 /drivers/gpu/drm/radeon/si.c | |
parent | 338ffbf7cb5eee0ed4600650d03cd2d7cd1cac9d (diff) | |
parent | c0bc126f97fb929b3ae02c1c62322645d70eb408 (diff) |
Backmerge tag 'v4.12-rc7' into drm-next
Linux 4.12-rc7
Needed at least rc6 for drm-misc-next-fixes, may as well go to rc7
Diffstat (limited to 'drivers/gpu/drm/radeon/si.c')
-rw-r--r-- | drivers/gpu/drm/radeon/si.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/radeon/si.c b/drivers/gpu/drm/radeon/si.c index c88a80e1e3ad..1907c950d76f 100644 --- a/drivers/gpu/drm/radeon/si.c +++ b/drivers/gpu/drm/radeon/si.c @@ -2308,8 +2308,11 @@ static void dce6_program_watermarks(struct radeon_device *rdev, fixed20_12 a, b, c; if (radeon_crtc->base.enabled && num_heads && mode) { - active_time = 1000000UL * (u32)mode->crtc_hdisplay / (u32)mode->clock; - line_time = min((u32) (1000000UL * (u32)mode->crtc_htotal / (u32)mode->clock), (u32)65535); + active_time = (u32) div_u64((u64)mode->crtc_hdisplay * 1000000, + (u32)mode->clock); + line_time = (u32) div_u64((u64)mode->crtc_htotal * 1000000, + (u32)mode->clock); + line_time = min(line_time, (u32)65535); priority_a_cnt = 0; priority_b_cnt = 0; |