Age | Commit message (Collapse) | Author |
|
Make sure we haven't already passed the seq numbers we're
requesting when doing the ts calibration.
Suggested-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
ABSOLUTE
Asking for the initial vblank count by specifying and absolute vblank count of 0
doesn't make much sense. Switch to a relative query instead.
v2: Drop the NEXTONMISS (Daniel)
v3: Put back the NEXTONMISS (Chris)
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
If KMS is not supported on the device, drmModeGetResources() will return
NULL, often this is an indication that we should not attempt to run the
test. Although it would be preferred to use something like
igt_require_display() as the canonical check and assert that
drmModeGetResources() did not hit an error, it is not always practical
as the tests do not utilize the common igt_display abstraction.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
|
|
This cleans up the tests slightly.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
Tested-by: Vidya Srinivas <vidya.srinivas@intel.com>
|
|
This will allow support for NV12 in the future, where igt_get_cairo_ctx
will return a RGB image to draw with, which will be converted in
igt_put_cairo_ctx so tests don't have to add special support for NV12.
This is the same as cairo_destroy + checking for errors, but not all
tests use this correctly so it's better to have a single handler for it.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
We have it. Daniel Stone said the #ifdef HAVE_CONFIG_H comes from the
X11 transition to the modular build, where in the imake -> modular
build transition config.h wasn't universally available. Now we just
make this a requirement (so yeah Android better generate one too).
v2: Improve commit message a bit.
Reviewed-by: Eric Anholt <eric@anholt.net>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Acked-by: Petri Latvala <petri.latvala@intel.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Create crtc/connector combinations based on actual adapter
information obtained from drmModeRes.
Also set MAX_CRTCs to 6 for AMD GPUs.
Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Add explanations of the checks and note the way the constants were derived.
Tweak the constants to reflect their purpose better.
|
|
A few warnings of the form:
gem_mmap_gtt.c: In function ‘copy_wc_page’:
gem_mmap_gtt.c:480:16: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
__m128i *S = (const __m128i *)src;
are no more.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Assuming that we can program any random unconnected output to a mode is
nowadays false.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98547
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
The target is that we report the vblank time accurate to within a
scanline (limit of the hw with which we can reliably compensate).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
As we allow userspace to set the dotclock, we should try to respect it!
Userpsace will try to set its frametimings based upon the dotclock, so
ideally it should match the measured vblank interval.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Before we start trying random combinations of connectors and CRTCs, we
should first ensure we have a blank slate so that if we only change a
subset of the CRTC we do not conflict with a residual setup on the other
CRTC.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
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>
|
|
kms_setmode.c:384:30: warning: declaration of ‘drm_fd’ shadows a global
declaration [-Wshadow]
kms_setmode.c:45:12: note: shadowed declaration is here static int drm_fd;
kms_setmode.c:391:38: warning: passing argument 8 of ‘drmModeSetCrtc’
discards ‘const’ qualifier from pointer target type
[-Wdiscarded-qualifiers] ids, crtc->connector_count, &crtc->mode);
Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
Excercise connector stealing harder. There is a border case in atomic currently where
encoder stealing is not prevented on the same crtc when the encoder is not reassigned.
The following testcase excercises that path and causes a OOPS on my system with nightly.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
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>
|
|
There is a MST encoder for each crtc, and each MST connector
will be connected to the encoder bound to that crtc.
This breaks the kms_setmode assertion that is only 1 encoder per
connector, so make an exception to that rule for displayport.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.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>
|
|
Should cover simple, single CRTC mode sets.
Reviewed-by: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
|
|
It can be useful to have one of those to carry state between the handler
parsing the options and the rest of the test. Right now the only thing
we can do is to use global variables for that.
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>
|
|
Remove options from argv that have been handled by getopt to allow
additional non-option parameters to be processed in the test application.
This fixes issues when using options such as --debug with tests that accept
additional non-option parameters.
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
These tests require DRM master right, so make sure they have it from the
beginning. This gives an early indication if another DRM master is running
and makes the given test skip (with a proper explanation of the reason)
instead of exiting with error.
Signed-off-by: Imre Deak <imre.deak@intel.com>
|
|
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
A plain bool is good enough, no need for fancy negative error values.
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>
|
|
And add api doc while at it.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Often just folding together of the common if (cond) printf;
abort|igt_skip|igt_fail; pattern. But in a few cases I've ripped out
more since the igt macros will already print the condition and errno.
A few tests where more work (like ripping out return codes en masse)
is needed left as-is.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
All the cases that simply dump some debug information and couldn't be
converted to some of the fancier macros.
Some information output removed when it's redundant with the subtest
status.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
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>
|
|
With the header cleanup we can now give this header a suitable name,
since it now really only contains register access and other I/O
functions and assorted definitions.
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>
|
|
The clone-single-crtc will test various cloning scenarios.
Currently it does limit the number of simultanously cloned
connectors to the number of pipes in the system. That restriction
can be lifted in the future if desired.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
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>
|
|
Don't try to set modes on two connectors that share the same encoder.
That will just fail.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68463
Reviewed-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
|
|
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>
|
|
Signed-off-by: Imre Deak <imre.deak@intel.com>
|
|
Iterate through all valid/invalid crtc/connector combinations. At the
moment only clone configurations are tested as the single output cases
are tested already by testdisplay. Also from combinations where all
connectors are on the same crtc (clone-single-crtc) only those are
tested that are invalid, as I haven't found any machine that supports
these (have to be GT2 with dvo and vga output).
For configurations with one crtc per connector the FBs are per-crtc atm.
Signed-off-by: Imre Deak <imre.deak@intel.com>
|