diff options
author | Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> | 2018-12-19 08:35:51 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-12-20 12:12:41 -0500 |
commit | 9136e81e986a7a44bd360a2d2abf19de886feaa8 (patch) | |
tree | 363be09ef6b7a73114829228c088c80cf797e734 | |
parent | 2bf55d2e6b71c8d79a7960d4f88bebc03f0e9a00 (diff) |
drm/amd/display: Use div_u64 for flip timestamp ns to ms
Resolves __udivdi3 missing errors when building for i386.
Fixes: 6378ef012ddc ("drm/amd/display: Add below the range support for FreeSync")
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index d49bcc9c8974..56e9848b7739 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | |||
@@ -4562,6 +4562,7 @@ static void amdgpu_dm_do_flip(struct drm_crtc *crtc, | |||
4562 | struct dc_state *state) | 4562 | struct dc_state *state) |
4563 | { | 4563 | { |
4564 | unsigned long flags; | 4564 | unsigned long flags; |
4565 | uint64_t timestamp_ns; | ||
4565 | uint32_t target_vblank; | 4566 | uint32_t target_vblank; |
4566 | int r, vpos, hpos; | 4567 | int r, vpos, hpos; |
4567 | struct amdgpu_crtc *acrtc = to_amdgpu_crtc(crtc); | 4568 | struct amdgpu_crtc *acrtc = to_amdgpu_crtc(crtc); |
@@ -4624,7 +4625,9 @@ static void amdgpu_dm_do_flip(struct drm_crtc *crtc, | |||
4624 | addr.address.grph.addr.low_part = lower_32_bits(afb->address); | 4625 | addr.address.grph.addr.low_part = lower_32_bits(afb->address); |
4625 | addr.address.grph.addr.high_part = upper_32_bits(afb->address); | 4626 | addr.address.grph.addr.high_part = upper_32_bits(afb->address); |
4626 | addr.flip_immediate = async_flip; | 4627 | addr.flip_immediate = async_flip; |
4627 | addr.flip_timestamp_in_us = ktime_get_ns() / 1000; | 4628 | |
4629 | timestamp_ns = ktime_get_ns(); | ||
4630 | addr.flip_timestamp_in_us = div_u64(timestamp_ns, 1000); | ||
4628 | 4631 | ||
4629 | 4632 | ||
4630 | if (acrtc->base.state->event) | 4633 | if (acrtc->base.state->event) |