summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-08-06Revert "tests/gem_ctx_param_basic: fix invalid params"HEADmasterJesse Barnes1-1/+1
This reverts commit 0b45b0746f45deea11670a8b2c949776bbbef55c. We want to check against our local copy of the params so we can at least potentially catch new flag additions. Requested-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2015-08-06tests/gem_ctx_param_basic: fix invalid paramsJesse Barnes1-1/+1
Use -1 as the invalid param since we've added more since this test was created, causing expected EINVAL failures to return an unexpected error code. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2015-08-06benchmarks/Android.mk, tools/Android.mk: Fix android build errorDerek Morton2-2/+2
Recently added tools / benckmarks have the same module name as existing tests. Android does not allow duplicate modules. This patch appends _benchmark and _tool to the module names used when building benckmarks and tools to prevent clashes with tests of the same name. Signed-off-by: Derek Morton <derek.j.morton@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-08-05lib: add igt_debugfs_read()Paulo Zanoni5-60/+55
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 Zanoni1-0/+18
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-08-05tests/gem_mmap_wc: don't fail if the Kernel is too old for the getparam flagPaulo Zanoni1-1/+1
Just don't check the drmIoctl() return code: the "if (val)" should be enough to prevent any problems. v2: Don't SKIP, just proceed (Chris). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89739 Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-08-05configure.ac: Fix chmod on intel_aubdump the right wayKristian Høgsberg Kristensen1-3/+3
autoconf executes the init commands after each file it creates, causing these errors at configure time: ... chmod: cannot access 'tools/intel_aubdump': No such file or directory config.status: creating tools/Makefile chmod: cannot access 'tools/intel_aubdump': No such file or directory config.status: creating tools/intel_aubdump config.status: creating tools/quick_dump/Makefile ... Once it creates intel_aubdump, the errors go away. When I first added the chmod command, I already had a tools/intel_aubdump in my tree and didn't get the error. Split the intel_aubdump creation into its own AC_CONFIG_FILES() invocation to avoid this. Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
2015-08-05tools: Use right #include path for i915_drm.hKristian Høgsberg Kristensen1-1/+1
pkg-config adds /usr/include/libdrm to the include path so we only need i915_drm.h Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
2015-08-04configure.ac: Fix the intel_aubdump chmod to use topbuilddirKristian Høgsberg Kristensen1-1/+1
Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
2015-08-04tools/aubdump: Add --device option for overriding device IDKristian Høgsberg Kristensen3-7/+40
This lets us capture AUB traces for platforms different from the one we're running on. Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
2015-08-04tools/aubdump.c: Also define struct drm_i915_gem_userptr for compatibilityKristian Høgsberg Kristensen1-0/+16
Oops, we obviously also need to define the argument struct for userptr. Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
2015-07-31tools/aubdump: #define DRM_IOCTL_I915_GEM_USERPTR if kernel headers don'tKristian Høgsberg Kristensen1-0/+5
Fix compile error on older kernels. Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
2015-07-31tools: Add man page for intel_aubdumpKristian Høgsberg Kristensen2-0/+34
Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
2015-07-31tools: Add LD_PRELOAD-based AUB dumper toolKristian Høgsberg Kristensen6-1/+758
This does everything the aub dump functionality in libdrm does, but without being part of libdrm. This moves the very developer oriented functionality out of core libdrm and adds some flexibility in how we activate it (we can specify filename, for example). Most importantly, this lets us dump aub files for tools and/or drivers that don't use libdrm, without having to add that code to each of those projects. The tool is used much like strace or valgrind. For example: $ intel_aubdump -v --output=stuff.aub -- glxgears -geometry 500x500 will launch glxgears with its options and enable aub dumping and pass the -v and --output=stuff.aub options to the aub dumper. Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
2015-07-30tests/kms_addfb: Add testcass for garbage in unused planesDaniel Vetter1-6/+61
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-07-28igt/gem_streaming_writes: Reorder setting EXEC_OBJECT_WRITEChris Wilson1-19/+22
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90944 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-07-28igt/gem_streaming_writes: Bind into the GTT earlyChris Wilson2-4/+36
If we are using a streaming GGTT write into the source, we need to trigger an early fault in order to obtain a mappable offset. This is required when later we start reserving execbuf object top-down to try and avoid mappable space! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-07-24benchmark: Measure allocation time for objectsChris Wilson3-0/+178
A basic measurement, how fast can we create and populate an object with backing storage? Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-07-24benchmarks: Measure mmap fault latencyChris Wilson1-3/+16
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-07-24benchmarks: Benchmarkify gem_exec_ctxChris Wilson3-0/+204
Measure the overhead of execution when doing nothing, switching between a pair of contexts, or creating a new context every time. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-07-24tests/drm_import_export: Add tests for prime/flink sharing racesMichał Winiarski1-0/+112
It is possible to race between unreference of the underlying BO and importing it from prime_fd/name. Verify that the behaviour of libdrm is consistent for prime/flink. v2: more comments in source file, dropped extra whitespace Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> Cc: Thomas Wood <thomas.wood@intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-07-24benchmarks: Add kms_vblank to .gitignoreChris Wilson1-0/+1
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-07-23benchmarks: Measure round-trip time for an immediate vblanksChris Wilson2-1/+183
By measuring both the query and the event round trip time, we can make a reasonable estimate of how long it takes for the query to send the vblank following an interrupt. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-07-23benchmarks: gem_prw add the read/write switch to getoptChris Wilson1-1/+1
In my haste to merge the two gem_pread/gem_pwrite, I forgot to write up the command line switch to getopt. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-07-23benchmarks: Add simple mmap benchmarksChris Wilson3-0/+167
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-07-23benchmarks: Add simple pread/pwrite benchmarksChris Wilson3-0/+123
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-07-22benchmarks: Benchmarkify gem_exec_nopChris Wilson4-2/+156
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-07-20man: ensure rst files are included in the distribution tarballThomas Wood1-1/+1
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-07-20lib/gpgpu_fill: Add SKL supportDominik Zeromski3-0/+111
SKL changed state base address command. Cc: Thomas Wood <thomas.wood@intel.com> Signed-off-by: Dominik Zeromski <dominik.zeromski@intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-07-20lib/gpgpu_fill: Add BDW supportDominik Zeromski3-6/+299
BDW changed structure of surface state and interface descriptors. Commands like state base address, gpgpu walker were extended. Cc: Thomas Wood <thomas.wood@intel.com> Signed-off-by: Dominik Zeromski <dominik.zeromski@intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-07-20lib: Move gpgpu_fill code to separate fileDominik Zeromski7-172/+464
The gpgpu fill utility functions are used in separate test so it's logical to keep them in separate file. This is similar to what media spin test did in the past. Functionally only gpgpu kernel changed. Send instruction payload size was reduced. Since offset is incremented by 0x10 bytes there is no point in using larger writes. Cc: Thomas Wood <thomas.wood@intel.com> Signed-off-by: Dominik Zeromski <dominik.zeromski@intel.com> [Thomas: Fix typo of gpgpu_fill.h in Makefile.sources] Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-07-20Android.mk: Disable tools that do not build for androidDerek Morton2-1/+5
Disable the tools / demo code that do not currently build for android until they can be fixed. Affected tools / demos intel_display_crc intel_sprite_on v2: intel_display_crc compiled conditionally on ANDROID_HAS_CAIRO flag. v3: removed intel_reg from the skip list as Thomas has prepared a patch to fix it for Android. Signed-off-by: Derek Morton <derek.j.morton@intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-07-20lib: exit immediately if igt_fail is called in an exit handlerThomas Wood1-0/+8
Exit immediately if the test is already exiting and igt_fail is called. This can happen if an igt_assert fails in an exit handler. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91349 Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-07-20tools/Android.mk: add any extra program sourcesThomas Wood1-1/+5
v2: remove unintended change and fix source file duplication errors (Derek Morton) Cc: Derek Morton <derek.j.morton@intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-07-20intel_reg: support platforms without sys/io.hThomas Wood2-2/+17
Based on an idea from Jani Nikula. Cc: Jani Nikula <jani.nikula@intel.com> Cc: Derek Morton <derek.j.morton@intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-07-19igt/stats: Fixup tests to compile after interface changesChris Wilson1-1/+2
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-07-19tools: Add a simple stats generator 'igt_stats'Chris Wilson3-0/+107
A rudimentary tool on top of the igt_stats library. Reads a list of numbers from stdin or from a file and prints the estimate of the central location, aka average. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-07-19lib: Allow storing floating point values in igt_statsChris Wilson2-23/+91
We don't always have precise integers with which to store, so allow degrading to double precision floating point based on available input. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-07-16tests/gem_reg_read: Extend and check for valid 36b counterMichał Winiarski1-21/+120
When reading the timestamp register with single 64b read, we are observing invalid values on x86_64: [f = valid counter value | X = garbage] i386: 0x0000000fffffffff x86_64: 0xffffffffXXXXXXXX Test checks if the counter is moving and increasing. Add a check to see if we can use (reg | 1) flag to get a proper 36b timestamp, shifting the value on x86_64 if we can't. v2: More iterations of monotonic test, comments, minor fixups (Chris) v3: Skip tests if reg_read is not supported Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-07-15igt/gem_eio: Waiting on a hung batch should report -EIOChris Wilson1-1/+29
If we are waiting on a handle, and its request is cancelled due to a hang, we should report that explicitly through the ABI. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-07-14kms_frontbuffer_tracking: don't keep debugfs openPaulo Zanoni1-41/+27
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-14tests: add kms_fbcon_fbtPaulo Zanoni3-0/+293
This test should test the interactions between fbcon and the frontbuffer tracking infrastructure. Right now the PSR test fails, but as soon as we merge the following kernel patches, the test wills tart passing: - drm/i915: PSR: Flush means invalidate + flush - drm/i915: fbdev restore mode needs to invalidate frontbuffer - drm/i915: fbdev_set_par reliably invalidating frontbuffer I didn't want to make this a subtest of kms_frontbuffer_tracking just because when I wrote it, I really didn't have in mind the fact that someone might just close the DRM fd in the middle of a subtest. After this commit we'll have a little bit of duplicated code among tests. I'll clean this up later. v2: - Refactor the code a little bit. - Add the suspend subtests. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-07-14kms_frontbuffer_tracking: implement suspend subtestPaulo Zanoni1-0/+39
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 Zanoni1-4/+6
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 Zanoni1-36/+21
Just a small bikeshed. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-07-14kms_frontbuffer_tracking: add farfromfence subtestPaulo Zanoni1-0/+82
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 Zanoni1-0/+69
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-14configure: require libdrm >= 2.4.55Paulo Zanoni3-16/+1
And drop the now unnecessary universal plane definitions. The 2.4.55 version is already quite old, so we should be fine. Thanks to Thomas Wood for quickly spotting this. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@>
2015-07-14kms_frontbuffer_tracking: only force std_1024_mode on HSWPaulo Zanoni1-23/+26
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 Zanoni1-23/+12
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>