summaryrefslogtreecommitdiff
path: root/tests/kms_frontbuffer_tracking.c
AgeCommit message (Collapse)Author
2015-11-11tests: remove duplicate struct member initializersThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-11-03tests: Run igt.cocciDaniel Stone
Signed-off-by: Daniel Stone <daniels@collabora.com>
2015-10-23kms_frontbuffer_tracking: remove opt.only_featurePaulo Zanoni
That option is not needed anymore since: commit 982934625ac67234c6d85c6cf29a5a487e54d4f0 Author: Thomas Wood <thomas.wood@intel.com> Date: Wed Sep 16 14:36:24 2015 +0100 lib: allow wildcard matching when specifying subtests In fact, using "--run-subtest 'fbc-*'" is better than using --fbc-only due to how SKIPs are handled. In the former, only the tests matching the expression are tried, so the number of SKIPs only contains the number of tests on the specified pattern that were skipped. If you used --fbc-only, all the non-fbc tests would count as SKIPs, so it would be harder to know which of the tests marked as skipped were actual FBC tests. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-10-23kms_frontbuffer_tracking: add stridechange subtestPaulo Zanoni
This is a corner case not exercised by the other subtests. The test is expected to pass both with the current Kernel tree and with the patches that are on the mailing list. The patches currently on the mailing list change how the CFB is allocated, and this subtest is designed to make sure everything still works as expected. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-10-23kms_frontbuffer_tracking: add flag to not assert feature statusPaulo Zanoni
This will be used by the stridechange subtest. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-10-23kms_frontbuffer_tracking: unset crtcs after getting the base blue CRCPaulo Zanoni
This fixes the failures for cases where you use --run-subtest to run single subtests that don't use any drawing patterns. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-10-08kms_frontbuffer_tracking: add fliptrack subtestPaulo Zanoni
The current upstream Kernel code stops and then restarts FBC at every page flip. I am working on patches to keep FBC enabled all the time, so this brings the possibility of having the hardware tracking mechanism looking at the old buffer instead of the new one. This test should catch this problem. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-10-08kms_frontbuffer_tracking: don't mode unset when checking sink CRC supportPaulo Zanoni
There's no reason to do a mode unset since we don't care about whether FBC or PSR are enabled or disabled. This should save about a second for each time you invoke the program. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-10-08kms_frontbuffer_tracking: add scaledprimary subtestPaulo Zanoni
It's not testing a lot since we lack the Kernel Stolen Memory Checker, but some day this will be useful. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-10-08kms_frontbuffer_tracking: set the universal planes cap in the setupPaulo Zanoni
... instead of just setting it for the fullscreen_plane subtest and then unsetting it. We want to use it more, so just make sure all the code knows how to deal with multiple planes per CRTC. This also allows us to do some upfront caching of the plane information, so the code for the tests gets simpler. There's a new test that's going to use all these changes. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-10-08kms_frontbuffer_tracking: change pattern 1's last rect to 1x1Paulo Zanoni
Make sure the tracking mechanism is able to track a write in the very last pixel. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-09-11convert drm_open_any*() calls to drm_open_driver*(DRIVER_INTEL) calls with cocciMicah Fedke
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>
2015-08-25kms_frontbuffer_tracking: print the status when it's not what we expectPaulo Zanoni
Printing the status on an unexpected failure is always the first thing I do. So do this always. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-08-25kms_frontbuffer_tracking: add slow_draw() subtestPaulo Zanoni
It fails on my SKL machine. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-08-25kms_frontbuffer_tracking: wait for PSR to be HW Enabled & ActivePaulo Zanoni
Make sure PSR is fully there. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-08-25kms_frontbuffer_tracking: add options for setting the shared fb X/YPaulo Zanoni
I'm using this to debug some aspects of the GTT tracking. While at it, do a small rename and fix the ASCII art. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-08-21lib: add a single include headerThomas Wood
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>
2015-08-14kms_frontbuffer_tracking: reduce the FBC wait timeout to 2sPaulo Zanoni
Just like we did for PSR, let's do it for FBC. FBC gets reenabled in just 50ms, so the 5000ms timeout is huge. On the other hand, we only pay the 5000ms timeout full price 9 times when running kms_frontbuffer_tracking --fbc-only, so this change shouldn't save too much time. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-08-14kms_frontbuffer_tracking: reduce the PSR wait timeout to 2sPaulo Zanoni
PSR only takes up to 100ms to be enabled, but we were using 5000ms timeouts. The problem with PSR is that the MMAP_GTT tests have to assert that PSR is disabled and stays disabled during the whole timeout, so that 5s cost is a little to high when we consider that we do the full 5s wait 74 times when running kms_frontbuffer_tracking --psr-only. By reducing to 2s we still make sure we're safe, since we're waiting 20x the time PSR needs to get reenabled, and we reduce the runtime of running kms_frontbuffer_tracking --psr-only from 14m10s to 10m29s. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-08-14kms_frontbuffer_tracking: add subtests for rgb565 and rgb101010Paulo Zanoni
Make sure valid formats work properly and invalid formats keep the features disabled. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-08-14kms_frontbuffer_tracking: fix psr-farfromfence assertionsPaulo Zanoni
We're using GTT draws and they disable PSR. This test is mostly for FBC anyway. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-08-14kms_frontbuffer_tracking: split prepare_subtest() in two functionsPaulo Zanoni
And remove duplicated code by calling prepare_subtest_data() on rte_subtest(). Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-08-14kms_frontbuffer_tracking: remove duplicated pairs on multidrawPaulo Zanoni
If we already tested the combination of m1+m2, don't test m2+m1 later: the drawing pattern used already has 4 squares, so we're already testing the "m2 followed by m1" case. This should reduce the test time from about 60s to about 30s. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-08-14kms_frontbuffer_tracking: SKIP if not enough stolen is availablePaulo Zanoni
This is not an FBC bug. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-08-14kms_frontbuffer_tracking: use all drawing methods on multidraw_subtestPaulo Zanoni
Instead of having a single pair of methods per subtest. Having this in pairs is not very useful since we end doing all the drawing methods per subtest anyway. This saves a few modesets, which makes eDP slightly faster - about 22s on my local machine. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-08-14kms_frontbuffer_tracking: improve support for multiple pixel formatsPaulo Zanoni
We now have per-pixel-format FBs and CRC values. Also t->format to indicate the format we're using on the subtest. We still only use the default RGB888 format (AKA FORMAT_DEFAULT) for all tests since multiplying the current number of tests by the number of new pixel formats doesn't sound like a great idea. With this, it should be really easy to add new tests that use different pixel formats. Also, if you want a full IGT run on a specific pixel format, all you need to do is to change FORMAT_DEFAULT. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-08-14kms_frontbuffer_tracking: add information about more formatsPaulo Zanoni
We're not using those formats yet, but a simple change to create_fb() allows us to use these formats without problems now. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-08-14kms_frontbuffer_tracking: introduce enum colorPaulo Zanoni
We want to add support for different pixel formats and the current hardcoded pixel values won't work with that. So add enum color and its auxiliary functions so we can decide the pixel values based on the chosen color enum. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-08-14kms_frontbuffer_tracking: don't pass the format to create_fb()Paulo Zanoni
It is create_fb() who is going to decide the buffer format based on the arguments provided by the caller. This is another step for the non-XRGB8888 support. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-08-14kms_frontbuffer_tracking: add a wrapper for igt_create_fb()Paulo Zanoni
The wrapper will do a few additional things when we add support for formats different than XRGB8888. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-08-14kms_frontbuffer_tracking: fix MMAP_WC assertions on PSRPaulo Zanoni
Now that the MMAP_WC operations call the dirty ioctl, PSR gets reenabled after some time. So we have to adjust op_disables_psr() to take that into account. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-08-14lib/igt_draw: add support for RGB565 and XRGB2101010Paulo Zanoni
We need to test those pixel formats on the FBC code, so let's make sure the drawing library works on them first. v2: Update the gtkdoc (Daniel). Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-08-13kms_frontbuffer_tracking: don't test SPR or CUR on multidrawPaulo Zanoni
The goal of the multidraw subtest is to check if alternating drawing methods can somehow break the feature. The plane we're drawing to really shouldn't matter here - we have other tests to make sure drawing on the different planes works correctly. So after this patch we'll only run the multidraw subtest for the primary plane, not for sprite and cursors anymore. This makes "--no-edp --fbc-only --1p-only" go from 2m29s to 1m40s on my machine. Of course, we can still run these tests with the --show-hidden flag. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-08-13kms_frontbuffer_tracking: don't test CUR or SPR planes on FBS_SHAREDPaulo Zanoni
We already tested these planes for FBS_INDIVIDUAL, and there are no reasons to believe those planes will behave differently under FBS_SHARED, so save some time avoiding potentially useless tests. This makes "--no-edp --fbc-only --1p-only" go from 2m49s to 2m29s on my machine. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-08-05lib: add igt_debugfs_read()Paulo Zanoni
A helpful function for when you want to read a whole debugfs file to a string and don't want to worry about opening and closing file descriptors and asserting buffer sizes. We've been using this already for kms_frontbuffer_tracking and kms_fbcon_fbt, so the only test with new code here is kms_fbc_crc. Also notice that for kms_fbc_crc we had to increase the buffer size since the file can sometimes be bigger than 64 bytes - depending on the reason why FBC is disabled. Of course, there are probably many other programs we can patch, but I'm not doing this now. v2: Add the macro to wrap sizeof() (Daniel). v3: Add documentation for the macro too (Daniel). Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-08-05kms_frontbuffer_tracking: use the dirty ioctl after MMAP_WC callsPaulo Zanoni
We can't add this to igt_draw since igt_draw doesn't care whether it's writing on a frontbuffer or not. PS: the ENOSYS is for Kernels without the patch implementing the IOCTL. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-07-14kms_frontbuffer_tracking: don't keep debugfs openPaulo Zanoni
Make the code smaller and simpler, also ready for when we move debugfs_read() to lib/. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-07-14kms_frontbuffer_tracking: implement suspend subtestPaulo Zanoni
Make sure we survive suspend/resume. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-07-14kms_frontbuffer_tracking: allow passing a NULL patternPaulo Zanoni
So we don't need to initialize CRCs we won't use. This makes the modesetfrombusy and badstride tests a little faster. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-07-14kms_frontbuffer_tracking: simplify subtest enumerationPaulo Zanoni
Just a small bikeshed. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-07-14kms_frontbuffer_tracking: add farfromfence subtestPaulo Zanoni
Make sure we notice in case our crtc->y handling is still wrong. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-07-14kms_frontbuffer_tracking: implement badstride testPaulo Zanoni
Test strides that are either completely invalid or just result in disabled FBC. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-07-14kms_frontbuffer_tracking: only force std_1024_mode on HSWPaulo Zanoni
Since on BDW the big modes work fine, I want to test them without having to recompile the test every time. Let's make std_1024_mode part of opt.small_modes. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-07-14kms_frontbuffer_tracking: remove enum feature_statusPaulo Zanoni
After the last commit, it's not really needed anymore, so let's get rid of it: less code lines and less non-standard enums. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-07-14kms_frontbuffer_tracking: improve checks for disabled featuresPaulo Zanoni
Make sure the features are disabled and stay disabled. Otherwise we could just wrongly think they are disabled while they are just in the process of being enabled. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-07-14kms_frontbuffer_tracking: rename enum fbsPaulo Zanoni
I tried explaining these to people twice and realized how bad the current naming was. Let's hope the new one is better. The downside is that the tests were renamed and patches mentioning them can't be fixed. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-07-14kms_frontbuffer_tracking: add different ways to flipPaulo Zanoni
So we can make sure all code paths are properly exercised and lead to proper frontbuffer tracking. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-07-14kms_frontbuffer_tracking: fix fullscreen subtest assertionsPaulo Zanoni
Only really assert FBC_DISABLED in case the primary plane is actually disabled. If the sprite plane is covering the whole screen but the primary plane is still enabled, FBC can remain enabled. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-07-14kms_frontbuffer_tracking: avoid huge strides during normal operationPaulo Zanoni
We want to restrict huge strides to the yet-to-be-implemented stride-size-specific subtest. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-07-14kms_frontbuffer_tracking: don't hardcode the X/Y big FB offsetPaulo Zanoni
While debugging the test failures I tried different values for the offsets, so having a central place to change them is the only sane way. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>