Age | Commit message (Collapse) | Author |
|
Given an implicit semaphore from one engine to the next, check that if
we skip the wait on that semaphore the following batch although
submitted early (as it depends along the single engine timeline) is not
executed ahead of its dependency.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
|
|
Check that we can reorder batches around userspace semaphore waits by
injecting a semaphore that is only released by a later context.
NB: This is expected to fail with the current execlists implementation.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
|
|
Use spin->condition to mark the spot we have
saved for manipulating the looping condition.
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Libify resetting a spin for reuse.
v2: use also in perf_pmu
v3: s/cmd_spin/cmd_precondition
v4: remove early return for !spin (Chris)
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Unref the bos after one subtest is done. The next subtest
will allocate its own bos.
v2: Add scratch_buf_fini() and reverse the onion (Chris)
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
There is no guarantee that spinners are and will be implemented
using batches. As we have igt_spin_t, manipulate it through
igt_spin_* functions consistently and hide the batch nature.
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Instead of opencoding the poll into the spinner, use
a helper to check if spinner has started.
v2: use zero as presumed offset (Chris)
v3: cleanup the relocs (Chris)
v4: leave the domains to zero, avoid relocation (Chris)
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Add subtests to resend the same spinner to same context
and to other context.
v2: other engines (Chris)
Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
When resubmitting the spinner, fill in the expected offset so that we
are not tempted to relocate it across contexts (as the spinner must
point back to itself for the MI_BB_START to work). In this case, these
should work correctly as they are reusing the same active vma, but for
pedagogy we should dtrt.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
|
|
Copy uapi/i915_drm.h across from
kernel commit d1172ab3d443e84ade75285f8c107bfac7e386d8
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Fri Apr 12 08:14:16 2019 +0100
drm/i915: Introduce struct class_instance for engines across the uAPI
and adapt gem_ctx_sseu to match the new struct.
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>
|
|
We have to control the cache domains, especially important before first
writing into the object.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
The driver is supposed to update the size when it's trying to outsmart
userspace. Let's test it.
v2: Rework to use local ioctl wrapper (Chris)
v3: s/16/15, move test a bit earlier (Chris)
Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Janusz Krzysztofik <janusz.krzysztofik@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
If we have two tasks running on xcs0 and xcs1 independently, but who
queue subsequent work onto rcs, we may insert semaphores before the rcs
work and pick unwisely which task to run first. To maximise throughput,
we want to run on rcs whichever task is ready first. Conversely, if we
pick wrongly that can be used to trigger a GPU hang with unaware
userspace.
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>
|
|
The test uses the new library helper so it doesn't need any local
helper.
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Petri Latvala <petri.latvala@intel.com>
Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
|
|
I was looking into a failure in which I had
libkmod: ERROR ../libkmod/libkmod-config.c:790 conf_files_list: opendir(/etc/modprobe.d): Too many open files
libkmod: ERROR ../libkmod/libkmod-config.c:790 conf_files_list: opendir(/lib/modprobe.d): Too many open files
(gem_exec_parallel:1315) igt_kmod-WARNING: Could not load i915
(gem_exec_parallel:1315) igt_kmod-WARNING: Could not load i915
I got curious because libkmod doesn't open more than one config file at
a time. What's happening is that libkmod is not the culprit, it's just
the one that failed because we open /dev/dri/card0 -ETOOMANYTIMES.
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Share the implementation to tweak the maximum number of open files.
The version in tests/i915/gem_exec_reuse.c was a little bit different,
but I don't think it needs to be because it would still return a
failure if any of the calls to setrlimit() fail. So I'm using the other
one.
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
backlight fade with suspend test turns off dpms which turns off the edp
backlight. Then it does a system suspend and resume. After resume,
the edp backlight would still be off, but the test sets the brightness
value and reads it back. Since the edp backlight is off, the brightness
values written and read are different causing the test to fail.
Do not turn off the DPMS before suspend so that after system resume,
the edp backlight would be on and setting the brightness value would
be successful.
v2: Remove "DPMS off" before system suspend instead of adding
"DPMS on" after system resume.
Cc: Jyoti Yadav <jyoti.r.yadav@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: Clinton Taylor <clinton.a.taylor@intel.com>
Signed-off-by: Harish Chegondi <harish.chegondi@intel.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=107820
Fixes: 377752242995 ("Brightness test with DPMS and System suspend.")
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
|
|
We only need the warning once, not for the several thousand relocations
we try. The current execbuf implementation will set all presumed_offset
to -1 so this loop should quit on the first entry if we hit the
pagefault, but for the sake of completeness check all.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110269
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
|
|
i915_ring_missed_irq was removed from debugfs in kernel patch
789659f4307a ("drm/i915: Drop fake breadcrumb irq") and it was the
base of which i915_missed_irq was written, so removing this test for
good.
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
If we caused a fault on a GEM buffer while in the middle of trying to
write/read into that buffer, we could conceivably deadlock (e.g.
recursing on struct_mutex if we are not careful). Exercise these cases
by supplying a fresh mmap to pread/pwrite in both non-overlapping and
overlapping copies.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
|
|
We may use HW semaphores to schedule nearly-ready work such that they
are already spinning on the GPU waiting for the completion on another
engine. However, we don't want for that spinning task to actually block
any real work should it be scheduled.
v2: No typeof autos
v3: Don't cheat, check gen8 as well
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>
|
|
By clean up idle work, gem-execbuf-stress subtest runs 1.2 sec.
I divide "i915_pm_rpm: remove gem-execbuf-stress-extra-wait because
same as gem-execbuf-stress" into 2 patches. This is one of them.
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Caz Yokoyama <caz.yokoyama@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
One significant usecase for intel_reg/etc. is to be able to examine
the hardware state *before* loading the driver. If the tool forces
the driver to load we've totally lost that capability.
This reverts commit 8ae86621d6fff60b6e20c6b0f9b336785c935b0f.
Cc: Michał Winiarski <michal.winiarski@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Acked-by: Michał Winiarski <michal.winiarski@intel.com>
|
|
It's just added to in a loop later without any initialization or
direct assignment.
Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Even with 128MiB reserved for other use, a single pass of gem_exec_big
runs out of memory. Give in and halve our batch size, that has to be
enough slack! As to why it keeps on failing, is left as an exercise to
the reader -- we have to solve the mm/ mystery one day, as eventually it
will be our only remaining source of bugs!
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
|
|
To make the demonstration of the cheeky preemption more impactful, make
the second context a nop to contrast the first being 1024
MI_STORE_DWORD_IMM. Then if we execute and wait on the second context
before executing the first, the client latency is even more drastically
reduced.
To more clearly show any effect on wait reordering, measure the
alternative path and present both.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
|
|
The invalid set/get tests do not serve the purpose of detecting whether
or not invalid parameters are indeed detected correctly -- simply because
the kernel is the arbiter of what is invalid and this test second
guesses that and is wrong.
The intent of this test was to ensure that we didn't include any holes
in the parameter space that may have been used for nefarious undisclosed
purposes, i.e. the maintainer's job backed up by reviewers.
As proving no holes is impossible without fuzzing/exhaustive search and
a whitelist, accept defeat and just check whether the very last
parameter (which should be unused for a long, long time) is invalid.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
|
|
CI complains that the exhaustive test of trying every size up to the
limit is too slow, so add a simple test that tries to submit one
extreme batch buffer and check all the relocations land.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105555
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
|
|
In order to correctly serialise the order of execution between rings, we
need to flag the scratch address as being written. Make it so.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
|
|
Show the total power consumed across all the whispers.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
|
|
How much energy does spinning on a semaphore consume relative to plain
old spinning?
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
|
|
It is the user's responsibility to manage their domains. In libdrm, when
you mmap a pointer, it calls set-domain automatically, but igt requires
the caller to manage it explicitly, so do so. The vast majority already
do correct manage the domain as they use the pointer into the mmap, just
a few have been missed over the years.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Historically, the GTT pagefault invoked set-domain(GTT) to transparently
handle swapin. However, this implied that the GTT faults were
synchronous with GPU rendering, which was not the desired ABI, as
synchronisation is explicit via calls to GEM_WAIT or GEM_SET_DOMAIN. In
MMAP_GTT_VERSION, this accidental ABI is removed and so we test it is
gone and does not come back.
For completeness, we verify that the other mmap paths didn't block on
initial pagefaulting.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
|
|
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110212
Fixes: 8ae86621d6ff ("lib/igt_device: Move intel_get_pci_device under igt_device")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Michał Winiarski <michal.winiarski@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Don't try to evaluate whether reads executed on an absent ring do
anything.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
|
|
It allows us to make things a little bit more generic. Also, we now
require fd rather than doing guesswork when it comes to pci address.
v2: Use readlinkat rather than string concat, move stuff around, provide
a version that does not assert. (Chris)
v3: Print addr on failure, avoid assignment in conditionals. (Chris)
Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Similar to sysfs_path - more explicit more better.
Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
It's not operating on FD, and we've provided a nice reimplementation
that does. Let's use it instead.
Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
And use it! But let's start small.
Rather than going with "and by the way, here's the card index" from
igt_sysfs_path, we're making things more explicit.
v2: Drop idx comment. (Chris)
Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Doing this lets us avoid drm_get_card, which we plan to remove
eventually.
v2: We were extermally unlikely to find rps knobs in current dir.
Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
The "benchmark" mode is no longer used.
While I'm here, let's also move things around and start to use
igt_sysfs, rather implementing own set of helpers.
Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Add some invalid parameters tests for the MMAP IOCTL when the MMAP_WC
flag is supplied.
v2:
- Expand test space. (Chris)
Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Add a couple of tests that supply invalid parameters to the mmap IOCTL.
v2:
- Expand test space. (Chris)
Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Add a test for an invalid handle being passed to the IOCTL.
v2:
- Expand test space. (Chris)
Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
This patch adds mocs table for icelake with expected L3 and eDRAM
control values.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109287
Signed-off-by: Kumar Valsan, Prathap <prathap.kumar.valsan@intel.com>
Reviewed-by: Lukasz Kalamarz <lukasz.kalamarz@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Fix the off-by-one in computing the last page that caused us to try and
mmap the page beyond the end of the object.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Antonio Argenziano <antonio.argenziano@intel.com>
|
|
0-byte objects are not allowed.
References: https://bugs.freedesktop.org/show_bug.cgi?id=110106
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
|
|
Let's test Yf tiling now that rendercopy can handle it.
v2: From DK
Set bpp for Yf buffer and rebase.
v3: From DK
More documentation, fewer unexplained constants (Kasia)
v4: From DK
Rewrite Yf tiling algorithm to be more descriptive
Cc: Lukasz Kalamarz <lukasz.kalamarz@intel.com>
Cc: Katarzyna Dec <katarzyna.dec@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com>
|
|
It should be (count, size)!
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
|
|
fi-kbl-guc's swap ran dry while running blt-vs-render-ctxN, which is
mildly concerning but conceivable as we never checked there was enough
memory to run the test to begin with.
Each child needs to keep its own surface and possible a pair of logical
contexts (one for rcs and one for bcs) so check that there is enough
memory to allow all children to co-exist. During execution, we require
another surface and batch, but these are temporary and so should fit
fine with a small amount of thrashing on the boundary.
References: https://bugs.freedesktop.org/show_bug.cgi?id=109801
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
|