Don't forget to flush in case we're in the last iteration of the loop.
This fixes failures of kms_frontbuffer_tracking when used with
--use-small-modes on eDP monitors.
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
We need to test those pixel formats on the FBC code, so let's make
sure the drawing library works on them first.
v2: Update the gtkdoc (Daniel).
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
If I have a program with the following:
igt_skip_on(i % 2 == 0);
igt_skip_on_f(i % 2 == 0, "i:%d\n", i);
igt_require(i % 2 == 0);
igt_require_f(i % 2 == 0, "i:%d\n", i);
then I'll get compiler error messages complaining about format
conversions related to the '%' character used in the mod operation. So
put the whole string as a %s argument to avoid interpreting '%' and
any other possible chars.
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
These always need to pass for basic PM functionality.
Reviewed-by: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
We should be able to adjust the backlight and observe changes in sysfs.
Reviewed-by: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
We should always be able to create simple and tiled objects.
v2: make the whole test basic (Daniel)
add to .gitignore
Reviewed-by: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
These simple tests should always pass.
v2: drop pwrite variant as it's more of a stress test (Daniel)
add to .gitignore
Reviewed-by: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
These ones should always pass and are fairly quick.
v2: add more tests (Daniel)
Reviewed-by: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
We should be able to create small and moderate sized objects quickly and
without errors.
Reviewed-by: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Fundamental and simple functionality.
v2: make whole test basic (Daniel)
add to .gitignore
Reviewed-by: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
They're testing basic functionality and don't involve stress or race
induction.
v2: use gem_flink and prime_self_import tests instead (Daniel)
add to .gitignore
Reviewed-by: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
There was a lot of duplication going on... Mark as basic while we're at
it as these should never fail.
v2: add to .gitignore
Reviewed-by: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Daniel complained that all the tests in gem_mmap.c were too quick. This
one aims to rectify that by double checking that if we mmap a buffer
larger enough to force swapping, everything still works.
Also fix the test to exercise the different object sizes!
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Fix
commit 59cdc16b1a6f069f944ff17851a59edf8f72d45d
Author: Arun Siluvery <arun.siluvery@linux.intel.com>
Date: Fri Jul 31 16:27:07 2015 +0100
tools/null_state/gen9: Send atleast one valid component in VF state
to honor the Reviewed-by, send all four components as noted by
Ben in his review.
Cc: Ben Widawsky <benjamin.widawsky@intel.com>
Cc: Arun Siluvery <arun.siluvery@linux.intel.com>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
The goal of the multidraw subtest is to check if alternating drawing
methods can somehow break the feature. The plane we're drawing to
really shouldn't matter here - we have other tests to make sure
drawing on the different planes works correctly. So after this patch
we'll only run the multidraw subtest for the primary plane, not for
sprite and cursors anymore.
This makes "--no-edp --fbc-only --1p-only" go from 2m29s to 1m40s on
my machine.
Of course, we can still run these tests with the --show-hidden flag.
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
We already tested these planes for FBS_INDIVIDUAL, and there are no
reasons to believe those planes will behave differently under
FBS_SHARED, so save some time avoiding potentially useless tests.
This makes "--no-edp --fbc-only --1p-only" go from 2m49s to 2m29s on
my machine.
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
A programming restriction exists for this instruction, atleast one component
of one valid vertex element must be enabled.
Cc: Ben Widawsky <benjamin.widawsky@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Arun Siluvery <arun.siluvery@linux.intel.com>
Reviewed-by: Ben Widawsky <benjamin.widawsky@intel.com>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
From Gen9, by default push constant command is not committed to the shader unit
untill the corresponding shader's BTP_* command is parsed. This is the
behaviour when set shader is enabled. This patch updates the batch to follow
this requirement otherwise it results in gpu hang.
Set shader need to be disabled if legacy behaviour is required.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89959
Cc: Ben Widawsky <benjamin.widawsky@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Arun Siluvery <arun.siluvery@linux.intel.com>
Tested-by: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Don't set the size of bindless surface state on rendercopy.
And as of doing so, take into account the workaround for setting
the command size.
This was tried during hunting for
https://bugs.freedesktop.org/show_bug.cgi?id=89959. But no
impact was found.
Cc: Arun Siluvery <arun.siluvery@linux.intel.com>
Reviewed-by: Arun Siluvery <arun.siluvery@linux.intel.com>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
The commit "benchmarks: Do not install to system-wide bin/" changed
the benchmark file list from bin_PROGRAMS to benchmarks_PROGRAMS.
However Android.mk was not updated, resulting in IGT failing to
build for Android.
This commit adds that change. It also adds LOCAL_MODULE_PATH to
specify where the built benchmarks should be put.
v2: I discovered that the existing definitions of LOCAL_MODULE_PATH
were creating what should have been an invalid path. Not sure how it
was ever working previously, but fixed now.
Signed-off-by: Derek Morton <derek.j.morton@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
We have to defer figuring out the gen until we have a PCI ID, which we
don't have for sure until the first execbuffer2 ioctl. We can't write
the file header until we have the gen since we need to know the size of
offsets in the file format. Move the call to write_header() into the
dump_execbuffer2() where we have the gen.
Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
Put 48 bit block offsets in the AUB file and track the bo offsets with
uint64_t.
Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
The test does the following
1. set_domain src GTT
2. set_caching src NONE
3. pwrite src
4. set_caching src CACHED
5. blt src->dst
6. pread dst
7. verify data matches
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
igt_plane_set_fb()+igt_display_commit() have too much overhead, and that
causes the cache to get flushed before we flip, making the test
useless, at least on machines with small LLC. Switch to
drmModeSetPlane() to reduce the chance that the cache gets flushed
before we grab the crc.
Still nowhere near 100% reliable on my IVB laptop with 3 MiB LLC,
but at least it can now hit the problem occasioanally. My desktop
IVB with 8 MiB LLC seems to hit it rather reliably.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Our invalid-flags/params testcases are meant to catch abi extensions
by just testing for the next available flag/param. Unfortunately we
need that since without those we forgot to write testcases for these
new flags way too often :(
But it's not entirely clear why this is, so document this trick with
comments.
Also gem_wait wasn't this paranoid, so change the testcase to be so.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Convenience wrapper suggested by Chris for igt_set_timeout(0, NULL).
v2: While at it add an empty line in kms_flip to make
set/reset_timeout a visual block.
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
"Timed out" isn't a terribly informative message, allow users to set
something more informative. Inspired by a request from Jesse.
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Allow specification of the many different busyness modes and relocation
interfaces, along with the number of buffers to use and relocations.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Use madvise(MADV_SEQUENTIAL) to let the kernel optimise for our
straightforward sequential read pattern.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Now that we actually install the benchmarks into a sane location,
slightly abuse it to put the tracer for gem_exec_trace alongside.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
These benchmarks are first-and-foremost development tools, not aimed at
general users. As such they should not be installed into the system-wide
bin/ directory, but installed into libexec/.
v2: Now actually install beneath ${libexec}
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This slightly idealises the behaviour of clients with the aim of
measuring the kernel overhead of different workloads. This test focuses
on the cost of relocating batchbuffers.
A trace file is generated with an LD_PRELOAD intercept around
execbuffer, which we can then replay at our leisure. The replay replaces
the real buffers with a set of empty ones so the only thing that the
kernel has to do is parse the relocations. but without a real workload
we lose the impact of having to rewrite active buffers.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Instead of doing an extra getparam ioctl to discover the PCI ID, we
can snoop it when the application queries it.
Signed-off-by: Kristian Høgsberg <krh@cryptic-dragon.jf.intel.com>
DRI3 passes the drm fd over X protocol and as such we can't rely on
hooking open to discover the drm fd. Instead we look for drm ioctl
codes in the ioctl wrapper. If we don't have a drm fd and see
something that looks like a drm ioctl, we stat the fd to see if it's a
drm fd. If it is, we save it for later so we don't have to do an
extra stat on every ioctl. We can then drop the open wrapper, but we
keep the close wrapper so we can invalidate our cached drm_fd if it's
closed.
Signed-off-by: Kristian Høgsberg <krh@cryptic-dragon.jf.intel.com>
This reverts commit 0b45b0746f45deea11670a8b2c949776bbbef55c.
We want to check against our local copy of the params so we can at least
potentially catch new flag additions.
Requested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Use -1 as the invalid param since we've added more since this test was
created, causing expected EINVAL failures to return an unexpected error
code.
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Recently added tools / benckmarks have the same module name as
existing tests. Android does not allow duplicate modules. This
patch appends _benchmark and _tool to the module names used when
building benckmarks and tools to prevent clashes with tests of
the same name.
Signed-off-by: Derek Morton <derek.j.morton@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
A helpful function for when you want to read a whole debugfs file to a
string and don't want to worry about opening and closing file
descriptors and asserting buffer sizes.
We've been using this already for kms_frontbuffer_tracking and
kms_fbcon_fbt, so the only test with new code here is kms_fbc_crc.
Also notice that for kms_fbc_crc we had to increase the buffer size
since the file can sometimes be bigger than 64 bytes - depending on
the reason why FBC is disabled.
Of course, there are probably many other programs we can patch, but
I'm not doing this now.
v2: Add the macro to wrap sizeof() (Daniel).
v3: Add documentation for the macro too (Daniel).
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>