summaryrefslogtreecommitdiff
path: root/tests/kms_ccs.c
AgeCommit message (Collapse)Author
2019-03-25tests/kms_ccs: Use igt_plane_has_format_mod()Ville Syrjälä
Replace the open coded IN_FORMATS parsing with igt_plane_has_format_mod() now that we have such a thing. v2: Remove all the extra cruft too Deal with data->ccs_modifier Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
2019-03-20tests/kms_ccs: Test Yf CCS modifier too.Dhinakaran Pandiyan
Extend the test to Yf tiled CCS, no reason not to. v2: Add a comma after the last modifier (Ville) Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2019-03-20tests/kms_ccs: Refactor code to add CCS modifiers.Dhinakaran Pandiyan
Currently only Y tiled CCS modifier is tested, rewrite the functions so that we can add support for other CCS modifiers. Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2019-03-11tests/kms_ccs: Generate compressed surfaces with rendercopyDhinakaran Pandiyan
lib/igt_fb.c now has capability to make use of rendercopy, which means we do not have to handwrite compressed buffers. v2: Make colors struct static (Ville) Cc: Clinton Taylor <clinton.a.taylor@intel.com> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2019-03-11lib/igt_fb: s/tiling/modifier/ where appropriateVille Syrjälä
Rename the igt_fb.tiling to igt_fb.modifier to better reflect what information it carries. Now it's clear whether we're talking about a modifier or a i915 tiling thing. Cc: Clinton Taylor <clinton.a.taylor@intel.com> >From DK: Rebased on vc4 changes Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
2018-10-16tests/kms_ccs: Avoid using plane sizes which exceed hw capabilityJuha-Pekka Heikkila
Max sprite plane width at 2000 to avoid going over hw watermark limits. v2: (Ville Syrjälä) comment on source added plane width limitation. bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105458 Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2018-10-01igt: Require a display (KMS enabled) for KMS testsChris Wilson
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>
2018-09-27lib/igt_fb: Pass around igt_fb internallyVille Syrjälä
Instead of passing around a boatload of integers everywhere let's just pass around the igt_fb struct. That obviously means we have to populate it first sufficiently, to which end we'll add a small helper. Later on the stride/size calculations will consult the already pre-populated igt_fb and fill in the rest as needed. This makes the whole thing a lot less error prone as it's impossible to accidentally pass the arguments in the wrong order when there's just the one of them, and it's a pointer. v2: Rebase due to uint64_t size Cc: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2018-05-23tests/kms_ccs: Don't populate igt_fb structs with stack garbageVille Syrjälä
Clear the igt_fb struct to make sure no stack garbage is left in any members we don't explicitly initialize. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> #irc
2018-02-09tests/kms_ccs: Don't skip the entire subtest if one plane can't do CCSVille Syrjälä
Make sure we test every plane on the pipe, and only report a SKIP if none of the planes support CCS (or the pixel format). Cc: Gabriel Krisman Bertazi <krisman@collabora.co.uk> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104724 Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Marta Lofstedt<marta.lofstedt@intel.com>
2018-02-09tests/kms_ccs: Move fbs out from dataVille Syrjälä
There's no need to house fb and fb_sprite in the data_t. Just suck them into try_config(). Much cleaner since we no longer have to match the fb setup done in try_config() in test_output(). Also I think doing multiple try_config()s (like done by TEST_CRC) would leak one of the primary fbs. Cc: Gabriel Krisman Bertazi <krisman@collabora.co.uk> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Marta Lofstedt<marta.lofstedt@intel.com>
2018-01-25tests/kms_ccs: Grab the CRC when the plane is actually enabledVille Syrjälä
Don't turn off the plane we want to test before we grab the CRC. Cc: Gabriel Krisman Bertazi <krisman@collabora.co.uk> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104724 Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk>
2017-12-04tests/kms_ccs: Test case for wrong aux buffer stride sizeGabriel Krisman Bertazi
Two scenarios tested: - unaligned stride - Stride too small Since v4: - Fix SIGFPE if width <= 1024 (Arkadiusz Hiler/Ville Syrjälä) - Add test for pitches[1]=0 (Ville Syrjälä) Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk> Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
2017-12-04tests/kms_ccs: Test case where CCS is on a different BOGabriel Krisman Bertazi
Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2017-12-04tests/kms_ccs: Test case where the CCS buffer was not providedGabriel Krisman Bertazi
Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2017-12-04tests/kms_ccs: Prevent segfault if pipe is not supportedGabriel Krisman Bertazi
for_each_plane_on_pipe() indexes bad memory when iterating over an invalid pipe. Make sure the pipe exists before trying to use it. This prevents the crash below: root@ideacentre:~# igt-gpu-tools/tests/kms_ccs --r pipe-D-crc-sprite-planes-basic IGT-Version: 1.19-g59f0e3d182a8 (x86_64) (Linux: 4.13.0-rc6.intel-boxes+x86_64) Received signal SIGSEGV. Stack trace: #0 [fatal_sig_handler+0x185] #1 [killpg+0x40] #2 [__real_main485+0x2de] #3 [main+0x3f] #4 [__libc_start_main+0xf1] #5 [_start+0x2a] #6 [<unknown>+0x2a] Subtest pipe-D-crc-sprite-planes-basic: CRASH (0.004s) Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
2017-12-04tests/kms_ccs: Test pipes other than pipe AGabriel Krisman Bertazi
Commit d41c4ccbd2f9 ("tests/kms_ccs: Fix subtest enumeration") accidently removed the update of data.pipe, causing kms_ccs to silently only test PIPE_A. This fixes the behavior reported by Daniel Vetter where tests would succeed even on nonexistent pipes. Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
2017-08-14tests/kms_ccs: Fix subtest enumeration:Daniel Vetter
- We can't enumerate planes, push that into the subtest. - pipe enumeration needs to use for_each_pipe_static. This fells our CI since the test enumeration/sharding happens on the build server, which has no gfx nor does the job run as root ... Cc: Daniel Stone <daniels@collabora.com> Cc: Jason Ekstrand <jason@jlekstrand.net> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2017-08-10tests/kms_ccs: Test CCS on sprite planesDaniel Stone
Also try to test CCS on available non-primary planes. However, as there is not enough bandwidth to scan out both the primary and sprite planes when using CCS (or even Y-tiled), fall back to linear for the primary plane when using CCS for a sprite/cursor plane. Signed-off-by: Daniel Stone <daniels@collabora.com> Acked-by: Jason Ekstrand <jason@jlekstrand.net>
2017-08-10tests/kms_ccs: Split all tests into subtestsDaniel Stone
Some subtests were magically doing a for-each-pipe loop. Remove that, and have all multi-pipe tests actually work across all pipes. Signed-off-by: Daniel Stone <daniels@collabora.com> Acked-by: Jason Ekstrand <jason@jlekstrand.net>
2017-08-10tests/kms_ccs: Test for supported modifierDaniel Stone
Make sure the CCS modifier is supported on our plane, before we try to use it on that plane. Signed-off-by: Daniel Stone <daniels@collabora.com> Acked-by: Jason Ekstrand <jason@jlekstrand.net>
2017-08-10tests/kms_ccs: Reshuffle test name and loopDaniel Stone
In preparation for also testing sprites. Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2017-08-10tests/kms_ccs: Paramaterize color for framebufferDaniel Stone
Will be used in later patches. Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2017-08-10tests/kms_ccs: Remove excessive FB alignmentDaniel Stone
We don't need to align the framebuffer dimensions to the tile size. As long as the pitch is aligned to the tile width, and the BO dimensions can fit full tiles of both aligned pitch and aligned height, we don't need to claim the FB itself is larger. Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2017-08-10tests/kms_ccs: Split FB generation into helperDaniel Stone
Create a new helper for generating and rendering the framebuffer, rather than doing it inline with applying the configuration. This will be used later to generate a different plane configuration. Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2017-08-10tests/kms_ccs: Convert int/bool to enumDaniel Stone
Rather than using TEST_UNCOMPRESSED / TEST_COMPRESSED as alternately either an int or a bool, change it to a bitfield enum. This will let us add more parameters later to control framebuffer generation. Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2017-08-04tests/kms_ccs: Don't overallocate CCS surfaceDaniel Stone
Due to a mix-up in kernel branches being used, I'd mangled Jason's original CCS test to hopelessly overallocate the CCS surface size. Restore it back to its original. Signed-off-by: Daniel Stone <daniels@collabora.com> Cc: Jason Ekstrand <jason@jlekstrand.net>
2017-08-04tests/kms_ccs: Fix the color/ccs surface generationJason Ekstrand
Previously, the test used the old 64x64 convention that Ville introduced for CCS tiles and not the current 128x32 Y-tile convention. Also, the original scheme for generating the CCS data was over-complicated and didn't work correctly because it assumed you could cut the main surface at an arbitrary Y coordinate. While you clearly *can* do this (the hardware does), it's not a good idea for a generator in a test. The new scheme, introduced here, is entirely based on the relationship between cache-lines in the main surface and the CCS that's documented in the PRM. By keeping everything CCS cache-line aligned, our chances of generating correct data for an arbitrary-size surface are much higher. [daniels: Align CCS surface size to full height, per kernel requirements. Invert compressed/uncompressed red back so the top half of the display is compressed.] Fixes: d900dd85c917 ("tests/kms_ccs: Add test for render compression") Signed-off-by: Jason Ekstrand <jason.ekstrand@intel.com> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Ben Widawsky <benjamin.widawsky@intel.com> Cc: Daniel Stone <daniels@collabora.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Ben Widawsky <ben@bwidawsk.net> Reviewed-by: Daniel Stone <daniels@collabora.com> Signed-off-by: Daniel Stone <daniels@collabora.com>
2017-06-16tests: Rename I915_MAX_PIPES to IGT_MAX_PIPESLeo (Sunpeng) Li
Name should not be driver-specific. Signed-off-by: Leo (Sunpeng) Li <sunpeng.li@amd.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2017-06-16tests: Increase value of I915_MAX_PIPES to 6Leo (Sunpeng) Li
Increasing max pipe count to 6 to support AMD GPU's. Since some tests' behavior depends on this value, small changes are made to remove this dependency: * kms_ccs: Early abort if wanted_pipe is out-of-bounds. * kms_concurrent: Check if pipe is within bounds first. * kms_pipe_color: Prevent skipping of subsequent tests by placing generated tests in a 'igt_subtest_group'. * kms_plane: Move pipe and plane index checking to subtest group level. v2: Change invalid pipe check on kmstest_pipe_name() to use I915_MAX_PIPE v3: Change tabs to spaces in 'enum pipe' Signed-off-by: Leo (Sunpeng) Li <sunpeng.li@amd.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Tested-by: Tomi Sarvela <tomi.p.sarvela@intel.com>
2017-03-21Restore "lib: Open debugfs files for the given DRM device"Chris Wilson
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>
2017-03-21Revert "lib: Open debugfs files for the given DRM device"Tomeu Vizoso
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>
2017-03-21lib: Open debugfs files for the given DRM deviceTomeu Vizoso
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>
2017-01-31tests/kms_ccs: Add support for dynamic number of planesRobert Foss
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>
2017-01-05kms_ccs: Fix testcase.Maarten Lankhorst
Use for_each_pipe_with_valid_output, and iterate correctly over all crtc's. pipe-*-crc-* didn't show up in the test list either because display is not initialized, fix that one too. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2017-01-04tests/kms_ccs: Add test for render compressionTomeu Vizoso
Add a few subtests that check that lossless compressed render targets are properly displayed. Also test a few error conditions. Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Ben Widawsky <ben@bwidawsk.net> Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Acked-by: Ben Widawsky <ben@bwidawsk.net>