mirror of
https://github.com/dslm4515/BMLFS.git
synced 2025-08-20 14:31:47 +00:00
Upgraded igt-gpu-tools to 1.26
This commit is contained in:
@ -1,25 +1,36 @@
|
|||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
|
|
||||||
# IGT-gpu-tools
|
# IGT-gpu-tools
|
||||||
# Source: https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/archive/igt-gpu-tools-1.25/igt-gpu-tools-igt-gpu-tools-1.25.tar.bz2
|
# Source: https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/archive/igt-gpu-tools-1.26/igt-gpu-tools-igt-gpu-tools-1.26.tar.bz2
|
||||||
|
# URL: https://gitlab.freedesktop.org/drm/igt-gpu-tools
|
||||||
#
|
#
|
||||||
# $BUILD = Directory to temporarily install
|
# $BUILD = Directory to temporarily install
|
||||||
# $PKGS = Directory to store built packages
|
# $PKGS = Directory to store built packages
|
||||||
#
|
#
|
||||||
# DEPS
|
# DEPS
|
||||||
# Required: libdrm, Xorg libraries, CMake, libdw, elfutils
|
# Required: libdrm, Xorg libraries, CMake, libdw(elfutils), pixman
|
||||||
|
# Required: cairo, Pygments
|
||||||
# Recommended: NONE
|
# Recommended: NONE
|
||||||
# Optional: NONE
|
# Optional: NONE
|
||||||
|
|
||||||
patch -Np0 -i ../patches/igt-gpu-tools-void/musl.patch
|
# Fix meson build
|
||||||
|
patch -Np1 -i ../patches/igt-gpu-tools-alpine/fix-meson.patch
|
||||||
|
|
||||||
|
# Patch source to build against musl...
|
||||||
|
patch -Np1 -i ../patches/igt-gpu-tools-alpine/musl.patch
|
||||||
|
|
||||||
|
# Fix missing defines:
|
||||||
|
patch -Np1 -i ../patches/igt-gpu-tools-mlfs/define-PAGE_SIZE.patch
|
||||||
|
patch -Np1 -i ../patches/igt-gpu-tools-mlfs/define-PATH_MAX.patch
|
||||||
|
|
||||||
|
# Fix typo
|
||||||
|
patch -Np1 -i ../patches/igt-gpu-tools-mlfs/fix-benchmark.patch
|
||||||
|
|
||||||
mkdir BUILD && cd BUILD &&
|
mkdir BUILD && cd BUILD &&
|
||||||
meson --prefix=/usr \
|
meson --prefix=/usr \
|
||||||
-Dvalgrind=disabled \
|
-Dvalgrind=disabled \
|
||||||
-Db_ndebug=false \
|
-Db_ndebug=false \
|
||||||
-Db_lto=false \
|
-Db_lto=false ..
|
||||||
-Dbuild_tests=disabled \
|
|
||||||
-Dbuild_runner=disabled ..
|
|
||||||
|
|
||||||
read -p "Compile?" && ninja -j2 &&
|
read -p "Compile?" && ninja -j2 &&
|
||||||
|
|
||||||
@ -48,5 +59,5 @@ igt-gpu-tools:
|
|||||||
igt-gpu-tools:
|
igt-gpu-tools:
|
||||||
EOF
|
EOF
|
||||||
sudo -S mv -v /tmp/slack-desc install/ &&
|
sudo -S mv -v /tmp/slack-desc install/ &&
|
||||||
sudo -S makepkg -l y -c n $PKGS/igt-gpu-tools-1.25-$(uname -m)-mlfs.txz &&
|
sudo -S makepkg -l y -c n $PKGS/igt-gpu-tools-1.26-$(uname -m)-mlfs.txz &&
|
||||||
sudo -S rm -rf ${BUILD}/*
|
sudo -S rm -rf ${BUILD}/*
|
||||||
|
@ -1,66 +0,0 @@
|
|||||||
Portability: run shell scripts with #!/bin/sh
|
|
||||||
---
|
|
||||||
--- a/tests/ddx_intel_after_fbdev
|
|
||||||
+++ b/tests/ddx_intel_after_fbdev
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-#!/bin/bash
|
|
||||||
+#!/bin/sh
|
|
||||||
#
|
|
||||||
# Testcase: Load Intel DDX after fbdev was loaded
|
|
||||||
#
|
|
||||||
--- a/tests/igt_command_line.sh
|
|
||||||
+++ b/tests/igt_command_line.sh
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-#!/bin/bash
|
|
||||||
+#!/bin/sh
|
|
||||||
#
|
|
||||||
# Copyright © 2014 Intel Corporation
|
|
||||||
#
|
|
||||||
--- a/tests/generate_testlist.sh
|
|
||||||
+++ b/tests/generate_testlist.sh
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-#!/bin/bash
|
|
||||||
+#!/bin/sh
|
|
||||||
|
|
||||||
OUTPUT=$1
|
|
||||||
shift
|
|
||||||
--- a/scripts/generate_clear_kernel.sh
|
|
||||||
+++ b/scripts/generate_clear_kernel.sh
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-#!/bin/bash
|
|
||||||
+#!/bin/sh
|
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
#
|
|
||||||
--- a/scripts/who.sh
|
|
||||||
+++ b/scripts/who.sh
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-#!/bin/bash
|
|
||||||
+#!/bin/sh
|
|
||||||
#
|
|
||||||
# usage: sudo who.sh
|
|
||||||
#
|
|
||||||
--- a/scripts/run-tests.sh
|
|
||||||
+++ b/scripts/run-tests.sh
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-#!/bin/bash
|
|
||||||
+#!/bin/sh
|
|
||||||
#
|
|
||||||
# Copyright © 2014 Intel Corporation
|
|
||||||
#
|
|
||||||
--- a/meson.sh
|
|
||||||
+++ b/meson.sh
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-#!/bin/bash
|
|
||||||
+#!/bin/sh
|
|
||||||
|
|
||||||
cat > Makefile <<EOF
|
|
||||||
|
|
||||||
--- a/man/rst2man.sh
|
|
||||||
+++ b/man/rst2man.sh
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-#!/bin/bash
|
|
||||||
+#!/bin/sh
|
|
||||||
|
|
||||||
rst2man=$1
|
|
||||||
input=$2
|
|
36
patches/igt-gpu-tools-alpine/fix-meson.patch
Normal file
36
patches/igt-gpu-tools-alpine/fix-meson.patch
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
From 963917a3565466832a3b2fc22e9285d34a0bf944 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Petri Latvala <petri.latvala@intel.com>
|
||||||
|
Date: Thu, 28 Oct 2021 11:05:31 +0300
|
||||||
|
Subject: [PATCH] lib/meson.build: Fix underscorify call
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
f.underscorify() is correct, f.underscorify(f) is an error that later
|
||||||
|
meson versions don't like at all.
|
||||||
|
|
||||||
|
Closes: https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/issues/107
|
||||||
|
Fixes: 588555f77909 ("lib/i915: Extract helpers for determining scheduler capabilities")
|
||||||
|
Cc: Arkadiusz Hiler <arek@hiler.eu>
|
||||||
|
Signed-off-by: Petri Latvala <petri.latvala@intel.com>
|
||||||
|
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
|
||||||
|
---
|
||||||
|
lib/meson.build | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/lib/meson.build b/lib/meson.build
|
||||||
|
index c3080fc8..297b0ad2 100644
|
||||||
|
--- a/lib/meson.build
|
||||||
|
+++ b/lib/meson.build
|
||||||
|
@@ -155,7 +155,7 @@ lib_version = vcs_tag(input : 'version.h.in', output : 'version.h',
|
||||||
|
|
||||||
|
lib_intermediates = []
|
||||||
|
foreach f: lib_sources
|
||||||
|
- name = f.underscorify(f)
|
||||||
|
+ name = f.underscorify()
|
||||||
|
lib = static_library('igt-' + name,
|
||||||
|
[ f, lib_version ],
|
||||||
|
include_directories: inc,
|
||||||
|
--
|
||||||
|
GitLab
|
||||||
|
|
11
patches/igt-gpu-tools-mlfs/define-PAGE_SIZE.patch
Normal file
11
patches/igt-gpu-tools-mlfs/define-PAGE_SIZE.patch
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
--- igt-gpu-tools-igt-gpu-tools-1.26.orig/tests/kms_atomic.c 2021-04-23 05:38:04.000000000 -0500
|
||||||
|
+++ igt-gpu-tools-igt-gpu-tools-1.26/tests/kms_atomic.c 2022-02-14 12:40:10.199982430 -0600
|
||||||
|
@@ -54,6 +54,8 @@
|
||||||
|
#define DRM_CAP_CURSOR_HEIGHT 0x9
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+#define PAGE_SIZE 4096
|
||||||
|
+
|
||||||
|
IGT_TEST_DESCRIPTION("Test atomic modesetting API");
|
||||||
|
|
||||||
|
enum kms_atomic_check_relax {
|
22
patches/igt-gpu-tools-mlfs/define-PATH_MAX.patch
Normal file
22
patches/igt-gpu-tools-mlfs/define-PATH_MAX.patch
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
--- igt-gpu-tools-igt-gpu-tools-1.26.orig/tests/i915/i915_pm_rpm.c 2021-04-23 05:38:04.000000000 -0500
|
||||||
|
+++ igt-gpu-tools-igt-gpu-tools-1.26/tests/i915/i915_pm_rpm.c 2022-02-14 12:38:22.924980562 -0600
|
||||||
|
@@ -61,6 +61,8 @@
|
||||||
|
#define MAX_ENCODERS 32
|
||||||
|
#define MAX_CRTCS 16
|
||||||
|
|
||||||
|
+#define PATH_MAX 1024
|
||||||
|
+
|
||||||
|
enum pc8_status {
|
||||||
|
PC8_ENABLED,
|
||||||
|
PC8_DISABLED
|
||||||
|
--- igt-gpu-tools-igt-gpu-tools-1.26.orig/lib/igt_eld.c 2021-04-23 05:38:04.000000000 -0500
|
||||||
|
+++ igt-gpu-tools-igt-gpu-tools-1.26/lib/igt_eld.c 2022-02-14 12:41:16.467983584 -0600
|
||||||
|
@@ -38,6 +38,8 @@
|
||||||
|
#define ELD_PREFIX "eld#"
|
||||||
|
#define ELD_DELIM " \t"
|
||||||
|
|
||||||
|
+#define PATH_MAX 1024
|
||||||
|
+
|
||||||
|
/**
|
||||||
|
* EDID-Like Data (ELD) is metadata parsed and exposed by ALSA for HDMI and
|
||||||
|
* DisplayPort connectors supporting audio. This includes the monitor name and
|
24
patches/igt-gpu-tools-mlfs/fix-benchmark.patch
Normal file
24
patches/igt-gpu-tools-mlfs/fix-benchmark.patch
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
--- igt-gpu-tools-igt-gpu-tools-1.26.orig/benchmarks/gem_exec_tracer.c 2021-04-23 05:38:04.000000000 -0500
|
||||||
|
+++ igt-gpu-tools-igt-gpu-tools-1.26/benchmarks/gem_exec_tracer.c 2022-02-14 12:37:24.086979537 -0600
|
||||||
|
@@ -266,11 +266,8 @@
|
||||||
|
return strcmp(name, "i915") == 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
-#define LOCAL_IOCTL_I915_GEM_EXECBUFFER2_WR \
|
||||||
|
- DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_EXECBUFFER2, struct drm_i915_gem_execbuffer2)
|
||||||
|
-
|
||||||
|
int
|
||||||
|
-ioctl(int fd, unsigned long request, ...)
|
||||||
|
+ioctl(int fd, int request, ...)
|
||||||
|
{
|
||||||
|
struct trace *t, **p;
|
||||||
|
va_list args;
|
||||||
|
@@ -327,7 +324,7 @@
|
||||||
|
|
||||||
|
switch (request) {
|
||||||
|
case DRM_IOCTL_I915_GEM_EXECBUFFER2:
|
||||||
|
- case LOCAL_IOCTL_I915_GEM_EXECBUFFER2_WR:
|
||||||
|
+ case DRM_IOCTL_I915_GEM_EXECBUFFER2_WR:
|
||||||
|
trace_exec(t, argp);
|
||||||
|
break;
|
||||||
|
|
@ -1,183 +0,0 @@
|
|||||||
diff --git benchmarks/gem_syslatency.c benchmarks/gem_syslatency.c
|
|
||||||
index 7671dc4..3ac9544 100644
|
|
||||||
--- benchmarks/gem_syslatency.c
|
|
||||||
+++ benchmarks/gem_syslatency.c
|
|
||||||
@@ -44,7 +44,11 @@
|
|
||||||
|
|
||||||
#include <linux/unistd.h>
|
|
||||||
|
|
||||||
-#define sigev_notify_thread_id _sigev_un._tid
|
|
||||||
+#ifndef __GLIBC__
|
|
||||||
+#include "signal_compat.h"
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
+#define sigev_notify_thread_id sigev_notify_function
|
|
||||||
|
|
||||||
static volatile int done;
|
|
||||||
|
|
||||||
diff --git lib/igt_aux.c lib/igt_aux.c
|
|
||||||
index 578f857..3e98cf0 100644
|
|
||||||
--- lib/igt_aux.c
|
|
||||||
+++ lib/igt_aux.c
|
|
||||||
@@ -31,6 +31,7 @@
|
|
||||||
#endif
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
+#include <limits.h> // PATH_MAX
|
|
||||||
#include <sys/stat.h>
|
|
||||||
#include <sys/ioctl.h>
|
|
||||||
#include <string.h>
|
|
||||||
@@ -73,6 +74,12 @@
|
|
||||||
#include <libgen.h> /* for dirname() */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
+#ifndef __GLIBC__
|
|
||||||
+#include "signal_compat.h"
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
+//#include <asm-generic/siginfo.h>
|
|
||||||
+
|
|
||||||
/**
|
|
||||||
* SECTION:igt_aux
|
|
||||||
* @short_description: Auxiliary libraries and support functions
|
|
||||||
diff --git lib/igt_aux.h lib/igt_aux.h
|
|
||||||
index 04d2290..a0ada9e 100644
|
|
||||||
--- lib/igt_aux.h
|
|
||||||
+++ lib/igt_aux.h
|
|
||||||
@@ -46,7 +46,7 @@
|
|
||||||
# define gettid() (pid_t)(syscall(__NR_gettid))
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
-#define sigev_notify_thread_id _sigev_un._tid
|
|
||||||
+#define sigev_notify_thread_id sigev_notify_function
|
|
||||||
|
|
||||||
/* auxialiary igt helpers from igt_aux.c */
|
|
||||||
/* generally useful helpers */
|
|
||||||
diff --git lib/igt_eld.c lib/igt_eld.c
|
|
||||||
index 3d7fd4d..d51774b 100644
|
|
||||||
--- lib/igt_eld.c
|
|
||||||
+++ lib/igt_eld.c
|
|
||||||
@@ -29,6 +29,7 @@
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <string.h>
|
|
||||||
+#include <limits.h>
|
|
||||||
|
|
||||||
#include "igt_core.h"
|
|
||||||
#include "igt_eld.h"
|
|
||||||
diff --git lib/igt_halffloat.c lib/igt_halffloat.c
|
|
||||||
index 08ab05f..7d6a6e6 100644
|
|
||||||
--- lib/igt_halffloat.c
|
|
||||||
+++ 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 lib/igt_x86.c lib/igt_x86.c
|
|
||||||
index 6ac700d..ddf5edd 100644
|
|
||||||
--- lib/igt_x86.c
|
|
||||||
+++ 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 lib/signal_compat.h lib/signal_compat.h
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..acae648
|
|
||||||
--- /dev/null
|
|
||||||
+++ lib/signal_compat.h
|
|
||||||
@@ -0,0 +1,4 @@
|
|
||||||
+#define SIGEV_SIGNAL 0 /* notify via signal */
|
|
||||||
+#define SIGEV_NONE 1 /* other notification: meaningless */
|
|
||||||
+#define SIGEV_THREAD 2 /* deliver via thread creation */
|
|
||||||
+#define SIGEV_THREAD_ID 4 /* deliver to thread */
|
|
||||||
diff --git tests/drm_read.c tests/drm_read.c
|
|
||||||
index cfb1c04..18be922 100644
|
|
||||||
--- tests/drm_read.c
|
|
||||||
+++ tests/drm_read.c
|
|
||||||
@@ -220,7 +220,7 @@ static void test_short_buffer_wakeup(int in, enum pipe pipe)
|
|
||||||
pthread_mutex_unlock(&w.mutex);
|
|
||||||
|
|
||||||
/* Give each thread a chance to sleep in drm_read() */
|
|
||||||
- pthread_yield();
|
|
||||||
+ sched_yield();
|
|
||||||
|
|
||||||
/* One event should wake all threads as none consume */
|
|
||||||
generate_event(w.fd, pipe);
|
|
||||||
diff --git tests/kms_hdmi_inject.c tests/kms_hdmi_inject.c
|
|
||||||
index 8c0d133..f272418 100644
|
|
||||||
--- tests/kms_hdmi_inject.c
|
|
||||||
+++ tests/kms_hdmi_inject.c
|
|
||||||
@@ -25,7 +25,7 @@
|
|
||||||
#include "config.h"
|
|
||||||
|
|
||||||
#include <dirent.h>
|
|
||||||
-
|
|
||||||
+#include <limits.h>
|
|
||||||
#include "igt.h"
|
|
||||||
#include "igt_edid.h"
|
|
||||||
#include "igt_eld.h"
|
|
||||||
diff --git tests/kms_sysfs_edid_timing.c tests/kms_sysfs_edid_timing.c
|
|
||||||
index 1201388..e75c7e9 100644
|
|
||||||
--- tests/kms_sysfs_edid_timing.c
|
|
||||||
+++ tests/kms_sysfs_edid_timing.c
|
|
||||||
@@ -24,6 +24,7 @@
|
|
||||||
|
|
||||||
#include <dirent.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
+#include <limits.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
|
|
||||||
#define THRESHOLD_PER_CONNECTOR 10
|
|
||||||
diff --git tests/i915/gem_close_race.c tests/i915/gem_close_race.c
|
|
||||||
index 57e0048..ad5f504 100644
|
|
||||||
--- tests/i915/gem_close_race.c
|
|
||||||
+++ tests/i915/gem_close_race.c
|
|
||||||
@@ -51,7 +51,11 @@
|
|
||||||
static uint32_t devid;
|
|
||||||
static bool has_64bit_relocations;
|
|
||||||
|
|
||||||
-#define sigev_notify_thread_id _sigev_un._tid
|
|
||||||
+#ifndef __GLIBC__
|
|
||||||
+#include "signal_compat.h"
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
+#define sigev_notify_thread_id sigev_notify_function
|
|
||||||
|
|
||||||
static void selfcopy(int fd, uint32_t handle, int loops)
|
|
||||||
{
|
|
||||||
diff --git tests/i915/i915_pm_rpm.c tests/i915/i915_pm_rpm.c
|
|
||||||
index e2c7ba2..08e44b7 100644
|
|
||||||
--- tests/i915/i915_pm_rpm.c
|
|
||||||
+++ tests/i915/i915_pm_rpm.c
|
|
||||||
@@ -36,6 +36,7 @@
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <dirent.h>
|
|
||||||
+#include <limits.h>
|
|
||||||
#include <sys/ioctl.h>
|
|
||||||
#include <sys/mman.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
diff --git tests/panfrost_submit.c tests/panfrost_submit.c
|
|
||||||
index 13ce85b..ceb2e6d 100644
|
|
||||||
--- tests/panfrost_submit.c
|
|
||||||
+++ tests/panfrost_submit.c
|
|
||||||
@@ -68,7 +68,7 @@ static void check_error(int fd, struct panfrost_submit *submit)
|
|
||||||
static void check_fb(int fd, struct panfrost_bo *bo)
|
|
||||||
{
|
|
||||||
int gpu_prod_id = igt_panfrost_get_param(fd, DRM_PANFROST_PARAM_GPU_PROD_ID);
|
|
||||||
- __uint32_t *fbo;
|
|
||||||
+ uint32_t *fbo;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
fbo = bo->map;
|
|
Reference in New Issue
Block a user