Age | Commit message (Collapse) | Author |
|
Not displaying the flip on the next vblank is bad, but not the end of
the world -- so long as that is only a temporary glitch. Give the vblank
a few more frames to complete, and warn instead of failing if it takes
more than one vblank interval to flip.
v2: Bump the warning to >1 missed flip, to spare us the noise.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
We want to use a child in order to detect an uninterruptable sleep (a
potential bug we might hit), but we can use igt_waitchildren_timeout()
to replace our risky self-signaling + nanosleep.
v2: Remove the now redundant signal() setup.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103182
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
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>
|
|
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>
|
|
Link a vgem dmabuf into an i915 bo and then ask the i915 shrinker to
purge/invalidate its pages. This should establish the lockdep link from
the fs_reclaim shrinker section to whatever locks are used to
acquire/release dmabuf mappings; if any are required ofc.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
|
|
We test map_gtt coherency (whether or not a write via the mmap_gtt is
immediately visible in the backing storage to a read via mmap_cpu) but
we know that several platforms are inherently incorrect and require some
form of hammer to workaround internal delays. These platforms break our
ABI guarantees and so we report the change in ABI via a driver getparam.
If we know the platform doesn't meet the ABI guarantee, skip the test.
If it is meant to work, test!
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100587
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>
|
|
Add support to create planar framebuffers, but don't add formats
that support them yet. This first requires conversion to the RGB24 format.
Changes since v1:
- Don't crash in igt_create_bo_with_dimensions().
Changes since v2:
- Zero offsets for dumb fb too.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
[mlankhorst: Change memset(4 * ..) to memset(ARRAY_SIZE(format->plane_bpp) * ..)]
|
|
General update to reflect current state of things.
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Acked-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com>
Acked-by: Petri Latvala <petri.latvala@intel.com>
|
|
We don't expect every machine to be able to pass the WC/GTT coherency
check, see
kernel commit 3b5724d702ef24ee41ca008a1fab1cf94f3d31b5
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Thu Aug 18 17:16:49 2016 +0100
drm/i915: Wait for writes through the GTT to land before reading back
If we quickly switch from writing through the GTT to a read of the
physical page directly with the CPU (e.g. performing relocations through
the GTT and then running the command parser), we can observe that the
writes are not visible to the CPU. It is not a coherency problem, as
extensive investigations with clflush have demonstrated, but a mere
timing issue - we have to wait for the GTT to complete it's write before
we start our read from the CPU.
The issue can be illustrated in userspace with:
gtt = gem_mmap__gtt(fd, handle, 0, OBJECT_SIZE, PROT_READ | PROT_WRITE);
cpu = gem_mmap__cpu(fd, handle, 0, OBJECT_SIZE, PROT_READ | PROT_WRITE);
gem_set_domain(fd, handle, I915_GEM_DOMAIN_GTT, I915_GEM_DOMAIN_GTT);
for (i = 0; i < OBJECT_SIZE / 64; i++) {
int x = 16*i + (i%16);
gtt[x] = i;
clflush(&cpu[x], sizeof(cpu[x]));
assert(cpu[x] == i);
}
Experimenting with that shows that this behaviour is indeed limited to
recent Atom-class hardware.
so split out the interleave coherency check from the basic
interopability check.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102577
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>
|
|
This reverts commit d7a0b61450797a3d6644c65aebf75c2a90da1a15.
|
|
Default is not an engine but an ABI alias for RCS. Remove it
from the engine list to eliminate redundant subtests and test
passes.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Acked-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
Rather than have the code in multiple locations, put a copy in lib/
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
commit 4337091f6af6 moved the initialisation of the pollfd into the
child, forgetting that it was also used in the parent as a sanity check.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97885
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Avoid having both the child and parent do the same "did the flip"
happen check with each looking for the same event on the same fd. The
problem being that the child may fall asleep and by the time it wakes up
to do its check, the parent has already eaten the event. So leave the
checking that the flip does occur to the parent.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
On the move to doing front/back flips, I managed to completely break the
test by forgetting to pass the fence to be signaled.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Check that we neither stall nor flip too early given active front/back
buffers.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Identify whether it is the nonblockling page-flip request that blocks or
the event is fired too early.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
This reverts commit 5188745c4b531d09508cf0897fb90a3634299283.
|
|
The following tests are causing problems in CI:
prime_vgem@basic-fence-flip, fails intermittently on a HSW and SKL
prime_vgem@basic-fence-wait-default, fails on all platforms since it
was added
prime_vgem@basic-sync-default, fails on all platforms since it was
added, and it sometimes hangs BYT machine
prime_vgem@basic-busy-default, fails on all platforms since it was
added
prime_vgem@basic-wait-default, fails on all platforms since it was
added, and it sometimes hangs BYT machine
Add a flag to enable them when they get stable enough.
Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Wait until the child tells us they are running (and have verified the
initial buffer state) before modifing the vgem buffer and then signaling
the child.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Ensure that the child does need to sleep before the vgem is written.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
To protect the kernel against unscrupulous fence users, fences should
automatically signal after a timeout.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Close the batch before asserting so that we don't have to wait for a
hang after a failure.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Since we use distinct WC addresses for the same page, we need to flush
the WCB after the write in order to see it from the other mmaping.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Primarily to check that we have the WC read/write disparity.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|