summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-06-27stats: Add igt_stats_get_range()Damien Lespiau
Somewhat useful, for instance to size an histogram. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-06-27stats: Add functions to retrieve min/max values of the datasetDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-06-27stats: Factor out a fixture to initialize statsDamien Lespiau
We're going to use this simple fixture once more, might as well make a function instead of copy/pasting code. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-06-27stats: Add a note about the standard deviation derived from unbiased varianceDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-06-27stats: Add a getter for the population propertyDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-06-27stats: Add a way to specify if the data set is a population or a sampleDamien Lespiau
This changes how we compute the variance. We want an unbiased variance when reasoning about a sample. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-06-27stats: Add gtkdoc section for igt_statsDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-06-27stats: Add header gardsDamien Lespiau
Sigh. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-06-27doc: Remove i-g-t/intel prefixes and capitalize section titlesDamien Lespiau
Looks better! Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-06-27stats: Zero the whole structure at init() timeDamien Lespiau
Because the structure started small, I initialized every member directly, but that means that the new fields added weren't properly initialized (sigh!). Zero the whole thing first then. Also, the punishment for introducing a bug should be to write the corresponding unit test. It's not a perfect one, but I'll take it. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-06-27tests/stats: Make sure we properly invalidate the cached meanDamien Lespiau
Sure, that's an implementation details, but make sure we do recompute the mean when we add a new value. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-06-27stats: Add a way to retrieve the standard deviationDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-06-27stats: Use an algorithm popularised by Knuth to compute mean and varianceDamien Lespiau
Suggested-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-06-27tests/igt_stats: Call igt_stats_fini() to not leak the arrayDamien Lespiau
Sure, it'll be freed at exit(), but might as well be a bit pedantic. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-06-27stats: Be more precise and talk about mean, not averageDamien Lespiau
There are several types of averages eg. mean, median and mode. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-06-26lib/igt_draw: move to the GTT domain before using GTT mmapsPaulo Zanoni
With this, we don't need to worry about what happened to the buffer before. Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-06-26lib/igt_core: fflush stdout after printing subtest resultsPaulo Zanoni
I often run "sudo ./test 2>&1 | tee output.txt", and when we're succeeding - never printing to stderr - the output gets buffered and is never flushed (because it doesn't point to a terminal), so I never know which test is running. With this fflush, I'm able to know when each test finishes. v2: Add blank line too (Chris) Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-06-26igt/gem_fenced_exec_thrash: Tidy testing of expected execbuf errorsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-06-26igt/gem_fenced_exec_thrash: Fix memory leak between testsDerek Morton
gem_fenced_exec_thrash was not freeing any resources between subtests. On 1Gb android systems this resulted in the test failing with an OOM error. Added cleanup code to free BOs at the end of each subtest. Signed-off-by: Derek Morton <derek.j.morton@intel.com>
2015-06-25kms_frontbuffer_tracking: GTT mmap writes disable PSRPaulo Zanoni
And they keep it disabled until something else enables it. So let's consider this on the draw subtests. With this, some PSR tests that were failing will now start passing. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-06-25kms_frontbuffer_tracking: use CPU mmaps for fill_fb_region()Paulo Zanoni
Because the GTT mmaps "permanently" disable PSR and this can mess some of our assertions. So let's just use the CPU domain to keep the implementation simple. With this, some PSR tests that were failing will now start passing. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-06-25kms_frontbuffer_tracking: remove offscreen-{cur,spr} subtestsPaulo Zanoni
It doesn't make sense to write on the sprite/cursor plane of the "offscreen" screen. The pick_target() function was just returning the offscreen_fb pointer for those cases, so we were not really testing any cursor or sprite code. So the tests were just the same as offscreen-pri. That kills 24 subtests for each feature (72 in total). Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-06-25tests/kms_frontbuffer_tracking: add modesetfrombusy testPaulo Zanoni
This test exercies the dev_priv->fb_tracking.busy_bits bug I recently found and Daniel fixed. Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-06-25skl_compute_wrpll: Don't try other dividers if we find a 0 central freq ↵Damien Lespiau
deviation Paulo suggested that we could short-circuit the search for a good divider if we find a 0 deviation of the DCO frequency from the central frequency. Out of the 373 test frequencies, 34 hit that fast path. Suggested-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-06-25skl_compute_wrpll: Sync a comment with from the kernel codeDamien Lespiau
Might as well try to keep the code in both this test and the kernel as close as possible. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-06-25skl_compute_wrpll: Fix the mininum deviation computationDamien Lespiau
Paulo noticed that, because we were only comparing positive deviations with positive deviations and negative deviations with negative deviations, we weren't actually always using the absolute minimal deviation at all. This improves the average deviation across all tested frequencies (373): before: average deviation: 215.13 after: average deviation: 194.47 Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-06-25skl_compute_wrpll: Cycle through dividers, then central freqsDamien Lespiau
Follow Paulo's comment on the corresponding kernel patch. This means we also have to move the break when we have cycled through the even dividers as well. This improves the number of even dividers used across the tested frequencies (373) (at the expense of a slightly worse average deviation, but "even dividers take precedence over a lower deviation". before: even/odd dividers: 338/35 average deviation: 206.52 after: even/odd dividers: 363/10 average deviation: 215.13 Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-06-25skl_compute_wrpll: Print the average deviationDamien Lespiau
It's interesting to watch the effect of some algorithm tweaks on the average deviation between the central freq and the dco freq. A metric we'd like to minimize. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-06-25lib: Add a tiny utility function to compute averagesDamien Lespiau
The master plan would be to get a bit more stats in it, at least the standard deviation and confidence interval. Just need the average for now. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-06-25tests/kms_fbc_crc: Don't force fbc on old platformsDaniel Vetter
It's simply a bit too scary on pre-gen6 and imo not worth the bother really until someone starts to implement all the hacks an w/a required on these platforms. On later platforms the issues are just with correctness and performance hence no risk for hanging machines. Cc: Paulo Zanoni <przanoni@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-06-24overlay: Enable localeChris Wilson
Enabling locale allows us to use thousand separators and other such human touches in the output. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-06-24lib: Enable locale dependent output to a terminalChris Wilson
If we are in an interactive session, enable the locale. This allows for features like setting thousand separators for printing large values. By only enabling it for interactive terminals, we avoid changing outputs for the test scripts (leaving them as the "C" locale). Note this mainly affects the testcases, or binaries built using libigt. Other binaries need to be localised separately. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Michel Thierry <michel.thierry@intel.com>
2015-06-23tests/kms_frontbuffer_tracking: rename set_screens_for_testPaulo Zanoni
Rename it to prepare_subtest. This function used to be much smaller when I decided its name. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-06-23tests/kms_frontbuffer_tracking: simplify flib_subtest fb handlingPaulo Zanoni
Get rid of fb2_region, use params->fb directly instead. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-06-23tests/kms_frontbuffer_tracking: simplify wait_user() callsPaulo Zanoni
I often add new temoprary wait_user() calls when debugging things, and having to add "if (opt.step)" is annoying, so let's make the step level check inside wait_user(). As a bonus, our huge macro is 2 lines shorter. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-06-23tests/kms_frontbuffer_tracking: not all eDP panels support sink CRCPaulo Zanoni
And require sink CRC support for PSR, since the pipe CRC is not exactly useful there. v2: Check for ENOTTY (Rodrigo). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91019 Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-06-23igt/gem_fence_thrash: Reduce memory usageDerek Morton
On android platforms with 1Gb RAM gem_fence_thrash was failing with an out of memory error. This patch causes gem_close() to be called when a handle is no longer required rather than relying on the cleanup when the fd is closed. This greatly improves the memory footprint of the test allowing it to run on 1Mb systems. Also fixed a leak of the 'threads' variable. v2: Simplified as per Chris Wilson's suggestion. Signed-off-by: Derek Morton <derek.j.morton@intel.com> [ickle: fix mmap leak from bo_copy()] Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-06-23NEWS: Post-release bumpThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-06-22igt: Add gem_exec_alignmentChris Wilson
Simple test to see whether the kernel obey's the user's request alignemnt. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-06-19igt: Add gem_eio for inducing expected EIOChris Wilson
A few entry points in the GEM API are expected to raise EIO if we encounter a wedged GPU. This testcase aims to do so by first injecting a GPU hang with GPU resets disabled (thus causing the GPU to become wedged) and then exercises the various API to check for the expected errors. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-06-18testdisplay_hotplug: Add missing #include <sys/stat.h>Chris Wilson
testdisplay_hotplug.c: In function ‘hotplug_event’: testdisplay_hotplug.c:46:14: error: storage size of ‘s’ isn’t known struct stat s; ^ testdisplay_hotplug.c:54:2: error: implicit declaration of function ‘fstat’ [-Werror=implicit-function-declaration] fstat(drm_fd, &s); ^ testdisplay_hotplug.c:54:2: warning: nested extern declaration of ‘fstat’ [-Wnested-externs] testdisplay_hotplug.c:46:14: warning: unused variable ‘s’ [-Wunused-variable] struct stat s; ^ Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-06-15lib: Use HAS_GPU_RESET rather than opencode our guessChris Wilson
Uses kernel commit 49e4d842f0d0892c3d26c93a81b9f22c1467030e Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Mon Jun 15 12:23:48 2015 +0100 drm/i915: Report to userspace if we have a (presumed) working GPU reset to determine whether the kernel has a working GPU reset before injecting a hang (and so skip tests requring hang recovery if not available).
2015-06-15lib/tests/igt_segfault Add unit test to test segfault handlingDerek Morton
Unit test to check a segfaulting subtest is handled correctly. v2: Added script to check subtest results v3: Removed script. Updated test to use fork to monitor return status. v4: Added igt_segfault to .gitignore Signed-off-by: Derek Morton <derek.j.morton@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-06-13pm_rpm: Update the debugfs filenameDamien Lespiau
v2: Try to open i915_pc8_status first to make the transition (or just running on older kernels) better. (Paulo) Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-06-11Update version to 1.11 and add the release dateThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-06-11NEWS: UpdatesThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-06-11tools: print a warning for tools replaced by intel_regThomas Wood
Cc: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-06-11overlay: update .gitignoreThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-06-11tests: add kms_frontbuffer_trackingPaulo Zanoni
This is a new test that should exercise the frontbuffer tracking feature of the Kernel in a number of different ways. We use different drawing methods, we use the primary, cursor and sprite planes, we can test both on single and dual pipes, also on buffers not associated with any CRTCs, etc. We currently have assertions for both FBC and PSR, and we also have a "nop" test mode that should disable both FBC and PSR, and can be used for debugging. This test is also capable of testing both FBC and PSR even if they are disabled by default on the Kernel: the test knows how to change the i915.ko parameters and then set them back after testing. I am getting a significant number of failures when I run this test, which means we have some work to do on the Kernel. I also still have a small list of additional subtests that I plan to add to this test, and those tests are documented on the main function. v2: - Use igt_debugfs_open() (Thomas). - Use igt_test_description() (Thomas). - Don't check drm_open_any_master()'s result (Thomas). - Use igt_require_f() in some cases (Thomas). - Standardize some assertions. - Use the new module param functions. - Check if FBC is supported by the chipset. - Add new subtests (multidraw, enum fbs, fbc+psr). - Make tests a little shorter. - Reorganize which tests ara ran by default. - Better comments everywhere. - Rebase. v3: - Fix a small typo. - Improve the log messages a little bit more. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-06-11tests/kms_psr_sink_crc: test even if PSR is disabled by defaultPaulo Zanoni
Use the igt_set_module_param_int() call to enable it, then restore the previous value after we are done testing. With this, we can change the psr_enabled() function to psr_possible(): the only requirement should be that we have a PSR capable sink. The test should now be able to make "Source_OK" and "Enabled" become true whenever it wants. Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>