Merge "disp: msm: sde: Use platform independent API for 64-bit div"

This commit is contained in:
qctecmdr
2019-11-02 06:58:12 -07:00
committed by Gerrit - the friendly Code Review server
2 changed files with 8 additions and 4 deletions

View File

@@ -5726,8 +5726,9 @@ void sde_encoder_helper_get_jitter_bounds_ns(struct drm_encoder *drm_enc,
info = &sde_enc->mode_info;
frametime_ns = (1 * 1000000000) / info->frame_rate;
jitter_ns = (info->jitter_numer * frametime_ns) /
(info->jitter_denom * 100);
jitter_ns = info->jitter_numer * frametime_ns;
do_div(jitter_ns, info->jitter_denom * 100);
*l_bound = frametime_ns - jitter_ns;
*u_bound = frametime_ns + jitter_ns;
}

View File

@@ -1422,9 +1422,12 @@ static bool _sde_encoder_phys_cmd_needs_vsync_change(
"time_diff:%llu, prev:%llu, cur:%llu, jitter:%llu/%llu\n",
time_diff, prev->timestamp, cur->timestamp,
l_bound, u_bound);
time_diff = div_s64(time_diff, 1000);
SDE_EVT32(DRMID(phys_enc->parent),
(u32) (l_bound / 1000), (u32) (u_bound / 1000),
(u32) (time_diff / 1000), SDE_EVTLOG_ERROR);
(u32) (do_div(l_bound, 1000)),
(u32) (do_div(u_bound, 1000)),
(u32) (time_diff), SDE_EVTLOG_ERROR);
}
return ret;