Age | Commit message (Collapse) | Author |
|
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 reverts commit 25fbae15262cf570e207e62f50e7c5233e06bc67, restoring
commit 301ad44cdf1b868b1ab89096721da91fa8541fdc
Author: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Date: Thu Mar 2 10:37:11 2017 +0100
lib: Open debugfs files for the given DRM device
with fixes.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
This reverts commit 301ad44cdf1b868b1ab89096721da91fa8541fdc.
When a render-only device is opened and gem_quiescent_gpu is called, we
need to use the debugfs dir for the master device instead.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
|
|
When opening a DRM debugfs file, locate the right path based on the
given DRM device FD.
This is needed so, in setups with more than one DRM device, any
operations on debugfs files affect the expected DRM device.
v2: - rebased and fixed new API additions
v3: - updated chamelium test, which was missed previously
- use the minor of the device for the debugfs path, not the major
- have a proper exit handler for calling igt_hpd_storm_reset with the
right device fd.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Robert Foss <robert.foss@collabora.com>
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
All the tests I wrote always assumed that every connector supported
CRTC 0. This is not the case for BSW and possibly others, so fix the
tests before the CI reports more failures.
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
|
|
Move power management related code to a separate library.
Initially this is done only for workarounds that apply to external
components. Modify the users of such workarounds accordingly.
This currently involves HD audio and SATA link power management.
For SATA link PM there's also code to save the previous settings,
to allow for resetting the values after we've finished testing.
Signed-off-by: David Weinehall <david.weinehall@intel.com>
Reviewed-by: Marius Vlad <marius.c.vlad@intel.com>
Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
|
|
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>
|
|
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>
|
|
Add rules to fix unused-result warnings when compiling with
_FORTIFY_SOURCE defined and apply them to the library and tests.
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Thomas Wood <thomas.wood@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>
|
|
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>
|
|
So give it a kmstest_ prefix and shuffle it around a bit.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Both pm_rpm.c and pm_lpsp.c call it "disable_all_screens", but let's
give it a name that better describes what the implementation does.
v2: Rename to kmstest_unset_all_crtcs (Daniel).
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
|
|
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>
|
|
Brought a few missing headers to light in ioctl_wrappers.h, too.
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>
|
|
QA has asked me "How can we make sure LPSP is working?". Now, instead
of writing big paragraphs, I can just answer "make sure pm_lpsp
works".
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
|