[igt-dev] [PATCH i-g-t 1/2] lib/xe_query: Add milliseconds to nanoseconds macro
Matthew Brost
matthew.brost at intel.com
Tue Jun 27 16:47:21 UTC 2023
On Tue, Jun 27, 2023 at 06:14:06PM +0200, Zbigniew Kempczyński wrote:
> We're going to change xe uapi to use nanoseconds so all tests which
> currently are passing jiffies have to be altered.
>
> Add MS_TO_NS() macro to make this work easier.
>
> Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
Reviewed-by: Matthew Brost <matthew.brost at intel.com>
> ---
> lib/xe/xe_query.h | 2 ++
> tests/xe/xe_waitfence.c | 1 -
> 2 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/lib/xe/xe_query.h b/lib/xe/xe_query.h
> index 943ca558a5..cca2c9aae5 100644
> --- a/lib/xe/xe_query.h
> +++ b/lib/xe/xe_query.h
> @@ -99,4 +99,6 @@ bool xe_has_engine_class(int fd, uint16_t engine_class);
> struct xe_device *xe_device_get(int fd);
> void xe_device_put(int fd);
>
> +#define MS_TO_NS(ms) (((int64_t)ms) * 1000000)
> +
> #endif /* XE_QUERY_H */
> diff --git a/tests/xe/xe_waitfence.c b/tests/xe/xe_waitfence.c
> index c6b2db125c..7763a556c7 100644
> --- a/tests/xe/xe_waitfence.c
> +++ b/tests/xe/xe_waitfence.c
> @@ -38,7 +38,6 @@ static void do_bind(int fd, uint32_t vm, uint32_t bo, uint64_t offset,
> xe_vm_bind(fd, vm, bo, offset, addr, size, sync, 1);
> }
>
> -#define MS_TO_NS(ms) (((int64_t)ms) * 1000000)
> enum waittype {
> RELTIME,
> ABSTIME,
> --
> 2.34.1
>
More information about the igt-dev
mailing list