[PATCH i-g-t 3/3] benchmarks/gem_wsim: replace div64_u64_round_up() with DIV_ROUND_UP
Shuicheng Lin
shuicheng.lin at intel.com
Wed Apr 16 16:30:53 UTC 2025
DIV_ROUND_UP is defined in igt_aux.h with the same function as
div64_u64_round_up().
Cc: Matt Roper <matthew.d.roper at intel.com>
Signed-off-by: Shuicheng Lin <shuicheng.lin at intel.com>
---
benchmarks/gem_wsim.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/benchmarks/gem_wsim.c b/benchmarks/gem_wsim.c
index 7a6b10028..d791ea584 100644
--- a/benchmarks/gem_wsim.c
+++ b/benchmarks/gem_wsim.c
@@ -344,11 +344,6 @@ static int read_timestamp_frequency(int i915)
return value;
}
-static uint64_t div64_u64_round_up(uint64_t x, uint64_t y)
-{
- return (x + y - 1) / y;
-}
-
static uint64_t ns_to_ctx_ticks(uint64_t ns)
{
static long f;
@@ -359,7 +354,7 @@ static uint64_t ns_to_ctx_ticks(uint64_t ns)
f = 12500000; /* icl!!! are you feeling alright? */
}
- return div64_u64_round_up(ns * f, NSEC_PER_SEC);
+ return DIV_ROUND_UP(ns * f, NSEC_PER_SEC);
}
#define MI_STORE_DWORD_INDEX MI_INSTR(0x21, 1)
--
2.25.1
More information about the igt-dev
mailing list