Age | Commit message (Collapse) | Author |
|
Take the device fd from the caller as to which card we should try and
enable connectors for (or else we may not enable the right connectors
for the test!) and fail gracefully if there is no kms support on the
device.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
If KMS is not supported, drmGetResources() will return NULL so be
careful not to dereference it. However, we still insist that runtime pm
works, so keep on testing.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Enabling hangcheck only takes effect at the start of a new request
queue. Before we re-enable hangcheck after our poking around, we
therefore need to wait until the gpu is idle otherwise the next test
will start without hangcheck and subsequently hang forever.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Petri Latvala <petri.latvala@intel.com>
Tested-by: Petri Latvala <petri.latvala@intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
|
|
Add a few tests to test various blending modes.
Some of the tests will skip if pixel mode alpha cannot be enabled
with plane alpha at the same time. This is for mali-dp. I didn't
test on that platform, but tested with the same check on i915.
The tests won't pass i915 on pre-gen11 hw. i915 has small rounding
errors with 0xff and 0x00 alpha, which gives CRC mismatches.
Changes since v1:
- Send the correct version, with the skips for mali-dp in place.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Simple rule of thumb, if a kms_* test calls igt_display_init() in its
global fixture, skip the entire test if the driver has disabled KMS.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Antonio Argenziano <antonio.argenziano@intel.com>
|
|
We try flipping a vgem surface onto a i915 scanout. However, if there
is no display we want to disable the kms interface, including the addfb
ioctl. On such systems the call to kms_addfb will naturally fail and the
test cannot be run.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Antonio Argenziano <antonio.argenziano@intel.com>
|
|
If the driver doesn't support the getfb iface (e.g. because KMS has been
disabled), the ioctls will fail with ENOTSUP. This is expected, so skip
the test as nothing useful can be learnt.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Antonio Argenziano <antonio.argenziano@intel.com>
|
|
PSR appears to not exit immediately after the test commits a page flip,
give some leeway for PSR to idle. Let's set the timeout at 40 ms with a
5 ms interval between each status read.
Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
|
|
Instead of passing around a boatload of integers everywhere let's
just pass around the igt_fb struct. That obviously means we have to
populate it first sufficiently, to which end we'll add a small helper.
Later on the stride/size calculations will consult the already
pre-populated igt_fb and fill in the rest as needed.
This makes the whole thing a lot less error prone as it's impossible
to accidentally pass the arguments in the wrong order when there's
just the one of them, and it's a pointer.
v2: Rebase due to uint64_t size
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
|
|
Normally we wait on the last request, but that overlooks any
difficulties in waiting on a request while the next is being qeued.
Check those.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Antonio Argenziano <antonio.argenziano@intel.com>
|
|
More variants on stress waits to serve the dual purpose of investigating
different aspects of the latency (this time while also serving
execlists interrupts) while also checking that we never miss the wakeup.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Antonio Argenziano <antonio.argenziano@intel.com>
|
|
This exercises a special case that may be of interest, waiting for a
context that may be preempted in order to reduce the wait.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Antonio Argenziano <antonio.argenziano@intel.com>
|
|
All users of igt_pipe_crc_get_single() want a blocking read even if
the fd was opened in nonblocking mode. Make it so.
v2: Fix the docs for igt_pipe_crc_get_single()
Cc: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
|
|
Remove gem.has_ppgtt as the information is no longer used.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
|
|
Remove gem.has_ppgtt as the information is no longer used.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
|
|
Currently __kms_addfb() assumes that only the first plane can be
at offset 0. I don't particularly like such assumptions so let's
just pass in the number of planes explicitly.
We'll also require offsets[] to be passed in always. Nothing really
to gain by making it optional.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
|
|
Make __kms_addfb() usable with planar formats by passing in the
stride for each plane.
v2: Handle strides[1] for planar formats in kms_available_modes_crc
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
|
|
Add DIV_ROUND_UP() and replace some hand rolled versions with it.
v2: Drop the duplicate from gem_render_copy() (Paulo)
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
|
|
debugfs fd
Let's rename to debugfs_fd all the parameters of the functions that
expect debugfs fd to avoid call one those functions with the wrong
file descriptor.
v2:
- Fixing code style
- Renaming fbc_wait_until_enabled() too
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
|
|
psr_wait_entry() uses the fd to the debugfs directory not the fd
the drm device.
This fix some kms_frontbuffers_tracking tests:
...
(kms_frontbuffer_tracking:1353) DEBUG: Calculated CRC: pipe:[94a0476d 00000000 00000000 00000000 00000000]
(kms_frontbuffer_tracking:1353) DEBUG: Test requirement passed: !fbc_not_enough_stolen()
(kms_frontbuffer_tracking:1353) DEBUG: Test requirement passed: !fbc_stride_not_supported()
(kms_frontbuffer_tracking:1353) DEBUG: Test requirement passed: !fbc_mode_too_large()
(kms_frontbuffer_tracking:1353) DEBUG: fbc_is_enabled()?
FBC enabled
Compressing: yes
(kms_frontbuffer_tracking:1353) DEBUG: fbc_is_enabled(IGT_LOG_DEBUG) took 0ms
(kms_frontbuffer_tracking:1353) DEBUG: fbc_is_compressing() took 0ms
(kms_frontbuffer_tracking:1353) CRITICAL: Test assertion failure function do_status_assertions, file ../tests/kms_frontbuffer_tracking.c:1634:
(kms_frontbuffer_tracking:1353) CRITICAL: Failed assertion: psr_wait_entry(drm.fd)
(kms_frontbuffer_tracking:1353) CRITICAL: Last errno: 20, Not a directory
(kms_frontbuffer_tracking:1353) CRITICAL: PSR still disabled
(kms_frontbuffer_tracking:1353) igt_core-INFO: Stack trace:
(kms_frontbuffer_tracking:1353) igt_core-INFO: #0 ../lib/igt_core.c:1467 __igt_fail_assert()
(kms_frontbuffer_tracking:1353) igt_core-INFO: #1 ../tests/kms_frontbuffer_tracking.c:1635 do_status_assertions()
(kms_frontbuffer_tracking:1353) igt_core-INFO: #2 ../tests/kms_frontbuffer_tracking.c:1663 __do_assertions()
(kms_frontbuffer_tracking:1353) igt_core-INFO: #3 ../tests/kms_frontbuffer_tracking.c:1687 enable_prim_screen_and_wait()
(kms_frontbuffer_tracking:1353) igt_core-INFO: #4 ../tests/kms_frontbuffer_tracking.c:1847 prepare_subtest_screens()
(kms_frontbuffer_tracking:1353) igt_core-INFO: #5 ../tests/kms_frontbuffer_tracking.c:1867 prepare_subtest()
(kms_frontbuffer_tracking:1353) igt_core-INFO: #6 ../tests/kms_frontbuffer_tracking.c:2987 tilingchange_subtest()
(kms_frontbuffer_tracking:1353) igt_core-INFO: #7 ../tests/kms_frontbuffer_tracking.c:3474 main()
(kms_frontbuffer_tracking:1353) igt_core-INFO: #8 ../csu/libc-start.c:344 __libc_start_main()
(kms_frontbuffer_tracking:1353) igt_core-INFO: #9 [_start+0x2a]
v2: Fixing code style
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
|
|
Lite restore is sufficiently covered in gem_exec_nop.
At the same time tidy code in the test a bit to bring it closer to today's
coding style.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Suggested-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Move a really small test that invalid context is rejected under the
gem_ctx_exec umbrella.
v2:
* And actually fix the test so it does what it claims. And add more
variety in the invalid context id's it tests with. (Chris Wilson)
v3:
* Rename the test as basic.
* Limit to 32-bit. (Chris Wilson)
* Add previously valid but closed context id to the test. (Chris Wilson)
v4:
* Add more invalid values. (Chris Wilson)
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Some drivers and some hardware do not support KMS and so the addfb
ioctls are expected to fail. However, since they are expected to fail
with a specific errno (ENOTSUP) in the case KMS is not supported on the
fd, we can check for that and skip the tests where they are not
appropriate.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Check we have sufficient memory to run the tests before getting trapped
in the swap of despair.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107935
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Add a helper to round a value to the next power of two size.
And since we need fls() to implement that, reuse that elsewhere
as well.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Switch all fb size handling to 64bits to accomodate >4GiB
framebuffers.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
../tests/eviction_common.c:158:13: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘size_t’ {aka ‘unsigned int’} [-Wformat=]
etc.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
A missing no-op causing us to emit the wrong address when relocation was
required for BB_START.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106028
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106078
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
|
|
Previous horror
(pm_backlight:2947) CRITICAL: Test assertion failure function test_and_verify, file ../tests/pm_backlight.c:112:
(pm_backlight:2947) CRITICAL: Failed assertion: ({ typeof(0) _a = (0); typeof(val - tolerance) _b = (val - tolerance); _a > _b ? _a : _b; }) <= result
(pm_backlight:2947) CRITICAL: error: 7125 > 0
References: https://bugs.freedesktop.org/show_bug.cgi?id=107847
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Add a warning to update test if GEN version is not recognized.
Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
The legacy interface passes in a single handle, and instead of providing
the pixel_format fourcc, passes in a bpp/depth combination that the
kernel translates into a fourcc. If that is an illegal combination, the
kernel should be reporting EINVAL rather than pass an unknown
framebuffer to the drivers.
As the number of possible permutations of bpp/depth (both are strictly
u32 parameters) is huge, we simply fuzz the interface for 1s.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
gen11 enables 90/270 rotation for RGB565 mode. IGT would need support for
C8 mode to enable running this subtest on gen11 and later.
v2 (Mika Kahola): Combine gen checks into one comparison. Update
comment on why bad-pixel-format is disabled beyond gen11.
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
|
|
Test DRM_FORMAT_RGB565 rotation when gen is 11 or higher.
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
|
|
Test only PSR1 on PSR2 panels by making use of the debugfs toggle.
Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
|
|
The tests we have work only with PSR1, but setting the module parameter
enable_psr enables PSR2 if the panel supports it. Make use of the newly
added debugfs toggle to enable only PSR1 when testing.
Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
|
|
Make use of igt_debugfs_simple_read() to open debugfs dir just once.
v2: Renamed function parameters s/fd/debugfs_fd (Jose)
Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
|
|
The tests calls igt_debugfs_dir() to open the debugfs dir and further
along calls igt_debugfs_read() each time i915_edp_psr_status needs to be
read. As igt_debugfs_read() opens the directory unnecessarily, switch to
using the newly added igt_debugfs_simple_read()
v2: Commit message typo (Jose)
Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
|
|
tests/kms_frontbuffer_tracking and tests/kms_psr read debugfs nodes
several times after opening the directory once. There is already an
implementation of this in the kms_frontbuffer_tracking, moving that
functionality to the library will allow us to share the code with kms_psr
and kms_fbcon_fbt
Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
|
|
If we cannot do runtime suspend, testing it's impact on the backlight is
moot. Simply skip on systems that cannot runtime suspend.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107789
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107790
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107794
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
We cannot control the backlight if its attached output is not connected.
Don't assert, but require.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
|
|
Feed some impossible garbage into drmWaitVblank and expect the kernel to
report EINVAL.
v2: Cancel the double negative of ~invalid_flags
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Our unclaimed mmio access debugging is lazy, doing cheap checks
periodically and only if they fail do a full check around every mmio
access. When testing for runtime pm, enable the full mmio debugging from
the initial load.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Imre Deak <imre.deak@intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
|
|
Make sure we do flush out the previous spinner and delay signaling
transition completion until we do.
References: https://bugs.freedesktop.org/show_bug.cgi?id=102250
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Katarzyna Dec <katarzyna.dec@intel.com>
Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com>
|
|
Actually wait for the load-helper to complete it switch over to the new
load by using a pipe(22) between the two.
References: https://bugs.freedesktop.org/show_bug.cgi?id=102250
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com>
|
|
We want to test that provoking a vblank interrupt works correctly after
waking up from runtime-pm. First though, we must wait for the device to
enter runtime-suspend. If the device cannot, e.g. we haven't enabled the
DMC firmware, the test should skip because our external requirements are
not met.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107768
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Imre Deak <imre.deak@intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
|
|
BIOS programs few of PWM related registers during initial boot.
But during System suspend those registers are cleared.
This test aim to check whether display programs those registers properly after
system resume.
Also checks brightness programming during DPMS ON/OFF cycle to check backlight
programming is done properly from display side.
v2 : Optimize the code to avoid code redundancy. (Rodrigo)
Signed-off-by: Jyoti Yadav <jyoti.r.yadav@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
|
|
Normalize the variance to stddev, and remove some redundant steps in
computing the time from itself.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
|
|
Our observation is that the systematic error is proportional to the
number of iterations we perform; the suspicion is that it directly
correlates with the number of sleeps. Reduce the number of iterations,
to try and keep the error in check.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
|
|
Until the previous commit we had to disable the mode after reading CRC
because otherwise we might not have been enable features correctly.
Now we can just stage the disable without applying it, so each subtest
can set its desired mode and igt_display will update the state as
required.
Behavior with legacy PSR:
- Modeset enable, read CRC, enable legacy PSR switch, disable CRTC if
using legacy PSR by calling igt_display_commit. Next enable CRTC will
enable PSR.
Behavior with debugfs PSR:
- Modeset enable
- Read CRC
- Enable debugfs PSR switch. PSR enabled.
- Next commit will be done by test, which can disable the mode or set a
mode. The latter case will be a compatible mode, in which case we
avoid the modeset.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
|
|
features, v5.
Disabling PSR and FBC used to require a commit, but now that changes
to FBC take effect after the next commit, and PSR is toggled through
debugfs we can skip those modesets.
Changes since v1:
- Try to avoid modesets for PSR if the kernel supports it, but otherwise force
a modeset for the changes to take effect.
Changes since v2:
- Rebase on top of previous PSR changes.
Changes since v3:
- Rebase on move to lib/igt_psr.
Changes since v4:
- Split out related changes. (dhnkrn)
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
|