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/amd/amdgpu/dce_v6_0.c | |
| parent | Merge tag 'hdlcd-for-v4.13-v3' of git://linux-arm.org/linux-ld into drm-next (diff) | |
| parent | Linux 4.12-rc7 (diff) | |
| download | linux-6d61e70ccc21606ffb8a0a03bd3aba24f659502b.tar.gz linux-6d61e70ccc21606ffb8a0a03bd3aba24f659502b.zip | |
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/amd/amdgpu/dce_v6_0.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c index 786b5d02f44e..fd134a4629d7 100644 --- a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c +++ b/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c @@ -991,8 +991,11 @@ static void dce_v6_0_program_watermarks(struct amdgpu_device *adev, fixed20_12 a, b, c; if (amdgpu_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; |
