summaryrefslogtreecommitdiff
path: root/tests/gem_ppgtt.c
AgeCommit message (Collapse)Author
2018-07-06lib: Add aux surface state to igt_bufVille Syrjälä
Store a bit of aux surface state in igt_buf. This will be needed for rendercopy AUX_CCS_E color compression. We also have to sprinkle memset()s and whatnot all over to make sure the current igt_buf users don't leave the aux stuff full of stack garbage. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-04-23igt/gem_ppgtt: Flush the driver to idle before counting leaksChris Wilson
I have a cunning plan to make the vma open/close lazy to cache frequent reallocations (as buffers are passed between applications, e.g. DRI). However, this will mean that we will not be immediately closing vma and so need to tell the kernel to process the idle handlers before checking for leaks. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2017-04-08tests: More require GEM markupChris Wilson
A few more tests that use i915/gem without first checking that the GPU is working. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
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-02igt: Mass conversion to to_user_pointer()Chris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-08-19igt/gem_ppgtt: Remember to flush operations before assertionChris Wilson
We have to flush any queued operations before making an assertion such as the VMA being removed from the ppgtt. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-05-24tests/gem_ppgtt: Switched to new aliases of intel specific functions.Robert Foss
Switched from drm_XXX aliases drm_intel_XXX aliases for symbols where that switch is possible. Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-03-07gem_ppgtt: Fix flink-and-exit-vma-leak for engine->last_contextTvrtko Ursulin
Now that engines keep references on the last executed contexts, to fix this test we need to execute an unrelated context last to ensure the one we are interested in is free to be cleaned up when we expect it to be. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2016-01-25lib/ioctl_wrappers: Add gem_gtt_type exposing raw HAS_ALIASING_PPGTT paramMichał Winiarski
No functional changes. While I'm here, let's also rename gem_uses_aliasing_ppgtt (since it's being used to indicate if we are using ANY kind of ppgtt) and introduce gem_uses_full_ppgtt to drop some unnecessary code from tests that were previously calling getparam directly instead of using ioctl wrapper. v2: drop gem_uses_full_48b_ppgtt since it's no longer used anywhere, s/48b/64b (Chris) v3: rebase Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-09-24lib: add igt_debugfs_searchThomas Wood
Add igt_debugfs_search to search each line in a debugfs file for a specified substring. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-24gem_ppgtt: Test VMA leak on context destructionTvrtko Ursulin
Test that VMAs associated with a context are cleaned up when contexts are destroyed. In practice this emulates the leak seen between fbcon and X server. Every time the X server exits we gain one VMA on the fbcon frame buffer object as externally visible via for example /sys/kernel/debug/dri/0/i915_gem_gtt. v2: Use igt_debugfs_open, getline and strstr instead of home-brewed string matching. (Thomas Wood) v3: Rebase for drm_open_driver. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Thomas Wood <thomas.wood@intel.com> Signed-off-by: Thomas Wood <thomas.wood@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-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-05-07tests/gem_ppgtt: Check for vm leaks with flink and ppgttDaniele Ceraolo Spurio
Using imported objects should not leak i915 vmas (and vms). In practice this simulates Xorg importing fbcon and leaking (or not) one vma per Xorg startup cycle. v2: use low-level ioctl wrappers and bo offset to check the leak (Chris) v3: use the flinked bo as batch (Chris) v4: add check on offset, remove unneeded assignments (Chris) Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> (v2+) Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-02-13tests: Align subtest with naming conventionDaniel Vetter
Yeah, historically grown but we should try to be somewhat consistent. It helps with filtering testcases. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-02-13tests/gem_ppgtt: Start rcs before bcs for context testsDaniel Vetter
This way the igt_require for the ctx support is hit before we've launched a bazillion threads and need to wait until they're all done. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-10-02tests: Sprinkle missing igt_exit() where needed.Daniel Vetter
Yay for breaking piles of tests. This regression has been introduced with commit 5782eca1e19e85a04ad402fa4094aa1b5f9c53ce Author: Tim Gore <tim.gore@intel.com> Date: Wed Oct 1 13:25:20 2014 +0100 lib/igt_core.c: disable lowmemorykiller during tests Cc: Tim Gore <tim.gore@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-09-09igt/gem_ppgtt: Create secondary contexts and mmChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-09test: Exercise full ppgtt switching between multiple fdChris Wilson
Load up both rings with lots of fighting between multiple contexts. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>