Age | Commit message (Collapse) | Author |
|
[Why]
Mediatek devices have a HW issue with sending their vblank IRQ at the same time interval
everytime. The drift can be below or above the expected frame time, causing the
timestamp to drift with a relatively larger standard deviation over a large sample.
[How]
Filter out the flags TEST_CHECK_TS and TEST_VBLANK_EXPIRED_SEQ from the
tests flags, and restrict sequence and ts checks.
Tested on Jacuzzi (MT8183)
Signed-off-by: Mark Yacoub <markyacoub@chromium.org>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
|
|
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
|
|
Add support for MSM drivers.
Signed-off-by: Mark Yacoub <markyacoub@chromium.org>
Reviewed-by: Arkadiusz Hiler <arek@hiler.eu>
|
|
Beneath drm_open_driver() we have a routine that tries to load a module
appropriate for the selected chipset. This can be useful for tests that
want to ensure the right module is loaded prior to starting, without
opening the device itself.
Suggested-by: Petri Latvala <petri.latvala@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Petri Latvala <petri.latvala@intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
|
|
We're finally getting CRC support in nouveau, so let's start testing
this in igt as well! While the normal CRC capture tests are nice,
there's a number of Nvidia-specific hardware characteristics that we
need to test as well.
The most important one is known as a "notifier context flip". Basically,
Nvidia GPUs store generated CRCs in an allocated memory region, referred
to as the notifier context, that the driver programs itself. Strangely,
this region can only hold a limited number of CRC entries, and once it
runs out of available entries the hardware simply sets an overrun bit
and stops writing any new CRC entries.
Since igt-gpu-tools doesn't really have an expectation of only being
able to grab a limited number of CRCs, we work around this in nouveau by
allocating two separate CRC notifier regions each time we start
capturing CRCs, and then flip between them whenever we get close to
filling our currently programmed notifier context. While this keeps the
number of CRC entries we lose to an absolute minimum, we are guaranteed
to lose exactly one CRC entry between context flips. Thus, we add some
tests to ensure that nouveau handles these flips correctly
(pipe-[A-F]-ctx-flip-detection), and that igt itself is also able to
handle them correctly (pipe-[A-F]-ctx-flip-skip-current-frame). Since
these tests use a debugfs interface to manually control the notifier
context flip threshold, we also add one test to ensure that any flip
thresholds we set are cleared after a single CRC capture
(ctx-flip-threshold-reset-after-capture).
In addition, we also add some simple tests to test Nvidia-specific CRC
sources.
Changes since v5:
* Fix typo
Changes since v4:
* Don't clear the currently set display pipe at the end of each iteration of
pipe tests, otherwise we'll accidentally leave ourselves with no configured
CRTCs when the test exits. Instead clear it at the start of each iteration of
pipe tests but only if we just finished testing a different pipe.
* Get rid of outdated comment about test_ctx_flip_detection() being limited to a
single pipe
* Clarify comments describing guarding against CRC collisions in
test_ctx_flip_detection()
* Make a small doc blurb for test_ctx_flip_detection(), it's a rather unusual
and nvidia-specific behavior
* Mention in test_ctx_flip_detection() that we also explicitly check that we've
skipped -exactly- one frame. tl;dr more then one frame is too slow, less then
one frame means a context flip just didn't happen when it should have.
* Also check that the flip threshold we set in
test_ctx_flip_threshold_reset_after_capture() isn't ignored by the driver
* s/(create|destroy)_colors()/\1_crc_colors/g
Changes since v3:
* Update .gitlab-ci.yml to make nouveau exempt from the test-list-diff
test, since all the cool kids are doing it and we don't care about
autotools for nouveau
Changes since v2:
* Fix missing include in tests/nouveau_crc.c, this should fix builds for
aarch64
Changes since v1:
* Fix copyright year in nouveau_crc.c
Reviewed-by: Jeremy Cline <jcline@redhat.com>
Signed-off-by: Lyude Paul <lyude@redhat.com>
|
|
igt_require_gem() is a pecularity of i915/, move it out of the core.
Similar opportunistic move of gem_reopen_driver() and
gem_quiescent_gpu().
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
__drm_open_driver_another(int idx, ...) is a counterpart to
__drm_open_driver(..) with the following changes:
If device filters are provided the idx-th filter is used and the first
matching device is selected.
Consecutive calls to it, with increasing idx (starting from zero) are
guaranteed to return fd of a different /dev/dri/ node than the previous
calls or -1.
Counterparts to other existing drm_open_*() should be introduced in
similar fashion as the need arises.
v2: (Petri)
* try_modprobe if device is not found
* split kms_prime changes into a separate commit
Cc: Petri Latvala <petri.latvala@intel.com>
Cc: Mika Kahola <mika.kahola@intel.com>
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
|
|
New IGT command line argument --device, IGT_DEVICE enviroment and .igtrc
Common::Device were added to allow selecting device using device
selection API. See generated docs for device selection and lsgpu for
more details on filters.
NOTE: IGT_FORCE_DRIVER still works if no filter is selected. We may want
to deprecate it later.
NOTE2: This does not work with tests that open 2 or more devices (e.g.
kms_prime). The core is capable of doing multiple filtering
passes but we need to figure out how we want *open*() functions
to expose this capability.
v2 (Arek):
* remove functions acting on igt_device_card
* use only a single filter
v3 (Arek):
* typos, misspellings (Petri)
* add notes on IGT_FORCE_DRIVER and opening 2 or more devices
Cc: Petri Latvala <petri.latvala@intel.com>
Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
|
|
On GEN12+ the AUX CCS surfaces required by the render and media
compression must be specified by a 3 level page table directory, which
translates the main surface graphics address to the AUX CCS surface
graphics address. For this purpose add support for creating a GEM buffer
to translate the linear surface address range to the linear AUX surface
address range.
The buffers containing the main surface must be pinned down, since the
directory table entry indices depend on the surface address, and they
must be 64kB aligned. The page table can be relocated OTOH, so allow
that and emit the required relocation entries.
v2:
- Make level variables to be 0 based (l1..l3 -> level=0..2).
- Add missing drm_intel_bo_set_softpin_offset() stub to fix build on
non-Intel archs.
- Fix missing offsets in reloc entries of already bound objects. (Chris)
- Randomize pin offsets, to try to avoid eviction. (Chris)
- Remove redundant MI_NOOPS around MI_LOAD_REGISTER_MEM
- Stop using explicit reloc cache domains, as these don't make sense on
GEN12 anyway. (Chris)
- Fix missing autotools support. (Chris)
- s/igt_aux_pgtable/intel_aux_pgtable/, since the functionality is Intel
specific. (Chris)
v3:
- Make sure all objects with an AUX surface are pinned.
v4:
- s/MI_LOAD_REGISTER_MEM/MI_LOAD_REGISTER_MEM_GEN8/ (Chris)
- Fix using buf->bo->size instead of buf->size when finding a free
range for a pinned obj.
- Fix alignment of the reserved space start for a pinned obj.
- Move gen12_emit_aux_pgtable_state() to its logical spot.
v5:
- Fix reloc emit call, passing a relative instead of absolute target
offset. (Chris)
- Fix off-by-one error when generating a random offset for pinned objs.
Cc: Mika Kahola <mika.kahola@intel.com>
Cc: Brian Welty <brian.welty@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
KMS is meant to be a (at least somewhat) generic userspace API. We do
not want nor need to add a special match function for every driver
ever written, that doesn't make sense, defeats the point of having
generic tests for a generic testsuite, and really doesn't scale.
Also add a comment so people don't try to add ever more of these.
Also, this means no autoloading for you, but really igt should
reinvent udev, and mostly this was needed for 2 reasons:
- CI configuration falling to pieces because tests unloaded a driver,
and then died before cleaning up.
- vgem, which is fake, and needs to be requested explictily.
We might want to throw that all out again, except for vgem.
Cc: Liviu Dudau <liviu.dudau@arm.com>
Cc: Deepak Rawat <drawat@vmware.com>
Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Cc: Leo Li <sunpeng.li@amd.com>
Cc: Michał Winiarski <michal.winiarski@intel.com>
Cc: "Ser, Simon" <simon.ser@intel.com>
Cc: Oleg Vasilev <oleg.vasilev@intel.com>
Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Acked-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Simon Ser <simon.ser@intel.com>
Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Acked-by: Petri Latvala <petri.latvala@intel.com>
|
|
These helpers will be used to address amdgpu specific quirks and
features. They're implemented like the i915 and VC4 helpers.
In order for the string comparison to pick up "amdgpu" the buffer size
had to be expanded for __is_device. I've gone ahead and made it 12 bytes
to cover everything that's there right now.
v2: rebase
Cc: Leo Li <sunpeng.li@amd.com>
Cc: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
|
|
It's not operating on FD, and we've provided a nice reimplementation
that does. Let's use it instead.
Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
In order to add support for features specific to the VC4 driver, add
helpers for checking and requiring the driver like it's done for the
i915 driver.
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Maxime Ripard <maxime.ripard@bootlin.com>
|
|
This commit adds a new option for forcing the use of a specific driver
indicated via an environment variable.
v2 (Petri):
- Use an environment variable instead of command line
- Refactor the loop in __open_device
- Don't try to load kernel modules
v3 (Petri):
- Rebase and adjust to the driver loading changes
Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Cc: gustavo@padovan.org
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.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)
|
|
It doesn't look like there should be a dependency there.
v2: s/intel_batchbuffer/intel_reg/
v3: One more s/intel_batchbuffer/intel_reg/ in benchmarks
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com>
|
|
This patch gets rid of the Android support, deleting all the hacks and
moving code around to the places it belongs.
Android build is not really maintained properly and rots rather fast.
With recent push for Meson here and Android going for Soong it will only
accelerate.
It's a good time to drop the illusion of providing any support.
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: Kalyan Kondapally <kalyan.kondapally@intel.com>
Cc: Petri Latvala <petri.latvala@intel.com>
Cc: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com>
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Acked-by: Petri Latvala <petri.latvala@intel.com>
|
|
Simple copy and replace of the CUnit tests inside libdrm to form a basis
for further prime integration testing.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
|
|
Support the virtio GPU on drmtest.
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Lib and test code can use this function to avoid i915-specific behavior
when running on other drivers.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Add function that requires that the driver we are talking to is i915.
This allows us to skip subtests that are specific to that driver.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Insted of calling drmIoctl() directly, call igt_ioctl() instead. In the
normal scenario this is function pointer that calls drmIoctl() (so no
penalty), but allows us to divert ioctls into our own routines for
nefarious purposes. One such purpose will be to control interrupt
generation into the ioctl, to be able to detect when we successfully
interrupt the ioctl and when we no longer need more interrupts.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Daniel Stone <daniels@collabora.com>
|
|
do_ioctl demands that the ioctl returns success; add a variant named
do_ioctl_err, which expects the ioctl to fail, and demands a particular
result.
Signed-off-by: Daniel Stone <daniels@collabora.com>
|
|
Signed-off-by: Micah Fedke <micah.fedke@collabora.co.uk>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
The drm_open_driver*() functions replace the drm_open_any*() functions and
provide the same utility, but in a way that is platform agnostic, not
intel-specific. This opens the path for adopting intel-gpu-tools to non-intel
platforms.
This commit renames the calls and adds the chipset parameter which can be used
to restrict the opening to a specific hardware family. For example,
drm_open_driver(DRIVER_INTEL) will only return a valid fd if an intel GPU is
found on the system, along with performing intel-specific initialization stuff
like gem_quiescent_gpu(), et al. If OPEN_ANY_GPU is specified, the first
available drm device of any type will be opened.
Other hardware type flags may be added in the future.
The drm_open_any*() calls are retained as aliases of
drm_open_driver*(OPEN_ANY_GPU) but will be removed in a subsequent patch.
Signed-off-by: Micah Fedke <micah.fedke@collabora.co.uk>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
In android mmap64 was redirected to mmap2 because mmap64
was not alway available. But now mmap2 has been removed
from 64 bit android builds (and mmap64 is available), so
update preprocessor conditional to check for __x86_64__.
Signed-off-by: Tim Gore <tim.gore@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
As drm_open_any() now quietly fails if there is no driver, this
nullifies the effectiviness of using gem_exec_nop as the test for a good
reload. Combine with gem_alive (and guarantee that gem_alive can detect
a dead driver, putting lie to
commit 032f30cb38bb03562ee7fde19cd278b1d8ac31a9
Author: Thomas Wood <thomas.wood@intel.com>
Date: Tue Jan 13 13:33:57 2015 +0000
lib: remove unnecessary checks on the drm_open_any return value
) first.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88573
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Imre Deak <imre.deak@intel.com>
|
|
errno is only valid after a syscall wrapper (e.g. ioctl()) reports an
error. However, we report the last errno value as a part of the
igt_assert() output and so we display spurious values such as:
Test requirement not met in function gem_require_ring, file ioctl_wrappers.c:802:
Last errno: 11, Resource temporarily unavailable
Test requirement: (!((((intel_get_drm_devid(fd)) == 0x0102 || ...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Makes for a little bit less code duplication, especially since
it will be used from more callers in the future.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Brad Volkin <bradley.d.volkin@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
In android builds there is no reliable way to determine if mmap64 is defined
or not, and this sometimes leads to a compile error due to its re-defnition.
So this commit avoids its use altogether in intel-gpu-tools for Android builds,
unless the HAVE_MMAP64 macro is defined.
Signed-off-by: Tim Gore <tim.gore@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Also rename the arguments of do_ioctl a bit for better clarity.
I haven't figured out a way to reference other section headers, hence
the links to igt_core and intel_batchbuffer are a bit fragile
unfortunately. It gets the job done though.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
And shovel all the various helpers in there.
Also move igt_set_vt_graphics_mode to igt_kms.h since the function is
implemented in igt_kms.c. And it fits better. I kinda missed this in
the prep work.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
This is prep work to extract a new igt aux library with all kinds
of random stuff. Also give it a bit a more suitable name to
indicate that this is just a flag and doesn't do the aub dumping
itself.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
I've left unistd.h in it - it's not strictly required but most users
of drmtest.h want it for the open helpers, and then you kinda need to
close that file descriptor again ...
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Brought a few missing headers to light in ioctl_wrappers.h, too.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Only the igt core and non-test tools should have asserts to catch
internal errors, tests and helper libraries should all user igt_asert
instead.
Fix things up where assert instead of igt_assert was used.
One tiny step towards header sanity.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Right now almost everything in there concerns itself with register
access. Move everything else out (into drmtest.h for lack of better
place) to prepare for api documentation.
Also rename intel_drm.c to intel_os.c since it contains OS, not
drm abstractions.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
This way all debugfs library code is in one place, ready for some api
documentation care.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Same game as with ioctl_wrappers.c.
To split was rather clean except for the static function
oom_adjust_for_doom. But that was a bug, the calls to it in the
various open helpers should simply be done at init and fork time.
Which was already the case, except for simple testcase. So fix it up.
While at it also start with a small section header for the
documentation.
v2: Don't forget to update the xml template ...
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Also some tiny polish to function interface:
- @caching in gem_set_tiling should be uint32_t to match the ioctl
struct.
- s/size/length/ for gem_write/read.
- move gem_get_num_rings to the other ring feature helpers.
v2: Also demote gem_require_ring from static inline and move it, too.
v3: Also move gem_handle_to_libdrm_bo.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
I want to group the ioctl wrappers and related functions into their
own documentation section.
Apparently gtkdoc refuses to obey this wish without a corespdonding
header. So appease it. Also gtkdoc seems to struggle with rebuilding a
bit ...
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Make the existing documentation compatible with gtk-doc.
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Apparently there's a bit a need for more verbose output in testcases,
mostly for debugging purposes. At least gem_reset_stats and pm_rps
have a verbose mode.
On top of that we're currently not taking advantage of piglit's "warn"
state all that much. But I think it might be useful for testcases which
are notorious for some kinds of spurious failures, like e.g. the really
nasty timing checks in kms_flip. If we demote some of them to just
warnings we could run the overall tests more often.
Hence this patchs adds a new igt_log function with the three levels DEBUG,
INFO and WARN. Plus a bunch of convenience helpers to keep the test
code tidy.
The level can be set through an enviroment vairable IGT_LOG_LEVEL with
info being the default. Also tests can look at the selected log level in
case they want to run costly debug functions only when needed.
Comments highly welcome, I plan to roll this out over tests which can
use it (not all, imo that's too much churn) once we've settled on the
interfaces/semantics.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
This is a remnant from the subtest code before we had proper
fixture blocks. With those there's no no reason to have igt_skip
calls outside of fixtures or subtests, so we can assert this and
hence always jump out.
Suggested by Thomas Wood since static analyzers got confused about
this.
To check for fallout I've run all tests as non-root so that they'll
all skip. Only very little fallout resulted.
Cc: Thomas Wood <thomas.wood@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|