Age | Commit message (Collapse) | Author |
|
Several years ago we made the plan of only having one canonical source
for i915_pciids.h, the kernel and everyone importing their definitions
from that. For consistency, we style the intel_device_info after the
kernel, most notably using a generation mask and a per-codename bitfield.
This first step converts looking up the generation for a devid tree from
a massive if(devid)-chain to a (cached) table lookup.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
This reverts commit 4a1859781f154513f19cd6392e04f50dbe6c030a.
This commit wasn't ready yet, should never have been committed.
|
|
All pipes are now updated in the loop first, before connectors
are read out. The mode_id and active crtc properties are added,
and crtc_id for connectors. These are required to do a modeset,
and the behavior during atomic commits is changed slightly too.
A lot of code will do the following:
- Init.
- igt_output_set_pipe(output, pipe);
- commit.
Since legacy setcrtc and atomic commit differ, there are some
differences in how we commit pipes and connectors too.
For atomic we set output->crtc during igt_output_set_pipe,
and use it in atomic commit. This may be set to NULL, in which
case the output is disconnected from the crtc. Unlike legacy
we won't attempt to bind all connectors to all pipes, only
the ones that were explicitly set.
As a test, convert kms_rmfb.c
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
for_each_valid_output_on_pipe.
There are a lot of places where we do either
for_each_pipe {
igt_subtest_f(... "-pipe-C", pipe_name())
for_each_connected_output()
/* Run subtest */
}
or:
igt_subtest_f(...) {
for_each_pipe()
for_each_connected_output()
/* Run subtest */
}
The former should be replaced with for_each_valid_output_on_pipe,
the latter with for_each_pipe_with_valid_output.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
This is unusual. Usually IDs listed on early stages of platform
definition are kept there as reserved for later use.
However these IDs here are not listed anymore in any of steppings
and devices IDs tables for Kabylake on configurations overview
section of BSpec.
So it is better removing them before they become used in any
other future platform.
It reflects kernel:
commit a922eb8d4581c883c37ce6e12dca9ff2cb1ea723
Author: Rodrigo Vivi <rodrigo.vivi@intel.com>
Date: Thu Jun 23 14:50:36 2016 -0700
drm/i915: Removing PCI IDs that are no longer listed as Kabylake.
v2: Rebase.
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
|
|
The spec has been updated adding new PCI IDs.
In parity with kernel:
commit 33d9391d3020e069dca98fa87a604c037beb2b9e
Author: Rodrigo Vivi <rodrigo.vivi@intel.com>
Date: Thu Jun 23 14:50:35 2016 -0700
drm/i915: Add more Kabylake PCI IDs.
v2: Avoid using "H" instead of HALO to keep names uniform - DK.
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
When opening the device, we first ensure the device is idle. However,
performing GEM operations on !i915 is bad behaviour, so don't.
Signed-off-by: Robert Foss <robert.foss@collabora.com>
|
|
We don't do anything yet other than try to load the module. Initial
sanity checks to come.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Zhi Wang <zhi.a.wang@intel.com>
|
|
Silly compiler emitting warnings that just cause people to break code
attempting to silence the compiler.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Pass -s switch to modprobe so that we don't litter stderr with the error
message for a missing module - the load failure is sufficient.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
For fun, debugfs/.../names currently explodes, so lets capture that and
make sure that basic access to debugfs does no harm.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
It access hardware, hence why the simple igt_only_list_subtests()
check from igt_fork/stop_signal_helper() isn't enough.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
0xffffffff as an illegal command confuses the command execution
on gen9 so that the next BB start will get ignored, causing a runaway
head past the bb end. This delays the hang detection substantially
as hangcheck then observes only a non progressing seqno.
Omit the bad instruction on gen8+ and rely on the chained batch
loop to cause a deterministic hang. Make the chained bb start
to jump straight into bb start, omitting the MI_NOOP or the bad
instruction on subsequent passes. This makes the acthd sampling
to hit more reliably to the same value, as the loop is smaller,
making the head appear to be 'more stuck'.
References: https://bugs.freedesktop.org/show_bug.cgi?id=92715
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
|
|
Check for available stolen memory size before attempting to run
the stolen memory tests. This way we make sure that we do not
create objects from stolen memory without knowing the available size.
This checks if the kernel supports creation of stolen backed objects
before doing any operation on stolen backed objects.
Also correcting the CREATE_VERSION ioctl number in getparam ioctl,
due to kernel changes added in between.
v2: Removed size argument for checking stolen memory availability (Tvrtko)
Signed-off-by: Ankitprasad Sharma <ankitprasad.r.sharma@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
|
|
relative path. Fix by passing the correct dirfd.
Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
CC: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-By: Chris Wilson <chris@chris-wilson.co.uk>
|
|
There are two paths to force enable a connector, via debugfs and via
sysfs. sysfs has the advantage of being a stable interface and of
updating the connector after application (allowing us to not force a
reprobe from userspace).
v2: Don't assume Intel only
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
igt_sysfs_set() for setting an attribute via sysfs, igt_sysfs_get() for
reading.
v2: Lots of little bugs in igt_sysfs_get()
v3: Pass device to open, stop assuming Intel rules.
v4: Test opening and reading!
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
When reworking igt_create_fb_with_bo_size to use
igt_create_bo_with_dimensions, we mistakenly stopped acknowledging
non-zero size parameters.
To fix this, we move the core of the code to create_bo_for_fb and teach
it to use the GEM APIs when a size is passed.
igt_create_bo_with_dimensions ends up calling just create_bo_for_fb with
a zero size because now the later is more generic than the former.
Also, create_bo_for_fb now returns the handle of the BO that was
created, as there's no point anymore in having it be a parameter passed
by reference.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
|
|
Some validation teams seem to run tests out of source directories that
have been nfs mounted or rsync'd to different locations on the target
machine. This causes the igt_srcdir that the tests were built with to
be invalid on the machine the tests get run on. Add the current
directory as a final fallback for data file searches.
Reference: https://bugs.freedesktop.org/show_bug.cgi?id=92248
Cc: Humberto Israel Perez Rodriguez <humberto.i.perez.rodriguez@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
|
|
Noticed while discussing CRC tests with Ville that this was totally
wrong.
v2: Ville pointed out that it only does not block when opened using
igt_pipe_crc_new_nonblocking. Still different from
igt_pipe_crc_collect_crc, which will always block.
v3: Fix type (Ville).
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
First try an illegal instruction before the infinite loop to try and
trigger a gpu hang more gracefully as the infinite loop is causing some
older machines issues as the GPU hogs the entire systems and makes the
machine laggy, unresponsive for long periods.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Now that we have actual functions for kms_test_*_str since
commit 2d432fc5773df17f04283f4780dab161dd2e1c85
Author: Jani Nikula <jani.nikula@intel.com>
Date: Wed May 11 12:42:06 2016 +0300
lib/igt_aux: define actual functions for kmstest_*_str
move also the gtk-doc comments next to the definitions, for consistency.
Acked-by: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
|
|
Add docs, rename parameter and rename the macro to igt_do_timeout to
make it clear it works like a loop.
v2: Rename instead to igt_until_timeout (Chris).
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
- Give __ prefix to internal funcstion and structs, only
igt_interruptible is used by tests.
- Move docs to igt_interruptible and adjust.
- Explain more clearly how the timeout is getting doubled each
iteration until no more interruptions happen. Also rename the
argument to give it a more meaningful name in the docs.
- Link from other functions to this one for cross-referencing.
- Rename to igt_do_interruptible to make it clearer it's a loop,
inspired by do {} while () loops.
v2: Rename instead to igt_while_interruptible and fix typos (Chris).
And add gtk-doc for igt_ioctl, too.
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
Macro generated function definitions considered harmful. You can't find
them with code search tools or grep. There may be places where such
things might be useful, but this is not it.
Define actual functions for kmstest_encoder_type_str(),
kmstest_connector_status_str() and kmstest_connector_type_str(). While
at it, make the arrays static const.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
|
|
Virtual, DSI, DP MST.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
|
|
On Cherryview PIPE_C can only be connected to PORT_D (bspec).
The driver properly reports the crtc_mask for the encoder, however the
mismatch between pipe and port is not reported back to the test.
Add support for detecting this case so the test can be skipped.
v2: Apply review comments (Marius)
Signed-off-by: Gabriel Feceoru <gabriel.feceoru@intel.com>
Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
|
|
Before we print the exitcode to the debug/kmsg logs, we should inspect
what its final value will be. For example, in the case of running
multiple subtests which all happen to be skipped, igt_exitcode is 0, but
the final exit code will be 77.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Tested-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
|
|
It's also confusing as the style differs from the kernel (exact platform
in the kernel vs. the platform and any later ones in igt).
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
|
|
32bit builds ran into a silly multiplication issue when computing
elapsed nanoseconds of more than 2s...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
If we assume that the first settimer and clock_gettime() itself have
appreciable overhead, try to exclude those from the calibration delay.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
On Baytrail, Braswell and Atoms beyond we see an issue where the mfence
is insufficient to force the cacheline to be coherent (i.e. such that
writes from the GPU are visible by the CPU after the call to clflush). A
second clflush is ordered with an earlier clflush to the same address
and this appears sufficient to give the coherency required for GPU/CPU
interop.
Testcase: igt/gem_exec_flush
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Akash Goel <akash.goel@intel.com>
|
|
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
|
|
disk.
Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
|
|
Makes sure we automatically extend that when adding more planes.
Inspired by a patch from Robert Foss who extended the max, but forgot
all about the enum.
While at it, also fix up the whitespace damage.
Cc: robert.foss@collabora.com
Acked-by: robert.foss@collabora.com
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
create_bo_for_fb() expects the drm format as a parameter since
commit 8a1a38661f56 ("lib: Add igt_create_bo_with_dimensions")
but not all callers were updated. Fix that up.
Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Fixes: 8a1a38661f56 ("lib: Add igt_create_bo_with_dimensions")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93328
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
The variable used as loop counter in the igt_fixture macro had
unspecified value from the setjmp(3) man page quoted below. Because of
that, in certain circumstances and with -O2 and -Os, the initialization
of that variable would be eliminated and the compiler would complain of
uninitialized usage. Below can be found a snippet that reproduces the
problem with GCC 5.3.1 and 4.9.3 and the errors as printed by 5.3.1.
"The compiler may optimize variables into registers, and longjmp() may
restore the values of other registers in addition to the stack pointer
and program counter. Consequently, the values of automatic variables
are unspecified after a call to longjmp() if they meet all the following
criteria:
· they are local to the function that made the corresponding setjmp(3)
call;
· their values are changed between the calls to setjmp(3) and
longjmp(); and
· they are not declared as volatile."
static void test(void)
{
igt_subtest_group {
igt_fixture {
}
igt_subtest("foo") {
}
igt_fixture {
}
}
}
In file included from lib/intel_batchbuffer.h:8:0,
from lib/drmtest.h:39,
from lib/igt.h:27,
from tests/kms_addfb_basic.c:28:
tests/kms_addfb_basic.c: In function 'tiling_tests.isra.0':
lib/igt_core.h:110:43: warning: '__tmpint245' is used uninitialized in
this function [-Wuninitialized]
#define igt_fixture for (int igt_tokencat(__tmpint,__LINE__) = 0; \
^
lib/igt_core.h:110:43: note: '__tmpint245' was declared here
#define igt_fixture for (int igt_tokencat(__tmpint,__LINE__) = 0; \
^
lib/igt_core.h:148:31: note: in definition of macro '__igt_tokencat2'
#define __igt_tokencat2(x, y) x ## y
^
lib/igt_core.h:110:30: note: in expansion of macro 'igt_tokencat'
#define igt_fixture for (int igt_tokencat(__tmpint,__LINE__) = 0; \
^
tests/kms_addfb_basic.c:245:3: note: in expansion of macro 'igt_fixture'
igt_fixture {
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
This function uses an intel-specific ioctl to fetch a mapping between pipes and
crtc ids, but this technique is outdated as the crtc id is now always
equivalent to its index in the array of crtcs returned by the kernel.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
For those tests that now pass on drivers other than i915, call
drm_open_driver_master with DRIVER_ANY.
Also do so from igt_enable_connectors.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
igt_create_bo_with_dimensions() is intended to abstract differences
between drivers in buffer object creation.
The driver-specific ioctls will be called if the driver that is being
tested can satisfy the needs of the calling subtest, or it will be
skipped otherwise.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
If a buffer object is dumb, call DRM_IOCTL_MODE_MAP_DUMB when mapping
it. Also, don't call DRM_IOCTL_I915_GEM_SET_DOMAIN on dumb buffers.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Just wraps drmModeDirtyFB and for now invalidates the whole FB.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|