We need to be careful in case other devices grow an error file in the
future. The first step here is just to check the minor that corresponds
with the debugfs path found for the device
As /sys/class/drm/cardX/error is a new interface for 3.11, we need to be
quiet when it does not exist or else we upset the automated tests.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66533
Since these two tests exercise a working set larger than aperture, they
require stalls which are prone to being interrupted - so interrupt them
and check that everything still works.
Test both debugfs and sysfs error_state interfaces.
v2: sysfs error_state not mandatory
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
[danvet: Update sysfs file name.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
In preparation to have sysfs entries used in scripts
rename to more specific name.
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Accidentally replaced the intel_copy_bo() with the set_bo() in the
"overwrite-source" in 4fd34977aff60f58cd955eb9c2d568d5fb824611 when
clearly I wanted to simply add the calls to set_bo() first.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Accidentally left in the hack to run the
"overwrite-source-interruptible" for only one loop, used whilst testing.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Hiding the initial set_bo() required for the "overwrite-source" tests
lead to a nice bit of hilarity as I missed repeating the initialisation
for the multiple loops of the interruptible version of
"overwrite-source".
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Daniel preferred to keep the old tests intact lest we accidentally break
them, and to add the new interruptible tests as new subtests.
In the process also make sure the GPU is idle before starting each loop.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
In order to exercise the bug behind:
commit 22fd5ca947b58901927d100d2b1aa0f1672b3435
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Fri Jun 28 16:54:08 2013 +0100
drm/i915: Only clear write-domains after a successful wait-seqno
we need to check for concurrent access with the potential to be
interrupted by a signal. The framework for doing so is already in place,
so just enable it and repeat the tests for longer to give better chance
of being interrupted at just the wrong moment.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
I'd been working under the falsehood that we would always generate an
error for an invalid reloc->target_handle before reserving any object.
However, only the execlist is checked up front for validity before
reservation so ENOSPC is a genuine error condition raised by the test.
Fix it so that we stop reporting that limit as a test failure.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65391
Limit the broken handles to UINT32_MAX-4096 so that we can be sure that
they do not alias with a valid handle.
References: https://bugs.freedesktop.org/show_bug.cgi?id=65391
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
We may fail to set a mode if it fails some hidden constraints, such as
bandwidth on the third pipe. This is expected, so skip testing such
modes.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66111
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Certain modes may not be supported by certain combinations of pipes.
This is impossible to determine upfront, and we await an atomic
modesetting query operation. In the meantime, if we fail to set a mode,
just skip that test.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66000
Add a test going through all connectors/crtcs/modes/formats painting to
a front FB with CPU or painting to a back FB with CPU and blitting it
to the front FB.
Only formats understood by cairo are supported for now.
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Factor out parts that will be used by an upcoming patch adding
kmstest_create_fb2.
Also call the fb paint functions directly, there is not much
point in passing a function pointer for that.
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
This is used by multiple test cases, so make it shared.
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
These are used by multiple test cases, so make them shared.
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
What this test is interested in is the handling of the LUT for very
large arrays, irrespective of whether such batch are actually
executable. So adjust the pass/fail checks to be explicit in the error
they are looking for, so that we do not conflate memory/aperture
pressure as a failure in the LUT API.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65391
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Add a double buffer and a single buffer version of the above sequence,
to check if the modeset does a DPMS ON.
Tested on IVB, with and without the relevant kernel fix, got the
expected results.
Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Currently when exiting with error, we'll get stuck in a DPMS OFF state
if the error happens while we have DPMS OFF set in the test sequence.
This happens even though we switch back to text mode at exit. This might
be a bug in itself to be fixed later, but in any case we want a working
console, so do an explicit DPMS ON.
Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Let's not use the 2K variants of the frequencies it does not help
in anything here and the explanations are hopefuly more understandable
this way.
On top of that, I noticed that we can just compute the desired min/max
boundaries for r2 and n2, so use that instead of the two tests to
discard out of range values.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Assume that the budget for those frequencies were tuned after the
reference table was created.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Because the reference frequencies were stored in KHz, we've lost
precision for 37762500Hz and the test is failing. Let's express the
reference frequencies in Hz then.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Oops. This has been broken since:
commit d798ab9c2a092a08e14c6f2dfb1777376ba407a8
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date: Tue Dec 18 22:55:58 2012 +0100
tests: add testcase to check igt runtime enviroment
This is one reason for some of the sporadic kms_flip failures.
One such is https://bugs.freedesktop.org/show_bug.cgi?id=59834.
v2:
- use unsigned long for KDSETMODE/KDGETMODE
- fix passing the parameter to KDGETMODE as it should be by value
- actually testing that it works..
v3:
- don't do an explicit DPMS_ON, only switch to graphics mode.
v4:
- use the newly added drmtest_set_vt_graphics_mode(), which will also
take care of restoring the original mode. (Daniel)
Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-q will prevent grep from writing to stdout and print "root" when make
test is running as root.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Aside from adding VEBOX support, this test allows allows the "mixed"
test case variant to work on platforms that have 2 rings which was
previously not the case. To the best of my memory, this might therefore
impact G45, and Ironlake.
Signed-off-by: Zhong Li <zhong.li@intel.com>
[Ben: added commit message, remove num_rings = 1, s/LOCACL/LOCAL]
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
1. add functions check kernel enable a ring or not.
2. add function gem_get_num_rings() to check how many rings kernel has
enable.
3. gem_ring_sync_loop.c will call gem_get_num_rings() directly instead
of original static fucntion get_number_rings().
Signed-off-by: Zhong Li <zhong.li@intel.com>
[Ben: Wrapped commit message + whitespace fixes]
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>