diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2016-12-20 21:07:03 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2016-12-20 21:07:03 +0000 |
commit | be3672895c4ea67cfb9d4ccaee5db4c56f73d91c (patch) | |
tree | 68909ec63869be0bef34d60e2582022de341ba86 /sys/dev/pci | |
parent | d656ba3f4349f4561f5c645cc55f9f99a9afe0df (diff) |
Fix compiler warnings generated by clang. This matches upstream commit
1cd73ff70d13a22faa95db8323382dd6d036554e by Alex Deucher, whose commit
message makes me suspect that Brad Smith mailed us a diff back in 2013
that we ignored.
ok jsg@
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/drm/radeon/rs690.c | 18 | ||||
-rw-r--r-- | sys/dev/pci/drm/radeon/rv515.c | 10 |
2 files changed, 7 insertions, 21 deletions
diff --git a/sys/dev/pci/drm/radeon/rs690.c b/sys/dev/pci/drm/radeon/rs690.c index 1e528851355..0f1ea1b0e8a 100644 --- a/sys/dev/pci/drm/radeon/rs690.c +++ b/sys/dev/pci/drm/radeon/rs690.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rs690.c,v 1.5 2015/02/11 07:01:37 jsg Exp $ */ +/* $OpenBSD: rs690.c,v 1.6 2016/12/20 21:07:02 kettenis Exp $ */ /* * Copyright 2008 Advanced Micro Devices, Inc. * Copyright 2008 Red Hat Inc. @@ -316,9 +316,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; - read_delay_latency.full = dfixed_const(370 * 800 * 1000); - 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) @@ -493,14 +495,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); @@ -531,8 +529,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); @@ -560,8 +556,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); diff --git a/sys/dev/pci/drm/radeon/rv515.c b/sys/dev/pci/drm/radeon/rv515.c index 6f73cb9aad0..621aae7f99a 100644 --- a/sys/dev/pci/drm/radeon/rv515.c +++ b/sys/dev/pci/drm/radeon/rv515.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rv515.c,v 1.5 2015/04/06 03:49:47 jsg Exp $ */ +/* $OpenBSD: rv515.c,v 1.6 2016/12/20 21:07:02 kettenis Exp $ */ /* * Copyright 2008 Advanced Micro Devices, Inc. * Copyright 2008 Red Hat Inc. @@ -1142,14 +1142,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); @@ -1180,8 +1176,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); @@ -1209,8 +1203,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); |