Age | Commit message (Collapse) | Author |
|
This is the same as using config.pipe because the order of crtcs will
never change.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Ander Conselvan de Oliveira <conselvan2@gmail.com>
|
|
So that this test can be run in drivers other than i915.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
|
|
Paint the color key with cairo, so the test doesn't have to map the BO
by itself, which depends on the driver being tested.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
|
|
Fixup some fallout from the connector probing changes so testdisplay -m
will pick up newly hotplugged displays correctly.
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org.
|
|
Several tests do one or more of the following:
* igt_create_fb() + igt_paint_test_pattern()
* igt_create_color_fb() + igt_paint_test_pattern()
* igt_create_fb() + igt_paint_image()
Extract them into new helpers: igt_create_pattern_fb(),
igt_create_color_pattern_fb(), igt_create_image_fb().
v2: Fix typos, and improve API docs (Thomas)
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Speeds up testcases except for those where we want to exercise the
probing itself. The only exceptions left where we do a full probe are
- pm_rpm: We use it to make sure the kernel doesn't get things wrong
with power domains, so we really want to exercise the full probe
paths. And there the only place really is the specific validation
done with the data gathered by get_drm_info.
- kmstest_force_ functions: Newer kernels should be better at
re-probing state when the force sysfs fields change, but better safe
than sorry.
v2: I also consolidated the start_n_modes and start_connectors while
at it - move one of the fixup hunks to this patch that accidentally
got misplaced (Thomas).
Cc: Thomas Wood <thomas.wood@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
gem_mmap__{cpu,gtt,wc}() already has the assert built in, so replace
__gem_mmap__{cpu,gtt,wc}() + igt_assert() with it.
Mostly done with coccinelle, with some manual help:
@@
identifier I;
expression E1, E2, E3, E4, E5, E6;
@@
(
- I = __gem_mmap__gtt(E1, E2, E3, E4);
+ I = gem_mmap__gtt(E1, E2, E3, E4);
...
- igt_assert(I);
|
- I = __gem_mmap__cpu(E1, E2, E3, E4, E5);
+ I = gem_mmap__cpu(E1, E2, E3, E4, E5);
...
- igt_assert(I);
|
- I = __gem_mmap__wc(E1, E2, E3, E4, E5);
+ I = gem_mmap__wc(E1, E2, E3, E4, E5);
...
- igt_assert(I);
)
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Stochastically-reviwewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Rename the current gem_mmap__{cpu,gtt,wc}() functions into
__gem_mmap__{cpu,gtt,wc}(), and add back wrappers with the original name
that assert that the pointer is valid. Most callers will expect a valid
pointer and shouldn't have to bother with failures.
To avoid changing anything (yet), sed 's/gem_mmap__/__gem_mmap__/g'
over the entire codebase.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Stochastically-reviwewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Get rid of the gem_mmap() alias of gem_mmap__gtt(). I don't see any
point in having it.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Stochastically-reviwewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
When testing all modes on a connector with a single mode, if the modeset
fails, the code attempts to remove fb_info[-1], because old_fb still has
the inital value of -1.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90625
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Apply the new API to all call sites within the test suite using the following
semantic patch:
// Semantic patch for replacing drm_open_any* with arch-specific drm_open_driver* calls
@@
identifier i =~ "\bdrm_open_any\b";
@@
- i()
+ drm_open_driver(DRIVER_INTEL)
@@
identifier i =~ "\bdrm_open_any_master\b";
@@
- i()
+ drm_open_driver_master(DRIVER_INTEL)
@@
identifier i =~ "\bdrm_open_any_render\b";
@@
- i()
+ drm_open_driver_render(DRIVER_INTEL)
@@
identifier i =~ "\b__drm_open_any\b";
@@
- i()
+ __drm_open_driver(DRIVER_INTEL)
Signed-off-by: Micah Fedke <micah.fedke@collabora.co.uk>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Add a header that includes all the headers for the library. This allows
reorganisation of the library without affecting programs using it and
also simplifies the headers that need to be included to use the library.
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Update igt_paint_image so that it can read images from the package data
directory.
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Install the test programs by default so that they can be packaged.
Tested with the testdisplay test so that it still runs after the
modifications as it depends on a data file to be present. Need to
pass -r option to enable QR code display on success (PNG data file).
Packaging is useful when building a complete software stack for a
DUT from scratch. This should bring us closer to achieving a
built-from-scratch testing workflow.
Package maintainers can always decide to ignore the installed files.
v2:
- Install more tests including scripts and their data
v3:
- Add clarification to commit message about why we do this.
(Chris Wilson & Thomas Wood)
- Change libexec into pkglibexec to comply to standard
(Thomas Wood)
- Do not install $(common_files). (Thomas Wood)
- Make it really obvious the installed files are tests by using
tests directory name to avoid any confusion with packagers.
v4:
- Fixed commit message.
v5:
- Add file locator helper to retain backwards compatibility.
(Thomas Wood)
- Test with testdisplay -r option that draws the .png file.
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Thomas Wood <thomas.wood@intel.com>
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
This converts the IGT API only, underneath legacy set_tiling is still used.
v2: One got away in kms_flip.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
The integer comparison macros give us better error output by including
the actual values that failed the comparison.
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
The optopt variable is not set if an invalid long option is used, so
check the current option character instead.
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
This is a regression from
4306538d1d3f60877866c39c9ca953cc5e541dae is the first bad commit
commit 4306538d1d3f60877866c39c9ca953cc5e541dae
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
AuthorDate: Thu Oct 2 11:18:20 2014 +0200
Commit: Daniel Vetter <daniel.vetter@ffwll.ch>
CommitDate: Thu Oct 2 11:34:55 2014 +0200
tests: Sprinkle missing igt_exit() where needed.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85582
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
Yay for breaking piles of tests.
This regression has been introduced with
commit 5782eca1e19e85a04ad402fa4094aa1b5f9c53ce
Author: Tim Gore <tim.gore@intel.com>
Date: Wed Oct 1 13:25:20 2014 +0100
lib/igt_core.c: disable lowmemorykiller during tests
Cc: Tim Gore <tim.gore@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
Move create_stereo_fb from testdisplay to igt_create_stereo_fb in igt_fb
so that it can be used in other tests.
v2: update for new igt_create_fb API
add parameters for format and tiling
remove some old debug code
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
We may be able to scan out more tiling formats in the future.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
A plain bool is enough.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
So give it a kmstest_ prefix and shuffle it around a bit.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
testdisplay does not have any subtests and should therefore exit with
the appropriate exit code if the --list-subtests or --run-subtest
options are used.
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
The Piglit test runner for intel-gpu-tools creates a new process group
for the test processes, so attempting to set terminal attributes causes
the process to receive SIGTTOU and be stopped. Since the test is not run
interactively in this case, the issue can be avoided by not setting
terminal attributes if the process is not in the foreground process
group.
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Re-run with correct igt_fail rules. Again manually fixup missing
includes for igt_core.h.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
These should go to stdout instead. The next patch will clean this up
with cocci, so no change from fprintf(stdout, to printf( here.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
At normal exit in test_all_modes we don't restore the original termio,
since g_io_channel_shutdown() closes the stdin fd and so the following
tcsetattr on stdin will fail. We also don't restore the termio at signal
exit. Fix both cases by installing an exit hanlder with a dup'ed stdin fd.
Signed-off-by: Imre Deak <imre.deak@intel.com>
|
|
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
So hotkeys take effect immediately.
|
|
We always want the same boring one, so extract it.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Shorter and more in line with our general igt_ prefix for everything
which isn't somehow intel or i915-gem or otherwise hw specific - these
helpers here are all fully generic framebuffer handling functions
based on kms + cairo.
Well, the actual buffer alloc is done with i915 gem, but meh ;-)
Two special cases:
- bpp_depth_to_drm_format and drm_format_to_bpp completely lacked
prefixes, so just add igt_.
- write_fb was a bit misleading given that we have gem_write for
uploading to buffers. Rename that to write_fb_to_png to make it
crystal clear what this thing does even without looking at docs.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Simplify the name since the old _fb function is now gone.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Use the new-style function using drm fourcc codes instead everywhere.
To easily use thew fourcc based interface also expose
bpp_depth_to_drm_format from the library. Finally include drm_fourcc.h
from the igt_kms.h header since pretty much everyone needs this now.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Brought a few missing headers to light in ioctl_wrappers.h, too.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Only the igt core and non-test tools should have asserts to catch
internal errors, tests and helper libraries should all user igt_asert
instead.
Fix things up where assert instead of igt_assert was used.
One tiny step towards header sanity.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
aka the jbarnes-me-harder mode
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
For those who wonder about the -j switch ... all the good ones have
been taken, so this is the Jesse-flag.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
cairo_t is the short lived drawing context, whereas cairo_surface_t is
the heavyweight object that persists and is also tied to underlying GEM
objects. So make the kmstest API reflect the different weights and fix
the lifetime and underlying object reference leaks.
Based on the fix by Paulo Zanoni.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
This makes cairo dependencies easier to handle. Otherwise, we
would have to litter drmtest all over with "#ifndef ANDROID"
Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
[danvet: Add missing _GNU_SOURCE to igt_kms.c and missing include to
intel_sprite_on.c]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
All tests agree that this is a letal failure, so no point
to pass it back to callers.
Also add some igt_require calls for the drm_fd where I've
noticed that it's missing.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
By not assigning opterr, getopt will print its own error message that
includes information about whether an option is unknown or just requires
an additional argument.
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|