mirror of
https://github.com/void-linux/void-packages.git
synced 2025-07-30 09:22:57 +02:00
igt-gpu-tools: update to 2.1
This commit is contained in:
parent
d5fe4c99e1
commit
2559d20451
4 changed files with 32 additions and 398 deletions
|
@ -1,63 +0,0 @@
|
|||
diff --git lib/igt_halffloat.c lib/igt_halffloat.c
|
||||
index 08ab05fc..e5e8a5bd 100644
|
||||
--- a/lib/igt_halffloat.c
|
||||
+++ b/lib/igt_halffloat.c
|
||||
@@ -24,6 +24,19 @@
|
||||
|
||||
#include <assert.h>
|
||||
#include <math.h>
|
||||
+#include <stdbool.h>
|
||||
+
|
||||
+#ifdef HAVE_CPUID_H
|
||||
+#include <cpuid.h>
|
||||
+#else
|
||||
+#define __get_cpuid_max(x, y) 0
|
||||
+#define __cpuid(level, a, b, c, d) a = b = c = d = 0
|
||||
+#define __cpuid_count(level, count, a, b, c, d) a = b = c = d = 0
|
||||
+#endif
|
||||
+
|
||||
+#ifndef bit_F16C
|
||||
+#define bit_F16C (1 << 29)
|
||||
+#endif
|
||||
|
||||
#include "igt_halffloat.h"
|
||||
#include "igt_x86.h"
|
||||
@@ -182,6 +195,20 @@ static void half_to_float_f16c(const uint16_t *h, float *f, unsigned int num)
|
||||
|
||||
#pragma GCC pop_options
|
||||
|
||||
+static bool f16c_is_supported(void)
|
||||
+{
|
||||
+ unsigned max = __get_cpuid_max(0, NULL);
|
||||
+ unsigned eax, ebx, ecx, edx;
|
||||
+
|
||||
+ if (max >= 1) {
|
||||
+ __cpuid(1, eax, ebx, ecx, edx);
|
||||
+
|
||||
+ if (ecx & bit_F16C)
|
||||
+ return true;
|
||||
+ }
|
||||
+ return false;
|
||||
+}
|
||||
+
|
||||
static void float_to_half(const float *f, uint16_t *h, unsigned int num)
|
||||
{
|
||||
for (int i = 0; i < num; i++)
|
||||
@@ -196,7 +223,7 @@ static void half_to_float(const uint16_t *h, float *f, unsigned int num)
|
||||
|
||||
static void (*resolve_float_to_half(void))(const float *f, uint16_t *h, unsigned int num)
|
||||
{
|
||||
- if (igt_x86_features() & F16C)
|
||||
+ if (f16c_is_supported())
|
||||
return float_to_half_f16c;
|
||||
|
||||
return float_to_half;
|
||||
@@ -207,7 +234,7 @@ void igt_float_to_half(const float *f, uint16_t *h, unsigned int num)
|
||||
|
||||
static void (*resolve_half_to_float(void))(const uint16_t *h, float *f, unsigned int num)
|
||||
{
|
||||
- if (igt_x86_features() & F16C)
|
||||
+ if (f16c_is_supported())
|
||||
return half_to_float_f16c;
|
||||
|
||||
return half_to_float;
|
|
@ -1,17 +0,0 @@
|
|||
--- a/lib/igt_aux.c
|
||||
+++ b/lib/igt_aux.c
|
||||
@@ -1353,10 +1353,10 @@
|
||||
prcs->comm = NULL;
|
||||
prcs->stack = procps_pids_get(prcs->info, PIDS_FETCH_TASKS_ONLY);
|
||||
if (prcs->stack) {
|
||||
- prcs->tid = PIDS_VAL(EU_PID, s_int, prcs->stack, prcs->info);
|
||||
- prcs->euid = PIDS_VAL(EU_EUID, s_int, prcs->stack, prcs->info);
|
||||
- prcs->egid = PIDS_VAL(EU_EGID, s_int, prcs->stack, prcs->info);
|
||||
- prcs->comm = PIDS_VAL(EU_CMD, str, prcs->stack, prcs->info);
|
||||
+ prcs->tid = PIDS_VAL(EU_PID, s_int, prcs->stack);
|
||||
+ prcs->euid = PIDS_VAL(EU_EUID, s_int, prcs->stack);
|
||||
+ prcs->egid = PIDS_VAL(EU_EGID, s_int, prcs->stack);
|
||||
+ prcs->comm = PIDS_VAL(EU_CMD, str, prcs->stack);
|
||||
}
|
||||
#endif
|
||||
return prcs->tid != 0;
|
|
@ -1,321 +1,35 @@
|
|||
diff --git a/benchmarks/gem_exec_tracer.c b/benchmarks/gem_exec_tracer.c
|
||||
index 7e86473e..3156dfc2 100644
|
||||
--- a/benchmarks/gem_exec_tracer.c
|
||||
+++ b/benchmarks/gem_exec_tracer.c
|
||||
@@ -271,7 +271,11 @@ static int is_i915(int fd)
|
||||
}
|
||||
|
||||
int
|
||||
+#ifdef __GLIBC__
|
||||
ioctl(int fd, unsigned long request, ...)
|
||||
+#else
|
||||
+ioctl(int fd, int request, ...)
|
||||
--- a/lib/igt_vc4.h
|
||||
+++ b/lib/igt_vc4.h
|
||||
@@ -31,7 +31,9 @@
|
||||
#include "igt_fb.h"
|
||||
#include "vc4_drm.h"
|
||||
|
||||
+#ifndef PAGE_SIZE
|
||||
#define PAGE_SIZE 4096
|
||||
+#endif
|
||||
{
|
||||
struct trace *t, **p;
|
||||
va_list args;
|
||||
diff --git a/lib/amdgpu/amd_pci_unplug.c b/lib/amdgpu/amd_pci_unplug.c
|
||||
index 078398b5..554f489c 100644
|
||||
--- a/lib/amdgpu/amd_pci_unplug.c
|
||||
+++ b/lib/amdgpu/amd_pci_unplug.c
|
||||
@@ -21,6 +21,7 @@
|
||||
*
|
||||
*/
|
||||
#include <linux/limits.h>
|
||||
+#include <limits.h> // PATH_MAX
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
#include <pthread.h>
|
||||
diff --git a/lib/igt_audio.c b/lib/igt_audio.c
|
||||
index e0b1bafe..dd5e0d2c 100644
|
||||
--- a/lib/igt_audio.c
|
||||
+++ b/lib/igt_audio.c
|
||||
@@ -26,6 +26,7 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
+#include <limits.h> // PATH_MAX
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <gsl/gsl_fft_real.h>
|
||||
diff --git a/lib/igt_aux.c b/lib/igt_aux.c
|
||||
index 15e30440..9792899d 100644
|
||||
--- a/lib/igt_aux.c
|
||||
+++ b/lib/igt_aux.c
|
||||
@@ -31,6 +31,7 @@
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
+#include <limits.h> // PATH_MAX
|
||||
#include <pwd.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/ioctl.h>
|
||||
diff --git a/lib/igt_device_scan.c b/lib/igt_device_scan.c
|
||||
index ed128d24..ebff1ad3 100644
|
||||
--- a/lib/igt_device_scan.c
|
||||
+++ b/lib/igt_device_scan.c
|
||||
@@ -27,6 +27,7 @@
|
||||
#include "igt_list.h"
|
||||
#include "intel_chipset.h"
|
||||
|
||||
+#include <limits.h> // PATH_MAX
|
||||
#include <ctype.h>
|
||||
#include <dirent.h>
|
||||
#include <fcntl.h>
|
||||
diff --git a/lib/igt_eld.c b/lib/igt_eld.c
|
||||
index ef6625df..3e9b8a40 100644
|
||||
--- a/lib/igt_eld.c
|
||||
+++ b/lib/igt_eld.c
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "config.h"
|
||||
|
||||
#include <dirent.h>
|
||||
+#include <limits.h> // PATH_MAX
|
||||
#include <errno.h>
|
||||
#include <glob.h>
|
||||
#include <stdint.h>
|
||||
diff --git a/lib/igt_frame.c b/lib/igt_frame.c
|
||||
index 45523a79..86b8aad4 100644
|
||||
--- a/lib/igt_frame.c
|
||||
+++ b/lib/igt_frame.c
|
||||
@@ -26,6 +26,7 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
+#include <limits.h> // PATH_MAX
|
||||
#include <fcntl.h>
|
||||
#include <pixman.h>
|
||||
#include <cairo.h>
|
||||
diff --git a/lib/igt_halffloat.c b/lib/igt_halffloat.c
|
||||
index 08ab05fc..7d6a6e6a 100644
|
||||
--- a/lib/igt_halffloat.c
|
||||
+++ b/lib/igt_halffloat.c
|
||||
@@ -162,7 +162,7 @@ static inline float _half_to_float(uint16_t val)
|
||||
return fi.f;
|
||||
}
|
||||
|
||||
-#if defined(__x86_64__) && !defined(__clang__)
|
||||
+#if defined(__x86_64__) && !defined(__clang__) && defined(__GLIBC__)
|
||||
#pragma GCC push_options
|
||||
#pragma GCC target("f16c")
|
||||
|
||||
diff --git a/lib/igt_hwmon.c b/lib/igt_hwmon.c
|
||||
index 309019d6..6216a160 100644
|
||||
--- a/lib/igt_hwmon.c
|
||||
+++ b/lib/igt_hwmon.c
|
||||
@@ -2,6 +2,7 @@
|
||||
/*
|
||||
* Copyright © 2022 Intel Corporation
|
||||
*/
|
||||
+#include <limits.h> // PATH_MAX
|
||||
#include <sys/stat.h>
|
||||
#include <sys/sysmacros.h>
|
||||
#include <dirent.h>
|
||||
diff --git a/lib/igt_x86.c b/lib/igt_x86.c
|
||||
index 6ac700df..ddf5edda 100644
|
||||
--- a/lib/igt_x86.c
|
||||
+++ b/lib/igt_x86.c
|
||||
@@ -190,7 +190,7 @@ char *igt_x86_features_to_string(unsigned features, char *line)
|
||||
}
|
||||
#endif
|
||||
|
||||
-#if defined(__x86_64__) && !defined(__clang__)
|
||||
+#if defined(__x86_64__) && !defined(__clang__) && defined(__GLIBC__)
|
||||
#pragma GCC push_options
|
||||
#pragma GCC target("sse4.1")
|
||||
#pragma GCC diagnostic ignored "-Wpointer-arith"
|
||||
diff --git a/runner/executor.c b/runner/executor.c
|
||||
index 9d3623b4..aac3ac56 100644
|
||||
--- a/runner/executor.c
|
||||
+++ b/runner/executor.c
|
||||
@@ -1,6 +1,7 @@
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
+#include <limits.h> // PATH_MAX
|
||||
#include <glib.h>
|
||||
#ifdef __linux__
|
||||
#include <linux/watchdog.h>
|
||||
diff --git a/runner/runner_tests.c b/runner/runner_tests.c
|
||||
index a7e968f8..6d605251 100644
|
||||
--- a/runner/runner_tests.c
|
||||
+++ b/runner/runner_tests.c
|
||||
@@ -1,5 +1,6 @@
|
||||
#include <dirent.h>
|
||||
#include <fcntl.h>
|
||||
+#include <limits.h> // PATH_MAX
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
diff --git a/tests/device_reset.c b/tests/device_reset.c
|
||||
index 39ee8dca..fa8e3b9f 100644
|
||||
--- a/tests/device_reset.c
|
||||
+++ b/tests/device_reset.c
|
||||
|
||||
uint32_t igt_vc4_get_cleared_bo(int fd, size_t size, uint32_t clearval);
|
||||
int igt_vc4_create_bo(int fd, size_t size);
|
||||
|
||||
--- a/lib/xe/xe_sriov_debugfs.c
|
||||
+++ b/lib/xe/xe_sriov_debugfs.c
|
||||
@@ -3,6 +3,7 @@
|
||||
* Copyright(c) 2020 Intel Corporation. All rights reserved.
|
||||
* Copyright(c) 2024 Intel Corporation. All rights reserved.
|
||||
*/
|
||||
#include <fcntl.h>
|
||||
+#include <limits.h> // PATH_MAX
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/stat.h>
|
||||
#include <signal.h>
|
||||
diff --git a/tests/i915/i915_pm_rpm.c b/tests/i915/i915_pm_rpm.c
|
||||
index 74935430..0dc87d8c 100644
|
||||
--- a/tests/intel/i915_pm_rpm.c
|
||||
+++ b/tests/intel/i915_pm_rpm.c
|
||||
@@ -27,6 +27,10 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
+#ifdef HAVE_LIBGEN_H
|
||||
+#include <libgen.h> // basename()
|
||||
+#endif
|
||||
+#include <limits.h> // PATH_MAX
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
diff --git a/tests/kms_atomic.c b/tests/kms_atomic.c
|
||||
index 2a3fb74b..781af5e8 100644
|
||||
--- a/tests/kms_atomic.c
|
||||
+++ b/tests/kms_atomic.c
|
||||
@@ -830,7 +830,7 @@ static void crtc_invalid_params_fence(igt_pipe_t *pipe,
|
||||
{
|
||||
int timeline, fence_fd;
|
||||
void *map;
|
||||
- const ptrdiff_t PAGE_SIZE = sysconf(_SC_PAGE_SIZE);
|
||||
+ const ptrdiff_t intelsize = sysconf(_SC_PAGE_SIZE);
|
||||
uint64_t old_mode_id = pipe->values[IGT_CRTC_MODE_ID];
|
||||
|
||||
igt_require_sw_sync();
|
||||
@@ -838,28 +838,28 @@ static void crtc_invalid_params_fence(igt_pipe_t *pipe,
|
||||
timeline = sw_sync_timeline_create();
|
||||
|
||||
/* invalid out_fence_ptr */
|
||||
- map = mmap(NULL, PAGE_SIZE, PROT_READ, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
|
||||
+ map = mmap(NULL, intelsize, PROT_READ, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
|
||||
igt_assert(map != MAP_FAILED);
|
||||
|
||||
igt_pipe_obj_set_prop_value(pipe, IGT_CRTC_OUT_FENCE_PTR, (ptrdiff_t)map);
|
||||
crtc_commit_atomic_err(pipe, plane, ATOMIC_RELAX_NONE, EFAULT);
|
||||
- munmap(map, PAGE_SIZE);
|
||||
+ munmap(map, intelsize);
|
||||
|
||||
/* invalid out_fence_ptr */
|
||||
- map = mmap(NULL, PAGE_SIZE, PROT_EXEC, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
|
||||
+ map = mmap(NULL, intelsize, PROT_EXEC, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
|
||||
igt_assert(map != MAP_FAILED);
|
||||
|
||||
igt_pipe_obj_set_prop_value(pipe, IGT_CRTC_OUT_FENCE_PTR, (ptrdiff_t)map);
|
||||
crtc_commit_atomic_err(pipe, plane, ATOMIC_RELAX_NONE, EFAULT);
|
||||
- munmap(map, PAGE_SIZE);
|
||||
+ munmap(map, intelsize);
|
||||
|
||||
/* invalid out_fence_ptr */
|
||||
- map = mmap(NULL, PAGE_SIZE, PROT_NONE, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
|
||||
+ map = mmap(NULL, intelsize, PROT_NONE, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
|
||||
igt_assert(map != MAP_FAILED);
|
||||
|
||||
igt_pipe_obj_set_prop_value(pipe, IGT_CRTC_OUT_FENCE_PTR, (ptrdiff_t)map);
|
||||
crtc_commit_atomic_err(pipe, plane, ATOMIC_RELAX_NONE, EFAULT);
|
||||
- munmap(map, PAGE_SIZE);
|
||||
+ munmap(map, intelsize);
|
||||
|
||||
/* valid in fence but not allowed prop on crtc */
|
||||
fence_fd = sw_sync_timeline_create_fence(timeline, 1);
|
||||
diff --git a/tests/kms_sysfs_edid_timing.c b/tests/kms_sysfs_edid_timing.c
|
||||
index 77521108..3b16cba8 100644
|
||||
--- a/tests/kms_sysfs_edid_timing.c
|
||||
+++ b/tests/kms_sysfs_edid_timing.c
|
||||
@@ -22,6 +22,7 @@
|
||||
*/
|
||||
#include "igt.h"
|
||||
|
||||
+#include <limits.h> // PATH_MAX
|
||||
|
||||
+#include <limits.h>
|
||||
#include <dirent.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
diff --git a/tests/testdisplay.c b/tests/testdisplay.c
|
||||
index ee272dfb..b8146b41 100644
|
||||
--- a/tests/testdisplay.c
|
||||
+++ b/tests/testdisplay.c
|
||||
@@ -58,6 +58,7 @@
|
||||
#include <strings.h>
|
||||
#include <unistd.h>
|
||||
#include <termios.h>
|
||||
+#include <limits.h> // PATH_MAX
|
||||
#include <sys/poll.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/ioctl.h>
|
||||
diff --git a/tests/tools_test.c b/tests/tools_test.c
|
||||
index 8412ba52..f36a6192 100644
|
||||
--- a/tests/tools_test.c
|
||||
+++ b/tests/tools_test.c
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
+#include <limits.h> // PATH_MAX
|
||||
#include <libgen.h>
|
||||
#include <unistd.h>
|
||||
#ifdef __linux__
|
||||
diff --git a/tools/igt_compliance_utils.c b/tools/igt_compliance_utils.c
|
||||
index 0faf3fc8..f6bd970e 100644
|
||||
--- a/tools/igt_compliance_utils.c
|
||||
+++ b/tools/igt_compliance_utils.c
|
||||
@@ -24,6 +24,7 @@
|
||||
*/
|
||||
|
||||
#include "igt.h"
|
||||
+#include <limits.h> // PATH_MAX
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
--- a/tests/intel/kms_pm_backlight.c
|
||||
+++ b/tests/intel/kms_pm_backlight.c
|
||||
@@ -36,6 +36,9 @@
|
||||
*/
|
||||
|
||||
#include "igt.h"
|
||||
+#ifdef HAVE_LIBGEN_H
|
||||
+#include <libgen.h> /* basename() */
|
||||
|
||||
--- a/lib/svga/vm_basic_types.h
|
||||
+++ b/lib/svga/vm_basic_types.h
|
||||
@@ -27,6 +27,9 @@
|
||||
#define VM_BASIC_TYPES_H
|
||||
|
||||
#define PAGE_SHIFT 12
|
||||
+#ifdef PAGE_SIZE
|
||||
+#undef PAGE_SIZE
|
||||
+#endif
|
||||
#include <limits.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
--- a/lib/igt_aux.h
|
||||
+++ b/lib/igt_aux.h
|
||||
@@ -48,7 +48,9 @@
|
||||
# ifndef HAVE_GETTID
|
||||
# define gettid() (pid_t)(syscall(__NR_gettid))
|
||||
# endif
|
||||
-# define sigev_notify_thread_id _sigev_un._tid
|
||||
+# ifdef __GLIBC__
|
||||
+# define sigev_notify_thread_id _sigev_un._tid
|
||||
+# endif
|
||||
#endif
|
||||
|
||||
/* auxialiary igt helpers from igt_aux.c */
|
||||
--- a/lib/i915/gem_engine_topology.c
|
||||
+++ b/lib/i915/gem_engine_topology.c
|
||||
@@ -693,8 +693,8 @@
|
||||
|
||||
while (len) {
|
||||
struct linux_dirent64 {
|
||||
- ino64_t d_ino;
|
||||
- off64_t d_off;
|
||||
+ ino_t d_ino;
|
||||
+ off_t d_off;
|
||||
unsigned short d_reclen;
|
||||
unsigned char d_type;
|
||||
char d_name[];
|
||||
--- a/tools/i915-perf/i915_perf_recorder.c
|
||||
+++ b/tools/i915-perf/i915_perf_recorder.c
|
||||
@@ -187,7 +187,7 @@
|
||||
}
|
||||
|
||||
static int
|
||||
-circular_buffer_seek(void *c, off64_t *offset, int whence)
|
||||
+circular_buffer_seek(void *c, off_t *offset, int whence)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
#define PAGE_SIZE (1 << PAGE_SHIFT)
|
||||
#define PAGE_MASK (~(PAGE_SIZE - 1))
|
||||
#define PAGE_ALIGN(addr) (((addr) + PAGE_SIZE - 1) & PAGE_MASK)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'igt-gpu-tools'
|
||||
pkgname=igt-gpu-tools
|
||||
version=1.28
|
||||
revision=2
|
||||
version=2.1
|
||||
revision=1
|
||||
build_style=meson
|
||||
configure_args="-Db_ndebug=false -Ddocs=disabled"
|
||||
hostmakedepends="pkg-config flex peg python3-docutils"
|
||||
|
@ -14,7 +14,7 @@ license="MIT"
|
|||
homepage="https://gitlab.freedesktop.org/drm/igt-gpu-tools"
|
||||
changelog="https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/raw/master/NEWS"
|
||||
distfiles="${XORG_SITE}/app/igt-gpu-tools-${version}.tar.xz"
|
||||
checksum=ffcbdf61bd495803d9ae9dfa83e2fe04b8f583a2296fe059c1d5dd135a8a3b15
|
||||
checksum=bf72beff71093db692f386c9359b557dfa8e8c45250439c952564b1b6fe343f8
|
||||
# tests don't behave in containers
|
||||
make_check=ci-skip
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue