drm/amd/display: Fix 64-bit division in hwss_edp_power_control
authorHarry Wentland <harry.wentland@amd.com>
Tue, 10 Apr 2018 20:08:44 +0000 (16:08 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 15 May 2018 18:43:06 +0000 (13:43 -0500)
Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c

index 52427ae..68a182c 100644 (file)
@@ -857,7 +857,7 @@ void hwss_edp_power_control(
                                        dm_get_elapse_time_in_ns(
                                                        ctx,
                                                        current_ts,
-                                                       link->link_trace.time_stamp.edp_poweroff) / 1000000;
+                                                       div64_u64(link->link_trace.time_stamp.edp_poweroff, 1000000));
                        unsigned long long wait_time_ms = 0;
 
                        /* max 500ms from LCDVDD off to on */