Age | Commit message (Collapse) | Author |
|
Use igt_remove_fb(data->drm_fd, &data->fb) to remove locally
created framebuffer at the end of the hardware test loop in
test_cursor_size() function for cursor-size-change subtest in
kms_cursor_crc.
Signed-off-by: Mamta Shukla <mamtashukla555@gmail.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
|
|
In the kms_cursor_crc, the subtest to check exterme alpha values failed due
to different CRCs observed in hardware and software rendering. This patch fixes
CRC mismatch error in cursor-alpha-opaque and cursor-alpha-transparent subtests
by improving the order in which cursor was rendered in hardware test. Changes
made in test_cursor_alpha() to ensure cursor rendering in hardware test and
acquire CRC value:
- Add drmModeSetCursor() to set cursor image.
- Remove igt_display_commit() to reduce the chance of getting crc values cleared
before it is acquired.
- Add igt_remove_fb() to remove locally created framebuffer after disabling the
cursor plane in HW test
Also, aligned this function with test_cursor_size and after these changes
got passing results for alpha blending support added in VKMS CRC API.
Signed-off-by: Mamta Shukla <mamtashukla555@gmail.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109350
|
|
Add test to check extreme alpha values i.e. fully opaque and fully transparent
for cursor plane and verify by calculating hardware and software CRC.
Signed-off-by: Mamta Shukla <mamtashukla555@gmail.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
|
|
Simple rule of thumb, if a kms_* test calls igt_display_init() in its
global fixture, skip the entire test if the driver has disabled KMS.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Antonio Argenziano <antonio.argenziano@intel.com>
|
|
So that this test can be run in drivers other than i915.
Remove devid and only check it if the driver is i915.
Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@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>
|
|
On CHV pipe C when the cursor is visible with a negative X coordinate
a FIFO Underrun will occur. The kernel worked around this by disallowing
cursor updates on pipe C at negative X coordinates when the cursor is
visible.
This was done in the following kernel commit:
commit ef8dd37af85a8f37ca3a29074647511e52c56181
Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
Date: Fri Dec 18 19:24:39 2015 +0200
drm/i915: Workaround CHV pipe C cursor fail
kms_chv_cursor_fail was created to test this issue, but it also happens
in kms_cursor_crc, so workaround it there too.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97960
|
|
IVB+ have the cursor "FBC" feature, meaning they support a
somewhat limited form of non-square cursors. Let's test that.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.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>
|
|
Add changes reflecting the new support for dynamic number of planes per pipe.
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
|
|
Use the proper iterator macros to prevent ever having an invalid config.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
To have a more accurate idea about any suspend/resume issues we can
perform the s/r until various phases in the s/r sequence. This way we
can isolate the given problem as being a device driver, kernel core or
BIOS related issue. Actual subtests using these new s/r phases will be
added as follow-up.
While at it also add the freeze suspend target, it's something we also
would need to test.
Signed-off-by: Imre Deak <imre.deak@intel.com>
|
|
We've had bugs in the past that caused cursor updates to be synced to
vblank, resulting in sluggish cursor movement. Add a test to try to
make sure we don't regress and reintroduce these bugs.
Cc: kalyan.kondapally@intel.com
Signed-off-by: Matt Roper <matthew.d.roper@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>
|
|
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
There was some confusion about whether we restore cursors correctly
after dpms and suspend/resume. Apparently we still do!
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
Because of hash collisions tests should only ever compare crc
checksums for equality. Checking for inequality can result in random
failures.
To ensure this only expose and igt_assert function and use that.
Follow-up patches will rework the code for tests which don't follow
this requirement and try to compare for CRC inequality.
v2: Rebase on top of Matt's kms_plane changes.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
Useful for inspecting the screen state in kms tests when they fail.
Also move the screen clearing in kms_cursor_crc to the bottom.
Signed-off-by: Daniel Vetter <daniel.vetter@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>
|
|
As of kernel commit
commit a679064a7e9e8799177a64a31668a34a1bc6a4f1
Author: Matt Roper <matthew.d.roper@intel.com>
Date: Fri Jan 30 16:22:37 2015 -0800
drm/i915: Switch planes from transitional helpers to full atomic helpers
the kernel now checks for cursor coordinates that would result in
integer overflow and returns -ERANGE, similar to the checking that was
already done for other plane types. We update kms_cursor_crc here to
reflect this small behavior change:
* Check for success at extreme boundary conditions INT_MAX-{width,height}
rather than INT_MAX
* Add new check for success at SHRT_MAX; if the driver were to
internally use short values and overflow, we could have the cursor
reappear on the screen.
* Add a test for failure with proper error code at INT_MAX-{width,height}+1
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
|
|
The valid pipe/connector combo check was lost in
commit 57259d714d3fe1170cf931af72648219856a9918
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date: Mon Nov 24 16:08:32 2014 +0100
lib/igt_debugfs: Don't setup crc in _new
Restore it to make the test again useful on CHV.
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
The problem is that this causes writes to registers, and if the pipe
is off they might go nowhere (e.g. when runtime pm is enabled).
Furthermore we can only really check once the modeset setup is done,
but again most tests set up the CRC structure before calling
igt_commit and friends. We could add crc restore support to the
kernel's rpm code, but that will end up being rather invasive and
fragile hard-to-test code.
Now originally this was needed back when CRC support wasn't available
everywhere. But that's fixed now.
So given all this just drop that sanity check and make sure that we
only touch the debugfs file (and so the hw state) when we know the
pipe is running in the desired configuration.
A complementary kernel patch will try to catch offenders by returning
-EIO if the pipe is off.
v2: Forgot to git add one hunk.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86092
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
When I look at cursor_size_ok() (from the Kernel's intel_display.c), I
see that only 845g and i865g support non-square cursors, so SKIP the
tests on HSW/BDW instead of failing them.
This problem happened because support for non-square cursors was being
developed for HSW/BDW, but it ended up not being merged due to a small
problem and priority changes. Let's make those tests SKIP until we
have proper support on the Kernel: after that, we can revert this
patch.
v2: Improve commit message.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84268
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
|
|
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>
|
|
To minimally verify that non-square cursors work on the platforms where
they're supported perform the tests first with WxH cursor and then
repeat with WxH/3 cursor.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
This just improves the language about the exact failure to reduce
confusion.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
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>
|
|
And add api doc while at it.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Damien dodged this ...
Also run the script while at it.
v2: Don't just capture identifiers for pipe, but also expressions.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
We're calling drmModeSetCursor() to change the cursor image and never
actually doing a display commit (aside from when we display the cursor),
so call the move ioctl directly rather than igt_plane_set_position() to
ensure the changes actually take effect.
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
If a subtest fails, cleanup_crtc() never gets called and then the
test_data_t structure for the test is lost, including the CRC file
descriptor that we never got a chance to release; this causes all
subsequent tests to fail with -EBUSY at igt_pipe_crc_new().
The split between permanent data_t and temporary test_data_t doesn't
seem to serve a purpose, so just combine the fields from both into
data_t. This will prevent us from losing the CRC filedescriptor so that
we can properly close and reopen it after a failed test.
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
Now that we support cursor changes other than 64x64, a bug was found
where the size change was only applied at cursor enable time, rather
than at every update. Add a testcase for that.
Signed-off-by: Antti Koskipaa <antti.koskipaa@linux.intel.com>
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>
|
|
restrictions
On gen2 for instance the LVDS port can only be fed from pipe B. Check
whether the combinations is valid before trying to run the test. Also
clean up the state back to PIPE_ANY properly so that following tests
can again go through all the combinations.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75131
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
igt_require() must be within a fixture or subtest.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
There's no point in first printing the int to temp string using %d
and then printing that out with %s. Just stick the %d into the final
string.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Assume that only 64x64 cursor size is supported if the cursor size caps
aren't supported by the kernel. This allows the test to run on older
kernels.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
We don't want to attempt creating the cursor fb when enumerating
subtests. So wrap it into igt_fixture. Also destroy the cursor
fb after the tests.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Instead of allocating an array of igt_pipe_ctc_t objects, just allocate
one and stick it into test_data.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
This gives the cursor something to be on, instead of just a black
background. Slows the test down only one second over six minutes.
Signed-off-by: Antti Koskipaa <antti.koskipaa@linux.intel.com>
|