Age | Commit message (Collapse) | Author |
|
Probe for and make an API available for tests to use f16c intrinsics to
generate needed fp16 pixel data.
Also import a pure c fp32 <-> fp16 conversion implementation from Mesa
18.3.4, which will act as a fallback when f16c is unavailable.
rfc2:
- Change API to reduce number of function calls (Maarten)
v1:
- Move pragma so AVX code isn't emitted for fallbacks (Ville)
- Change edx to ecx (Ville)
Signed-off-by: Kevin Strasser <kevin.strasser@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
For the purposes of testing different EDID features, we need to generate more
and more complex EDID blobs (e.g. with audio support). However currently IGT
uses a macro-based system to generate EDIDs. This doesn't scale well and is
pretty inflexible.
This commit introduces a new little library to generate EDIDs. For now it can't
do more than the old macro. Future commits will extend the API.
The structures are mostly based on the Linux kernel code (drm_edid.h). Setters
have been added for convenience.
Signed-off-by: Simon Ser <simon.ser@intel.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
|
|
The kmstest_dumb_create API isn't suitable for creating multi-planar
buffers since it tries to calculate the size based on the first plane's
pitch only.
AMDGPU requires that the luma pitch be aligned to 256 for YUV buffers
which results in crashes on kms_plane@pixel-format-pipe-*-planes tests
when using kmstest_dumb_create since the buffer returned is smaller than
needed (16384 size returned, 24576 size required).
Create and map the buffer with the correct size by using the AMD helpers
introduced by this patch: igt_amd_create_bo and igt_amd_mmap_bo.
Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Leo Li <sunpeng.li@amd.com>
|
|
Read the RAPL power metrics courtesy of perf. Or your local HW
equivalent?
v2: uselocale()
v3: Use gpu_power_s(), gpu_power_J(), gpu_power_W() to try and make the
scale factors self-consistent.
v4: Use igt_sysfs
v5: s/tN/sampleN/
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
|
|
Move all mmap flavours and support function to separate file in i915
folder. This helps with moving i915 specific functions away from common
libraries.
v2:
- Autotools still exists. (Petri)
- Include gem_mman.h directly. (Chris)
v3:
- Keep includes explicit. (Chris)
Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Petri Latvala <petri.latvala@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
With recent changes to the igt_fb code, VC4 support is now integrated
in common helpers. As a result, VC4 helpers have to be built as part
of the library.
This is already the case with meson, but VC4 support was removed from
autotools. Bring it back unconditionally to match meson behaviour.
This fixes a build error with autotools.
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
|
|
Just a few little ioctl wrappers that v3d tests will use.
v2: Move the struct above the prototypes.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Petri Latvala <petri.latvala@intel.com> (v1)
|
|
Add rendercopy implementation for gen4/5. Basic structure
copied from the gen6 implementation, and the gen4/5 specific
bits were mostly lifted from sna.
v2: Renamed registers definitions, which are GEN4 specific
to include that prefix (Lukasz)
v3: Rebase and checkpatch
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Lukasz Kalamarz <lukasz.kalamarz@intel.com>
Cc: Katarzyna Dec <katarzyna.dec@intel.com>
Cc: Antonio Argenziano <antonio.argenziano@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com>
|
|
kms_frontbuffer_tracking and kms_psr test PSR in different ways, let'
fix that by creating common library functions.
v2: Include the new file in meson.build
v3: Leave --no-psr intact (Rodrigo)
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
|
|
In several header files surface formats definitions were
duplicated. To decrease amount of duplicated code in igt
new lib was created.
v2: Drop GEN_ from registers definition
Signed-off-by: Lukasz Kalamarz <lukasz.kalamarz@intel.com>
Cc: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com>
|
|
Add some helpers for generating rgb<->ycbcr conversion matrices.
v2: Add enums for color_encoding/color_range
Fix full range handling (lacked +-0.5<->+-1.0 scaling)
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Add a helper library for basic matrix math.
v2: Make the identity matrix static const (Chris)
Add the m(row,col) macro (Chris)
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Let's create common media_fill library, similarly as for gpgpu_fill.
This will allow to make code easier to read and maintain.
Moreover we can create generic __gen9_media_fillfunc for future gens.
>From gen9 media fillfunctions differ only with kernel parameter.
v2: fixed indentations in files
v3: Added missing copyright headers. Made __gen9_media_fillfunc static.
Removed gen9 kernel (the same as for gen8).
v4: rebase
Signed-off-by: Katarzyna Dec <katarzyna.dec@intel.com>
Cc: Lukasz Kalamarz <lukasz.kalamarz@intel.com>
Cc: Antonio Argenziano <antonio.argenziano@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Ewelina Musial <ewelina.musial@intel.com>
Reviewed-by: Lukasz Kalamarz <lukasz.kalamarz@intel.com>
|
|
After refactoring media_spin library - gpu_fill contains helper
functions for render copy, *_fill functions and media_spin.
Let's rename this library to gpu_cmds. This name will be more
general.
v2: changed name from gpu_helpers to gpu_cmds
Signed-off-by: Katarzyna Dec <katarzyna.dec@intel.com>
Cc: Lukasz Kalamarz <lukasz.kalamarz@intel.com>
Cc: Antonio Argenziano <antonio.argenziano@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
|
|
After moving all functions needed for gpgpu and media fill testing
there is a lot of duplications which can be removed:
Library media_fill_gen8 and media_fill_gen8lp for CHT was removed,
media state flush for !CHT was added to gen7_emit_media_objects.
Many gen8 functions were replaced with gen7 version with devid
parameter (gen7_fill_curbe_load, gen7_emit_interface_descriptor,
gen7_fill_binding_table, gen7_emit_media_objects). Unified fill kernel
function so it is applicable to all gens and both media and gpgpu
(merged gen7_fill_media_kernel and gen8_fill_media_kernel).
Duplicated constants like GEN8_MEDIA_VFE_STATE, GEN8_MEDIA_CURBE_LOAD,
GEN8_MEDIA_INTERFACE_DESCRIPTOR_LOAD, GEN8_MEDIA_OBJECT were
replaced by GEN7 version. However this constants were not removed
from gen8_media.h library, because they are used by other tests
for Gen8+. More refactoring in this gen*_media.h libraries is needed.
It seems that further unification of *_fillfunc functions will
introduce more confusion in understanding what the tests are doing
and what were changes between Gens.
v2: Moved some reduntant changes from Move gpgpu/media fill to gpu_fill...
to this patch. Applied comments from review.
v3: rebase
Signed-off-by: Katarzyna Dec <katarzyna.dec@intel.com>
Cc: Lukasz Kalamarz <lukasz.kalamarz@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Reviewed-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com>
|
|
Gpgpu_fill and media_fill libraries are very similar and many
functions can be shared. I have created library gpu_fill with
all functions needed for implementing gpgpu_fill and media_fill
tests for all Gens. For reviewing and debugging purposes this patch
should be only moving functions from few libraries to one removing
functions identical for both media and gpgpu.
Places in the code that required more changes:
Removing gen7_fill_gpgpu_kernel function that is identical to
gen7_fill_media_kernel and introduces conflict with moving
genX_fill_interface_descriptor, which are the same for media and gpgpu.
Function gen8_fill_media_kernel is not removed in this patch
(although it is identical with gen7 version), because this patch
should be as much as possible functions movement.
gen8_fill_interface_descriptor was unified for media and gpgpu
by adding kernel and its size as a parameter (this parameters
were missing in media gen8, gen8lp and gen9 functions)
gen8_emit_state_base_address was unified, the one for gpgpu was
configured like it would be using indirect state (while we are
using CURBE). I have checked that media fill version
(OUT_BATCH(0 | BASE_ADDRESS_MODIFY)) works fine on gpgpu gen8 and newer.
v2: Changed code layout. GenX_fill_media_kernel was identical to
genX_fill_gpgpu_kernel so this function was unified to
gen7_fill_kernel. There were 2 very similar functions
gen8_emit_state_base_address for media and gpgpu, where the one
for gpgpu was configured like it would be using indirect state
(while we are using CURBE). I have checked if media fill version
works fine in gpgpu test on Gen8 and unified them.
v3: Made patch easier for reviewing moving changes unifying code for
various gens (that were included v1) to other patch, leaving only
the most critical code changes.
v5: Added copyrights and #ifndef to gpu_fill.h
v5: Added copyrights to gpu_fill.c
Signed-off-by: Katarzyna Dec <katarzyna.dec@intel.com>
Cc: Lukasz Kalamarz <lukasz.kalamarz@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Reviewed-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com>
|
|
CPU hotplug, especially CPU0, can be flaky on commodity hardware.
To improve test reliability and reponse times when testing larger runs we
need to handle those cases better.
Handle failures to off-line a CPU by immediately skipping the test, and
failures to on-line a CPU by immediately rebooting the machine.
This patch includes igt_sysrq_reboot implementation from Chris Wilson.
v2: Halt by default, reboot if env variable IGT_REBOOT_ON_FATAL_ERROR is
set. (Petri Latvala)
v3: Add missign docs and update stale comment. (Petri Latvala)
v4: Use pause instead of sleep. (Chris Wilson)
v5: Newlines! (Chris Wilson)
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Petri Latvala <petri.latvala@intel.com>
Cc: Tomi Sarvela <tomi.p.sarvela@intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
|
|
The logic to measure the ring size is replicated almost identically in
several tests. Adding it as a common function will make the code
cleaner.
The tests are updated in follow up patches.
v2:
- Move into a new file: 'gem_ring'. (Chris)
v3:
- Rename ring measure function. (Chris)
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
It looks like there are some rogue processes running in CI that prevent
DRM_MASTER from being obtained. Dump the list of clients on failure to
make it more obvious what is being left behind.
v2: Fix up gtkdocs, meson build
References: https://bugs.freedesktop.org/show_bug.cgi?id=104157
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Error revealed by distcheck.
Fixes: 539a86ec6035 ("lib: copy intel_aub.h from libdrm")
Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Cc: Scott D Phillips <scott.d.phillips@intel.com>
Cc: Ben Widawsky <ben@bwidawsk.net>
Cc: Tomi Sarvela <tomi.p.sarvela@intel.com>
Reviewed-by: Scott D Phillips <scott.d.phillips@intel.com>
|
|
Since I accidentally broke the build for some, by putting the pretty
printer for submission inside ifdef HAVE_PROCPS, it's time to move the
whole thing into lib/i915 while fixing this mistake.
Let's also rename the pretty printer and add a doc to it as well as the
section.
Fixes: f6dfe556659f ("lib: Extract helpers for determining submission method")
Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
We'd like to make ioctl_wrappers a bit thinner, and we plan to add new
helpers in the following patch. Let's move context related helpers before
adding more content.
Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Katarzyna Dec <katarzyna.dec@intel.com>
Cc: Petri Latvala <petri.latvala@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com>
Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
|
|
Couple of tests are using either determining scheduler capabilities or
pretty printing. Let's move those to helpers in lib. We can also keep
the value obtained from getparam static.
v2: Break the trend of expanding ioctl_wrappers
Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Katarzyna Dec <katarzyna.dec@intel.com>
Cc: Petri Latvala <petri.latvala@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com>
Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
|
|
[airlied: added some initial gtk-doc for the helper library.]
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
|
|
In commit ebd6eb69f57b ("Make igtrc configuration common, with
configurable suspend/resume delay") .igtrc handling was moved to
igt_core from igt_chamelium. That made everything in IGT depend on
GLIB by accident.
In short, igt_core.h declared a variable of type GKeyFile*, requiring
glib.h. Everything that tried to #include igt_core.h required glib.h
to be available, by use of GLIB_CFLAGS. This "worked" so far because
CAIRO_CFLAGS contained GLIB_CFLAGS.
As the variable is only used by other stuff in lib/, stuff it in its
own header file to leave igt_core.h without a dependency to glib.h.
Also add a couple of missing #ifdef HAVE_GLIBs around.
Reported-by: Felipe De Jesus Ruiz Garcia <felipe.de.jesus.ruiz.garcia@intel.com>
Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
|
|
This adds support for analog frame comparison check, as used in VGA.
Since VGA uses a DAC-ADC chain, its data cannot be expected to be pixel
perfect. Thus, it is impossible to uses a CRC check and full frames have
to be analyzed instead. Such an analysis is implemented, based on both
an absolute error threshold and a correlation with the expected error
trend for a DAC-ADC chain. It was tested with a couple encoders and
provides reliable error detection with few false positives.
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@linux.intel.com>
Reviewed-by: Lyude <lyude@redhat.com>
|
|
This introduces a common FrameDumpPath configuration field, as well as
helper functions in dedicated igt_frame for writing cairo surfaces
to png files.
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@linux.intel.com>
Reviewed-by: Lyude <lyude@redhat.com>
|
|
Makefile.sources are included 1:1 in Android.mk files, and are not
parsed by automake. And yet those had some automake conditional logic.
Moving it to .am file is enough for now.
Also igt_chamelium.h included config.h without proper "HAVE_CONFIG_H"
guard, and the file itself was included unconditionally.
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
|
|
This reverts commit 5ca0da9f53023b9fcfd327a5f43bc7b0916b24b1.
|
|
Copied as of commit
commit 496b575e3ccbf6fbe57a674c721af43dc8826361
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Mon Feb 13 17:15:58 2017 +0000
drm/i915: Add initial selftests for hang detection and resets
The headers are used to enumerate available tests when the running
kernel does not support selftests.
v2: Also add them to Makefile.sources
Signed-off-by: Petri Latvala <petri.latvala@intel.com>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
For the purpose of testing things such as hotplugging and bad monitors,
the ChromeOS team ended up designing a neat little device known as the
Chamelium. More information on this can be found here:
https://www.chromium.org/chromium-os/testing/chamelium
This adds support for a couple of things to intel-gpu-tools:
- igt library functions for connecting to udev and monitoring it for
hotplug events, loosely based off of the unfinished hotplugging
implementation in testdisplay
- Library functions for controlling the chamelium in tests using
xmlrpc. A couple of RPC calls were ommitted here, mainly because they
didn't seem very useful for our needs (yet)
- A set of functions for doing CRC checks and frame comparisons in
tests
- A set of basic tests using the Chamelium library.
Cc: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Signed-off-by: Lyude <lyude@redhat.com>
Changes since v1:
- Don't try to guess connector mappings, have the user specify them
manually using a configuration file
- Open DRM fd using DRIVER_ANY, not DRIVER_INTEL
- Lower the hotplug timeout a little bit, since 30 seconds was leftover
from debugging these tests anyway
- Don't try to keep track of the original state of the chamelium ports,
and just leave them plugged in after each run. This makes more sense
to me, since I'd imagine in automated testing setups using chameliums
that all of the extra monitors will probably be provided by the
Chamelium to begin with, so keeping them plugged in would make sure
tests running afterwards that require >1 monitor don't get skipped.
- Add wait_for_connector() to the chamelium tests. After some more
testing, I found that depending on the system some tests would throw
false negatives due to us not waiting long enough for the system to
detect that we connected something to it. This mainly happened with
VGA connectors, since their lack of HPD makes them take significantly
longer for the hardware to notice. wait_for_connector() fixes this by
continually reprobing the status of the desired connector (without
relying on a hpd event happening, since that might never come) until
we get what we want, or we time out and fail.
- Use kmstest_get_property() for retrieving EDIDs instead of doing it by
hand
- Don't hardcode PIPE_A for bringing up the display, use kmstest to find
an appropriate CRTC to use.
Changes since v2:
- Fix incorrect usage of the list helpers when recording new EDIDs
- Add missing documentation
- Make sure documentation actually appears
- Since we finally got video capture working, add CRC functions and fix
the ones we couldn't actually test before
- In the exit handler, reset the xmlrpc env so we can properly reset the
Chamelium even after an RPC error
- Make sure compiling without Chamelium support still works
Changes since v3:
- Change the config file name from .igt_chamelium_rc to .igtrc
- Remove chamelium global context
- Get rid of define_common_connector_tests()
- Get rid of connector list, expose connectors as opaque objects and
provide helpers for accessing their attributes
- Get rid of configure.ac option for Chamelium
- Add tests for CRC functions
- Add frame dumping functions + tests
- Add FSM handling to chamelium_rpc()
- Use LIBUDEV_LIBS in automake, not UDEV_LIBS
- Documentation fixes
- Improve debugging output some more
- Remove skip_without_suspend_support, we no longer need to check for
suspend support before calling things
- Remove unnessecary malloc() checks with igt_assert()
- Don't use igt_require in chamelium_init, leave it up to the caller
whether or not to abort when failing to initialize the chamelium
- Use igt_assert_eq for making assertions about connector's statuses
- Define suspend/resume delay for tests as constant
|
|
Base functions to help testing the Sync File Framework (explicit fencing
mechanism ported from Android).
These functions allow you to create, use and destroy timelines and fences.
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
|
|
helpers.
lib/igt_aux: Added igt_pkill and igt_lsof helper.
lib/igt_kmod: Added load/unload kmod helpers.
v7:
- document the case where leaving stray fd from drm_open_driver()
might fail reloading the driver.
- list also current opened files from /dev/dri in case we could not
unload the driver.
- convert igt_info to igt_warn (Chris Wilson)
- added KMOD_|PROCPS CFLAGS (Chris Wilson)
v6:
- include latest modifications from tests/drv_module_reload:
display all loaded modules and list information about opened
files by processes (Petri Latvala)
v5:
- added igt_i915_driver_{load/unload}.
- added kick_snd_hda_intel() to match current
tests/drv_module_reload_basic and integrated into
igt_i915_driver_load/unload.
- added gtk-doc section for lib/igt_kmod
v4:
- decided to split libkmod helpers into their own file as there's
another user lib/igt_gvt or tests/gvt_basic.
- fixed some gtk-doc documentation.
v3:
- return -errno (igt_pkill()) in case of failure (Cris Wilson)
- return bool for igt_kmod_is_loaded(), replaced strncasecmp with strncmp
(Chris Wilson)
v2:
- Renamed libkmod helpers (Chris Wilson)
- Removed SIGTERM/SIGKILL case where we repeatedly tried to terminate the
process: just call kill(2) once (Chris Wilson)
- Removed redundant check in igt_kmod_unload(), igt_module_in_use() (Chris
Wilson)
- Pass flags to igt_kmod_unload() from the caller (Chris Wilson)
- Removed useless function igt_kill() which acts just as kill(2) (Chris
Wilson)
Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
|
|
A lot of igt testcases need some GPU workload to make sure a race
window is big enough. Unfortunately having a fixed amount of
workload leads to spurious test failures or overly long runtimes
on some fast/slow platforms. This library contains functionality
to submit GPU workloads that should consume exactly a specific
amount of time.
Since v14: Since we are using multiple signals, walk list of batches
to terminate a batch to avoid using a single global batch. Cycle signals
between SIGRTMIN and SIGRTMAX properly.
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: tomeu@tomeuvizoso.net
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
|
|
Not as automagic as kbuild :(
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Primes are useful as input sources since they should not fall into any
patterns that may be optimised by the drivers.
An example of use this in a test driver:
uint32_t seqno, inc, count;
seqno = inc = count = 0;
do {
inc = igt_next_prime_number(inc);
if (seqno + inc < seqno)
break;
seqno += inc;
/* igt_assert_eq(test_inc(inc), seqno); */
count++;
} while (1);
printf("count=%u, seqno=%u, last=%u\n", count, seqno, inc);
and prints "count=27878, seqno=4294845817, last=323381", or for simply
generating the set of the first N prime numbers, use
for_each_prime_number(prime, 100)
printf("%lu ", prime);
which prints
1 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 64 67 71 73 79 83 89
97 101 103 107 109 113 127 131 137 139 149 151 157 163 167 173 179 181
191 193 197 199 211 223 227 229 233 239 241 251 257 263 269 271 277 281
283 293 307 311 313 317 331 337 347 349 353 359 367 373 379 383 389 397
401 409 419 421 431 433 439 443 449 457 461 463 467 479 487 491 499 503
509 521
Note that 1 is included in the set of prime numbers for convenience
above. Mathematicians beware!
The set of primes is computed using the Sieve of Eratosthenes, which
basically just keeps a list of all multiples - any number not in list is
therefore prime. As a bitmask of all integers is kept, it can be quite
memory intensive for very large primes. A fallback to "trial division"
is available just in case, but for large primes that is much slower.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Replace the automake specific variable names for listings in Makefile.sources
with something not automake specific.
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Since all the batches start with the same content, we can reuse the same
buf to fill them.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Several years ago we made the plan of only having one canonical source
for i915_pciids.h, the kernel and everyone importing their definitions
from that. For consistency, we style the intel_device_info after the
kernel, most notably using a generation mask and a per-codename bitfield.
This first step converts looking up the generation for a devid tree from
a massive if(devid)-chain to a (cached) table lookup.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
We don't do anything yet other than try to load the module. Initial
sanity checks to come.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Zhi Wang <zhi.a.wang@intel.com>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
igt_sysfs_set() for setting an attribute via sysfs, igt_sysfs_get() for
reading.
v2: Lots of little bugs in igt_sysfs_get()
v3: Pass device to open, stop assuming Intel rules.
v4: Test opening and reading!
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Move power management related code to a separate library.
Initially this is done only for workarounds that apply to external
components. Modify the users of such workarounds accordingly.
This currently involves HD audio and SATA link power management.
For SATA link PM there's also code to save the previous settings,
to allow for resetting the values after we've finished testing.
Signed-off-by: David Weinehall <david.weinehall@intel.com>
Reviewed-by: Marius Vlad <marius.c.vlad@intel.com>
Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
|
|
Added extended wildcard support when specifying --run-subtest.
Wildcard format is as specified in rfc3977 and the uwildmat() implementation
is taken from libinn.
See https://tools.ietf.org/html/rfc3977#section-4 for a description of
allowed wildcard expressions.
v2: Use comma as list separator (Ville Syrjala)
support both ^ and ! as not operators (Dave Gordon)
v3: Updated to use uwildmat() (Dave Gordon)
Signed-off-by: Derek Morton <derek.j.morton@intel.com>
[danvet: Fixup whitespace. Add #include <stdint.h>. Run lint.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Unbreaks compilation fail.
Also appease gcc in gem_exec_basic because.
Cc: Eric Anholt <eric@anholt.net>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
v2: Use do_ioctl().
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Daniel Stone <daniels@collabora.com>
|
|
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|