Age | Commit message (Collapse) | Author |
|
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>
|
|
For an as of yet unknown reason, calling system("modprobe") from inside
igt/gem_wait causes kasan to spend 1-5 minutes copying the process
pagetables. This evaporates if we replace the fork-happy call to system
with a call to load the module using libkmod. So be it.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
This reverts commit 25fbae15262cf570e207e62f50e7c5233e06bc67, restoring
commit 301ad44cdf1b868b1ab89096721da91fa8541fdc
Author: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Date: Thu Mar 2 10:37:11 2017 +0100
lib: Open debugfs files for the given DRM device
with fixes.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
This reverts commit 301ad44cdf1b868b1ab89096721da91fa8541fdc.
When a render-only device is opened and gem_quiescent_gpu is called, we
need to use the debugfs dir for the master device instead.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
|
|
When opening a DRM debugfs file, locate the right path based on the
given DRM device FD.
This is needed so, in setups with more than one DRM device, any
operations on debugfs files affect the expected DRM device.
v2: - rebased and fixed new API additions
v3: - updated chamelium test, which was missed previously
- use the minor of the device for the debugfs path, not the major
- have a proper exit handler for calling igt_hpd_storm_reset with the
right device fd.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Robert Foss <robert.foss@collabora.com>
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
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>
|
|
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Fixes: 9921aff583ac ("lib/drmtest: Take DRIVER_ANY into account when opening the DRM device")
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
|
|
__drm_open_driver was changed to bail out on VGEM devices unless they
are explicitly asked for (DRIVER_VGEM). But with that change we lost
support for DRIVER_ANY.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Fixes: 7ce63894854d ("lib: Support opening vGEM device")
Cc: Chris Wilson <chris@chris-wilson.co.uk>
|
|
If we opened the driver multiple times, we would not flush i915 if it
was opened second. The persistence of one test state into a second can
upset third parties, e.g. prime_vgem upsetting vgem_basic (due to
references from i915.ko to vgem.ko preventing module unload).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
The __ prefixed functions are there to report the error and should not
automatically skip, which is handled by the normal unprefixed variant.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
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>
|
|
Now other gpus are supported too.
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
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>
|
|
When opening the device, we first ensure the device is idle. However,
performing GEM operations on !i915 is bad behaviour, so don't.
Signed-off-by: Robert Foss <robert.foss@collabora.com>
|
|
Silly compiler emitting warnings that just cause people to break code
attempting to silence the compiler.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Pass -s switch to modprobe so that we don't litter stderr with the error
message for a missing module - the load failure is sufficient.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
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>
|
|
As it reflects more clearly what the function actually does.
Suggested-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
When flushing work and idling the GPU, we need to flush all engines,
including the forgotten BSD2.
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>
|
|
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Now that we have better ioctl wrappers, let's make us of them. The
advantage should be in improved error reporting in case
gem_quiescent_gpu() ever fails.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
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>
|
|
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
The DRM device id for the igfx is fixed, since there can only be one in
the system. So once we query it for the first time we can safely report
that value on every subsequent request, cutting out a lot of noisy
ioctls from inside tests.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Also move forcewake and stop_rings code from igt_debugfs to igt_gt
since it fits better. And move the hang injection fork helpers from
igt_aux to igt_gt, too.
Also push the intel_gen call into igt_hang_ring while at it.
Signed-off-by: Daniel Vetter <daniel.vetter@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>
|
|
drm_open_any always returns a valid file descriptor, so there is no need
to check the return value.
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Signed-off-by: Imre Deak <imre.deak@intel.com>
|
|
Before issuing any i915 specific ioctls, check the driver is i915
otherwise we make other drivers emit nasty errors at the start of every
test.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Clear all the ioctl structs to zero before use as valgrind does not our
ioctls and so complains about undefined bytes being passed to syscalls.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Actually only the igt_core was breaking the make distcheck,
but let's make it consistent and let the code cleaner.
Credits-to: Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
|
|
If we dup the fd, we are in mercy of the context banning
of the test application. Better to have our own to guarantee
that gem_quiescent_gpu won't find itself banned on exit.
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
|
|
Multiple tests are introducing hangs by fidding with i915_ring_stop
debugfs entry.
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
|
|
igt_kms docs are just skeleton and also added igt_fb to make sure the
linking works correctly.
Next up: Actually documenting igt_fb.
Also fix that depency spelling fumble I've copied around to a few too
many places.
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>
|
|
With the header cleanup we can now give this header a suitable name,
since it now really only contains register access and other I/O
functions and assorted definitions.
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 include what the header itself needs. The big fish here is
intel-gpu-tools.h. More will follow.
One ugly thing removed here is the duplicated GEN6_TD_CTL #define, one
of which was broken.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|