While debugging the test failures I tried different values for the
offsets, so having a central place to change them is the only sane
way.
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
SKL and BXT have some new plane capabilities that previous generations
didn't have; we need to update some of our universal plane tests to
expect success rather than failure when running on these platforms.
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Make sure resource streamer flags works only in correct ring in
addition to checking next flag after the RS boundary fails.
v2: Make sure we reject RS on pre-hsw.
v3: Don't skip 1<<15 for the exec flags (Jani Nikula)
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Since the introduction of igt_stats and its usage in gem_exec_nop, we
need to link the tests against libm. My rebasing bot complained when
linking gem_exec_nop:
lib/igt_stats.c:492: undefined reference to `sqrt'
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
In order to keep the GPU in a consistent state between samples, we have
to wait for it to fall asleep before proceeding.
For fun hook up igt_stats.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Add forking subtests to gem_ringfill. Tests cause consistent GPU
hangs on SKL.
v2: Removed noop parts.
v3:
- Allow executing the tests in order too (Chris Wilson).
- Rename the tests to -forked-1
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
[ickle: Extend to cover forked-N]
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89959
gem_fenced_exec_thrash was not freeing any resources between
subtests. On 1Gb android systems this resulted in the test
failing with an OOM error.
Added cleanup code to free BOs at the end of each subtest.
Signed-off-by: Derek Morton <derek.j.morton@intel.com>
And they keep it disabled until something else enables it. So let's
consider this on the draw subtests.
With this, some PSR tests that were failing will now start passing.
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Because the GTT mmaps "permanently" disable PSR and this can mess
some of our assertions. So let's just use the CPU domain to keep the
implementation simple.
With this, some PSR tests that were failing will now start passing.
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
It doesn't make sense to write on the sprite/cursor plane of the
"offscreen" screen. The pick_target() function was just returning the
offscreen_fb pointer for those cases, so we were not really testing
any cursor or sprite code. So the tests were just the same as
offscreen-pri.
That kills 24 subtests for each feature (72 in total).
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
This test exercies the dev_priv->fb_tracking.busy_bits bug I recently
found and Daniel fixed.
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
It's simply a bit too scary on pre-gen6 and imo not worth the bother
really until someone starts to implement all the hacks an w/a required
on these platforms. On later platforms the issues are just with
correctness and performance hence no risk for hanging machines.
Cc: Paulo Zanoni <przanoni@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
I often add new temoprary wait_user() calls when debugging things, and
having to add "if (opt.step)" is annoying, so let's make the step
level check inside wait_user(). As a bonus, our huge macro is 2 lines
shorter.
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
And require sink CRC support for PSR, since the pipe CRC is not
exactly useful there.
v2: Check for ENOTTY (Rodrigo).
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91019
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
On android platforms with 1Gb RAM gem_fence_thrash was failing
with an out of memory error.
This patch causes gem_close() to be called when a handle is
no longer required rather than relying on the cleanup when
the fd is closed. This greatly improves the memory footprint
of the test allowing it to run on 1Mb systems.
Also fixed a leak of the 'threads' variable.
v2: Simplified as per Chris Wilson's suggestion.
Signed-off-by: Derek Morton <derek.j.morton@intel.com>
[ickle: fix mmap leak from bo_copy()]
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
A few entry points in the GEM API are expected to raise EIO if we
encounter a wedged GPU. This testcase aims to do so by first injecting a
GPU hang with GPU resets disabled (thus causing the GPU to become wedged)
and then exercises the various API to check for the expected errors.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
testdisplay_hotplug.c: In function ‘hotplug_event’:
testdisplay_hotplug.c:46:14: error: storage size of ‘s’ isn’t known
struct stat s;
^
testdisplay_hotplug.c:54:2: error: implicit declaration of function ‘fstat’ [-Werror=implicit-function-declaration]
fstat(drm_fd, &s);
^
testdisplay_hotplug.c:54:2: warning: nested extern declaration of ‘fstat’ [-Wnested-externs]
testdisplay_hotplug.c:46:14: warning: unused variable ‘s’ [-Wunused-variable]
struct stat s;
^
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
v2: Try to open i915_pc8_status first to make the transition (or just
running on older kernels) better. (Paulo)
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
This is a new test that should exercise the frontbuffer tracking
feature of the Kernel in a number of different ways. We use different
drawing methods, we use the primary, cursor and sprite planes, we can
test both on single and dual pipes, also on buffers not associated
with any CRTCs, etc.
We currently have assertions for both FBC and PSR, and we also have a
"nop" test mode that should disable both FBC and PSR, and can be
used for debugging.
This test is also capable of testing both FBC and PSR even if they are
disabled by default on the Kernel: the test knows how to change the
i915.ko parameters and then set them back after testing.
I am getting a significant number of failures when I run this test,
which means we have some work to do on the Kernel.
I also still have a small list of additional subtests that I plan to
add to this test, and those tests are documented on the main function.
v2:
- Use igt_debugfs_open() (Thomas).
- Use igt_test_description() (Thomas).
- Don't check drm_open_any_master()'s result (Thomas).
- Use igt_require_f() in some cases (Thomas).
- Standardize some assertions.
- Use the new module param functions.
- Check if FBC is supported by the chipset.
- Add new subtests (multidraw, enum fbs, fbc+psr).
- Make tests a little shorter.
- Reorganize which tests ara ran by default.
- Better comments everywhere.
- Rebase.
v3:
- Fix a small typo.
- Improve the log messages a little bit more.
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Use the igt_set_module_param_int() call to enable it, then restore the
previous value after we are done testing.
With this, we can change the psr_enabled() function to psr_possible():
the only requirement should be that we have a PSR capable sink. The
test should now be able to make "Source_OK" and "Enabled" become true
whenever it wants.
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
We may not be perfect, but if we don't even test, we will probably
only get worse over time.
The function called makes sure we restore whatever was the original
FBC parameter when we exit the test, so this should not affect the
other tests.
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
v2:
- add a subtest for uncached mappings too for LLC platforms where the
default is cached mapping (Chris)
Signed-off-by: Imre Deak <imre.deak@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>
During the streaming setup, we execute a dummy batch in order to bind
the objects into the GTT and query their offsets. For this, we should
not use a snooped buffer for the dummy batch, or else we may anger the
GPU. Given that we have a choice, use the other buffer for the dummy
batch.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
The llc cpu path only partially mapped the batch buffer so confused the
CS when attempting to execute an empty batch.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90809
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Currently the test expects to find 15 stereo 3D modes, however the
number of stereo modes we get from the current kernel EDID parser
is actually 13.
The extra two modes we had previously were GTF modes, which are no
longer getting added by the kernel since we have corresponding
CEA/DMT modes available. So having the GTF modes in the list was
not actually intentional.
The kernel commit that change the behaviour:
commit bfcd74d2aeda25a78f7cc92f80650218b1bce0ca
Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
Date: Thu Apr 2 17:02:11 2015 +0300
drm/edid: Add DMT modes with ID > 0x50
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90368
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
This is a basic sanity test of the backlight sysfs interface.
v2:
- Add jani's suggestion for immediate readback
- Remove unused parameter from test_and_verify()
- Add fade test
Issue: VIZ-3377
Signed-off-by: Antti Koskipaa <antti.koskipaa@linux.intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
commit 1e8df16778b0d8fd8102b3ee799b028f8f961089
Author: Sonika Jindal <sonika.jindal@intel.com>
Date: Wed May 20 13:40:48 2015 +0530
drm/i915/skl: Swapping 90 and 270 to be compliant with Xrand
Changed the rotation direction so IGT needs to be told.
Reviewed-by: Sonika Jindal <sonika.jindal@intel.com>
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Sonika Jindal <sonika.jindal@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Be clean and use memset(0) on ioctl args before use and downgrade some
of the lesser informatic messages to just debug.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
The test checks the residency in a given RC6 state or any deeper states
that are also enabled. For example the RC6 subtest checks the combined
residency in RC6/RC6P/RC6PP. Since the kernel reported value for the RC6
residency doesn't include the RC6P or RC6PP residency we need to adjust
the RC6 value accordingly. A similar adjustment is needed for the RC6P
subtest.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90369
Signed-off-by: Imre Deak <imre.deak@intel.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Currently the test runs a separate idle loop when reading out each RC6
counter. But there is no need for this, we can have a signle idle loop
and read out all the counters at once.
This prepares for an upcoming patch where we need to consider the RC6P
and RC6PP counters as well when checking RC6.
Signed-off-by: Imre Deak <imre.deak@intel.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
The way the test checks for the RC6 enabled mask atm doesn't work:
calling igt_success outside of any subtests doesn't have any effect.
This means the test will run a 11 second idle loop for each RC6 state
regardless if the platform supports these or have them enabled. Fix this
by checking explicitly if a given RC6 state is enabled before reading
out/checking the corresponding counter.
With this fix we can also get rid of the GEN6/IVB checks, since the RC6
mask check makes them redundant. We still need the VLV/CHV checks, since
media RC6 doesn't have a separate bit in the mask.
Signed-off-by: Imre Deak <imre.deak@intel.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
The upcoming patches will add some additional logic around reading out
the counter values, so factor out the readout code to prepare for those
patches.
No functional change.
Signed-off-by: Imre Deak <imre.deak@intel.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
The counter check function (residency_accuracy) cares only about the
counter delta, so no need to pass it the start/stop values separately.
Simplify things to prepare for the upcoming patches.
No functional change.
Signed-off-by: Imre Deak <imre.deak@intel.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
The temporary vars only obfuscated things, so get rid of them. Also
remove some redundant asserts and info messages.
The only functional change is that the counter delta will be checked
only against a percentage based accuracy range (90%-100%) and not
against a hard-coded limit (RC6_FUDGE). The two checks serve the same
purpose and the former one is clearer.
Signed-off-by: Imre Deak <imre.deak@intel.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
If ANDROID_HAS_CAIRO is not set, automatically add all
kms tests to the skip_tests_list.
Building for android currently fails due to the addition of
new kms tests. Rather than just adding the new tests to the
exclusion list, autogenerating a list of all kms tests and
excluding them will reduce future maintainance.
Signed-off-by: Derek Morton <derek.j.morton@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
It can be useful to have one of those to carry state between the handler
parsing the options and the rest of the test. Right now the only thing
we can do is to use global variables for that.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>