Age | Commit message (Collapse) | Author |
|
This patch adds a context creation ioctl wrapper that returns the error
for the caller to consume. Multiple tests that implemented this already,
have been changed to use the new library function.
v2:
- Add gem_require_contexts() to check for contexts support (Chris)
v3:
- Add gem_has_contexts to check for contexts support and change
gem_require_contexts to skip if contests support is not available.
(Chris)
v4:
- Cosmetic changes and use lib function in gem_ctx_create where
possible. (Michal)
v5:
- Use gem_contexts_require() in tests and fixtures. (Chris)
Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Michał Winiarski <michal.winiarski@intel.com>
Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
The test expected IOCTL 'I915_GET_RESET_STATS' would return an error
when not root. That is no longer true in the driver since commit
4c9c0d09741d ("drm/i915: Fix retrieval of hangcheck stats") and therefore
the test was incorrectly failing.
v2:
- Add the commit that changed the behaviour in the Driver to the
commit message. (Michel)
v3:
- Reuse get_reset_count instead of implementing a new function.
(Michel)
Cc: Michel Thierry <michel.thierry@intel.com>
Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com>
Reviewed-by: Michel Thierry <michel.thierry@intel.com>
|
|
We are, the build system takes care of that.
Reviewed-by: Eric Anholt <eric@anholt.net>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Acked-by: Petri Latvala <petri.latvala@intel.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Platforms with per-engine reset enabled (i915.reset=2) are unlikely to
perform a full chip reset, keeping the reset_count unmodified. In order
to keep the expectations of this test, enforce that full GPU reset is
enabled (i915.reset=1).
Later on, we can expand the reset_stats ioctl to also return the number
of per-engine resets and use reset_count + reset_engine_count when
checking for the updated reset count.
v2: Rebase, don't use gem_gpu_reset_type directly, since we now have
additional helpers.
Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Signed-off-by: Michel Thierry <michel.thierry@intel.com>
Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
|
|
Test expects pending batches to be discarded after a reset. After commit
821ed7df6e2a ("drm/i915: Update reset path to fix incomplete requests"),
That is no longer the case. Fixed to expect a normal execution.
V2: Updated commit message (Michel Thierry)
Cc: Michel Thierry <michel.thierry@intel.com>
Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com>
Reviewed-by: Michel Thierry <michel.thierry@intel.com>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Make sure that injected hang is detected below time threshold.
This ensures that we fail if hang was of no-progress type instead
of a stuck engine.
v2: use igt_seconds_elapsed() (Chris)
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Since 9ba9af2ea4 ("lib: Skip execution in gem_has_ring()"), we no longer
do a double execbuf for each hang, as the gem_require_ring() check now
does a dummy execution that does not contribuee to the pending batch
count.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Missed from e3b68bb66683ad4cb4c80df904a3a21c98a2b6c2 due to rebasing
fun.
gem_reset_stats.c: In function 'inject_hang_ring':
gem_reset_stats.c:227:19: error: implicit declaration of function 'gem_exec' [-Werror=implicit-function-declaration]
gem_reset_stats.c:227:2: warning: nested extern declaration of 'gem_exec' [-Wnested-externs]
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
An oft-repeated function to check EXECBUFFER2 for a particular fail
condition.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Apply the new API to all call sites within the test suite using the following
semantic patch:
// Semantic patch for replacing drm_open_any* with arch-specific drm_open_driver* calls
@@
identifier i =~ "\bdrm_open_any\b";
@@
- i()
+ drm_open_driver(DRIVER_INTEL)
@@
identifier i =~ "\bdrm_open_any_master\b";
@@
- i()
+ drm_open_driver_master(DRIVER_INTEL)
@@
identifier i =~ "\bdrm_open_any_render\b";
@@
- i()
+ drm_open_driver_render(DRIVER_INTEL)
@@
identifier i =~ "\b__drm_open_any\b";
@@
- i()
+ __drm_open_driver(DRIVER_INTEL)
Signed-off-by: Micah Fedke <micah.fedke@collabora.co.uk>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Add a header that includes all the headers for the library. This allows
reorganisation of the library without affecting programs using it and
also simplifies the headers that need to be included to use the library.
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Function check_gpu_ok checks to make sure that any hangs
have cleared by testing for (flags == 0). Some tests set
the STOP_RINGS_ALLOW_BAN and STOP_RINGS_ALLOW_ERRORS flags
but these do not get cleared by an individual ring reset,
(a feature added recently to the driver), leading the
check_gpu_ok function to think that the gpu is still hung.
So I mask the flags with STOP_RING_ALL, to ignore the mode
bits and look only at the bits that stop the rings.
Once gpu_check_ok sees that the gpu is not hung I write 0
to stop_rings in order to clear it completely. This is
because igt_set_stop_rings will only write to stop_rings
if either a) they are currently 0 or b) we are writing 0.
If we leave the mode bits set then subsequent calls to
igt_set_stop_rings to create hangs will fail.
Signed-off-by: Tim Gore <tim.gore@intel.com>
|
|
The integer comparison macros give us better error output by including
the actual values that failed the comparison.
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
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>
|
|
A bit more invasive since getting rid off all the places meant
to flatten some of the control flow with implicit igt_require.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
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>
|
|
to see if one can fool hangcheck by keeping non hanging
ring busy
v2: break from loop instead of return (Daniel Vetter)
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
|
|
All the cases that simply dump some debug information and couldn't be
converted to some of the fancier macros.
Some information output removed when it's redundant with the subtest
status.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
To avoid writing past the batch end.
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
|
|
Some tests, namely the close pending variety, tries to
carefully drop all handles to gpu when hang is intruduced,
to expose bugs in reset handling without any clients.
Add guards after and before tests to really know if
the gpu is still alive as the particular test might
report success and then gpu dies few seconds after.
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
|
|
on gem_reset_stats, kms_flip and pm_rps.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75876
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
|
|
As we use chained batch into itself to hang the gpu, there
was no need to end the batchbuffer with BATCH_BUFFER_END.
With the introduction of command parser, the batch
need to have proper BATCH_BUFFER_END in it or it
will be rejected.
While at it, shift the upper half of batch gtt_offset
accordingly with gen8+
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
|
|
To gain more coverage on interface, default context and banning.
As there is no proper reset support for gen <= 3, we only
do limited interface testing on those.
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
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>
|
|
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>
|
|
And move the public interfaces into intel_batchbuffer.[hc].
A bit messy since we are fairly inconsistent with our header #include
handling.
Also exclude rendercopy.h from the documentation.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Also update the api docs a bit since the Returns: section was missing.
v2: Readd the accidentally lost line for @filename.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
(Almost) no one cared anyway.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Tests _must_ be able to run as non-root and on non-intel platforms,
otherwise the enumeration is busted (since QA enumerates testcases on
a gpu-less xeon box).
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
If we stop all the rings, we can end up blaming the innocent
rings on hangcheck.
Reference: https://bugs.freedesktop.org/show_bug.cgi?id=73652
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Useful in other tests.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Run all relevant tests on all rings.
Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Split context related tests from non-context ones
and cleanup the naming.
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Use own copy of gem_quiescent_gpu() so that test still works
if it gets changed. Further improve the test by posting a batch
to rings in reverse order.
Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
I wanted to add this to Mika's original patch but forgot to git add.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
This triggers use after free oops on request->batch_obj when
going through the rings and setting reset status on requests,
after a gpu hang.
v2: Streamlined the test and added comments (Daniel)
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Getting global reset count needs to be tested with root and
non root access.
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
To make driver report a simulated hang in dmesg.
Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
For BDW+, there BATCH_BUFFER_START is 3 * 32bits in length and
length needs to be encoded into the opcode.
Suggested-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Instead of freaking out about negating the skip condition and punting
I could have remembered that I've solved this already ...
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Just demonstration really.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
v2: check the ioctl pad and flag parameters
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|