|
@@ -1207,8 +1207,11 @@ static void dce_v10_0_program_watermarks(struct amdgpu_device *adev,
|
|
u32 tmp, wm_mask, lb_vblank_lead_lines = 0;
|
|
u32 tmp, wm_mask, lb_vblank_lead_lines = 0;
|
|
|
|
|
|
if (amdgpu_crtc->base.enabled && num_heads && mode) {
|
|
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 */
|
|
/* watermark for high clocks */
|
|
if (adev->pm.dpm_enabled) {
|
|
if (adev->pm.dpm_enabled) {
|