Skip to contentSkip to conversation

drm/amd/display: Fix 64-bit division in hwss_edp_power_control

PATCH In review Harry Wentland 2 participants 2 messages Apr 10, 2018 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amd/display: Fix 64-bit division in hwss_edp_power_control

---
 drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +1 -1
index f32ccdfd18a3..3ba057e2a467 100644
@@ -860,7 +860,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 */
Signature · 6 lines
2.15.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 20180410201007.6522-1-harry.wentland-5C7GfCeVMHo@public.gmane.org

Reviewed-by
#2 lore raw
Quoted 1 line · Harry Wentland
Quoted 20 lines
---
 drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +1 -2
index f32ccdfd18a3..3ba057e2a467 100644
@@ -860,7 +860,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 */
--

2.15.1

Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx