diff options
author | Dave Airlie <airlied@redhat.com> | 2017-06-16 10:00:11 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2017-06-16 10:00:11 +1000 |
commit | 1b22f6d72ab45e0a1912bc7af2efd43e70a5ab59 (patch) | |
tree | 42a070f1c8294f8714e1e7b817569b88c95da66e /drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | |
parent | 32c1431eea4881a6b17bd7c639315010aeefa452 (diff) | |
parent | 55f61a040e1b1ea0ba962e53ae341b4c51915bd1 (diff) | |
download | talos-op-linux-1b22f6d72ab45e0a1912bc7af2efd43e70a5ab59.tar.gz talos-op-linux-1b22f6d72ab45e0a1912bc7af2efd43e70a5ab59.zip |
Merge branch 'drm-fixes-4.12' of git://people.freedesktop.org/~agd5f/linux into drm-fixes
A few fixes for 4.12:
- fix a UVD regression on SI
- fix overflow in watermark calcs on large modes
* 'drm-fixes-4.12' of git://people.freedesktop.org/~agd5f/linux:
drm/radeon: Fix overflow of watermark calcs at > 4k resolutions.
drm/amdgpu: Fix overflow of watermark calcs at > 4k resolutions.
drm/radeon: fix "force the UVD DPB into VRAM as well"
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/dce_v11_0.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c index 773654a19749..47bbc87f96d2 100644 --- a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c +++ b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c @@ -1176,8 +1176,11 @@ static void dce_v11_0_program_watermarks(struct amdgpu_device *adev, u32 tmp, wm_mask, lb_vblank_lead_lines = 0; 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); /* watermark for high clocks */ if (adev->pm.dpm_enabled) { |