drm/amd/display: Correct calculation of duration time.
authorHugo Hu <hugo.hu@amd.com>
Mon, 18 Jun 2018 19:27:58 +0000 (15:27 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 13 Jul 2018 19:47:59 +0000 (14:47 -0500)
Signed-off-by: Hugo Hu <hugo.hu@amd.com>
Reviewed-by: Charlene Liu <Charlene.Liu@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c

index 9cbd5036db0794868a57bcf034bb3cec8899c3fd..bf4df34bc1df06d803d6a68f59c6c12029ac95db 100644 (file)
@@ -864,10 +864,10 @@ void hwss_edp_power_control(
                if (power_up) {
                        unsigned long long current_ts = dm_get_timestamp(ctx);
                        unsigned long long duration_in_ms =
-                                       dm_get_elapse_time_in_ns(
+                                       div64_u64(dm_get_elapse_time_in_ns(
                                                        ctx,
                                                        current_ts,
-                                                       div64_u64(link->link_trace.time_stamp.edp_poweroff, 1000000));
+                                                       link->link_trace.time_stamp.edp_poweroff), 1000000);
                        unsigned long long wait_time_ms = 0;
 
                        /* max 500ms from LCDVDD off to on */