Merge change from upstream linux kernel submitted by OpenBSD:
drm/radeon: fix-up some float to fixed conversion thinkos Spotted by Brad Smith when porting to OpenBSD. Noticed-by: Brad Smith <brad@comstyle.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> ref: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=1cd73ff7 Remove #ifdef DUMBBELL_WIP in favor of upstream fix. Phabric: https://phabric.freebsd.org/D423 Reviewed by: dumbbell, jkim MFC after: 2 weeks
This commit is contained in:
parent
0dfe37f8f3
commit
77f3aefe61
@ -308,12 +308,11 @@ static void rs690_crtc_bandwidth_compute(struct radeon_device *rdev,
|
||||
if (rdev->pm.max_bandwidth.full > rdev->pm.sideport_bandwidth.full &&
|
||||
rdev->pm.sideport_bandwidth.full)
|
||||
rdev->pm.max_bandwidth = rdev->pm.sideport_bandwidth;
|
||||
#ifdef DUMBBELL_WIP
|
||||
read_delay_latency.full = dfixed_const(370 * 800 * 1000);
|
||||
#endif /* DUMBBELL_WIP */
|
||||
read_delay_latency.full = UINT_MAX;
|
||||
read_delay_latency.full = dfixed_div(read_delay_latency,
|
||||
rdev->pm.igp_sideport_mclk);
|
||||
read_delay_latency.full = dfixed_const(370 * 800);
|
||||
a.full = dfixed_const(1000);
|
||||
b.full = dfixed_div(rdev->pm.igp_sideport_mclk, a);
|
||||
read_delay_latency.full = dfixed_div(read_delay_latency, b);
|
||||
read_delay_latency.full = dfixed_mul(read_delay_latency, a);
|
||||
} else {
|
||||
if (rdev->pm.max_bandwidth.full > rdev->pm.k8_bandwidth.full &&
|
||||
rdev->pm.k8_bandwidth.full)
|
||||
@ -488,14 +487,10 @@ void rs690_bandwidth_update(struct radeon_device *rdev)
|
||||
}
|
||||
if (wm0.priority_mark.full > priority_mark02.full)
|
||||
priority_mark02.full = wm0.priority_mark.full;
|
||||
if (dfixed_trunc(priority_mark02) < 0)
|
||||
priority_mark02.full = 0;
|
||||
if (wm0.priority_mark_max.full > priority_mark02.full)
|
||||
priority_mark02.full = wm0.priority_mark_max.full;
|
||||
if (wm1.priority_mark.full > priority_mark12.full)
|
||||
priority_mark12.full = wm1.priority_mark.full;
|
||||
if (dfixed_trunc(priority_mark12) < 0)
|
||||
priority_mark12.full = 0;
|
||||
if (wm1.priority_mark_max.full > priority_mark12.full)
|
||||
priority_mark12.full = wm1.priority_mark_max.full;
|
||||
d1mode_priority_a_cnt = dfixed_trunc(priority_mark02);
|
||||
@ -526,8 +521,6 @@ void rs690_bandwidth_update(struct radeon_device *rdev)
|
||||
}
|
||||
if (wm0.priority_mark.full > priority_mark02.full)
|
||||
priority_mark02.full = wm0.priority_mark.full;
|
||||
if (dfixed_trunc(priority_mark02) < 0)
|
||||
priority_mark02.full = 0;
|
||||
if (wm0.priority_mark_max.full > priority_mark02.full)
|
||||
priority_mark02.full = wm0.priority_mark_max.full;
|
||||
d1mode_priority_a_cnt = dfixed_trunc(priority_mark02);
|
||||
@ -555,8 +548,6 @@ void rs690_bandwidth_update(struct radeon_device *rdev)
|
||||
}
|
||||
if (wm1.priority_mark.full > priority_mark12.full)
|
||||
priority_mark12.full = wm1.priority_mark.full;
|
||||
if (dfixed_trunc(priority_mark12) < 0)
|
||||
priority_mark12.full = 0;
|
||||
if (wm1.priority_mark_max.full > priority_mark12.full)
|
||||
priority_mark12.full = wm1.priority_mark_max.full;
|
||||
d2mode_priority_a_cnt = dfixed_trunc(priority_mark12);
|
||||
|
@ -1087,14 +1087,10 @@ void rv515_bandwidth_avivo_update(struct radeon_device *rdev)
|
||||
}
|
||||
if (wm0.priority_mark.full > priority_mark02.full)
|
||||
priority_mark02.full = wm0.priority_mark.full;
|
||||
if (dfixed_trunc(priority_mark02) < 0)
|
||||
priority_mark02.full = 0;
|
||||
if (wm0.priority_mark_max.full > priority_mark02.full)
|
||||
priority_mark02.full = wm0.priority_mark_max.full;
|
||||
if (wm1.priority_mark.full > priority_mark12.full)
|
||||
priority_mark12.full = wm1.priority_mark.full;
|
||||
if (dfixed_trunc(priority_mark12) < 0)
|
||||
priority_mark12.full = 0;
|
||||
if (wm1.priority_mark_max.full > priority_mark12.full)
|
||||
priority_mark12.full = wm1.priority_mark_max.full;
|
||||
d1mode_priority_a_cnt = dfixed_trunc(priority_mark02);
|
||||
@ -1125,8 +1121,6 @@ void rv515_bandwidth_avivo_update(struct radeon_device *rdev)
|
||||
}
|
||||
if (wm0.priority_mark.full > priority_mark02.full)
|
||||
priority_mark02.full = wm0.priority_mark.full;
|
||||
if (dfixed_trunc(priority_mark02) < 0)
|
||||
priority_mark02.full = 0;
|
||||
if (wm0.priority_mark_max.full > priority_mark02.full)
|
||||
priority_mark02.full = wm0.priority_mark_max.full;
|
||||
d1mode_priority_a_cnt = dfixed_trunc(priority_mark02);
|
||||
@ -1154,8 +1148,6 @@ void rv515_bandwidth_avivo_update(struct radeon_device *rdev)
|
||||
}
|
||||
if (wm1.priority_mark.full > priority_mark12.full)
|
||||
priority_mark12.full = wm1.priority_mark.full;
|
||||
if (dfixed_trunc(priority_mark12) < 0)
|
||||
priority_mark12.full = 0;
|
||||
if (wm1.priority_mark_max.full > priority_mark12.full)
|
||||
priority_mark12.full = wm1.priority_mark_max.full;
|
||||
d2mode_priority_a_cnt = dfixed_trunc(priority_mark12);
|
||||
|
Loading…
Reference in New Issue
Block a user