summaryrefslogtreecommitdiff
path: root/tests/gem_exec_params.c
AgeCommit message (Collapse)Author
2018-08-01Follow kernel's resource streamer removalLucas De Marchi
Resource streamer is being removed from all GENs, so rewrite the tests so to loop over all engines and set the expected return in case the platform has resource streamer. This makes it compatible with both old and new kernels (thanks Chris). v2: let one test per ring rather than just one test v3: check what the kernel returns for I915_HAS_RESOURCE_STREAMER to decide what we expect as return value from the the batch submission (suggested by Chris) Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2018-02-23igt: Use lib gem_execbuf where possibleAntonio Argenziano
Replace custom execbuf ioctl wrapper with the ones in lib. v2: - Lib execbuf wrapper is not signal handling friendly. (Chris) v3: - EXECBUFFER2_WR != EXECBUFFER2. (Chris) v4: Drop gem_exec_fence.c changes Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-02-01igt/gem_exec_params: Drop drm master privileges only on drm master fdsAntonio Argenziano
Subtest 'secure-non-master' tries to drop drm-master privileges on a non drm-master fd. Instead drop master privileges after the subtest acquires it so that other subtests are not affected by it. v2: - Require root privilege for the sub-test. (Chris) V3: - Cosmetic refactoring. (Chris) Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-12-11tests: Use igt_device_set_masterChris Wilson
A few tests only require DRM_MASTER privileges for a subset of gen or tests, and so open the device as normal and conditionally call drmSetMaster. Translate these over to using igt_device_set_master(), which includes a bit more debugging for when it fails. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
2017-08-16tests/gem_exec_params: Update the invalid-flag subtest for FENCE_ARRAYJason Ekstrand
Tests for the new flag were added in 3685dabb0ab25eb1. Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-07-08igt/gem_exec_params: Exercise BATCH_FIRSTChris Wilson
Trivial test to alternate executing a batch either stored in the last slot (default) or the first slot (EXEC_BATCH_FIRST). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-07-07igt/gem_exec_params: Update negative flags test.Chris Wilson
Negative testing ftw. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-02-22igt: Start marking up GEM tests that require an alive GPU to functionChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-02-04tests/gem_exec_params: add test for exec_fence paramsDaniele Ceraolo Spurio
Added a subtest for invalid FENCE_IN usage, updated invalid-flag subtest and made the rsvd2 test skip when exec fences are available. Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Reviewed-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-02-10tests/gem_exec_params: test all valid execution flagsDaniele Ceraolo Spurio
The control subtest has been extended to check the execution flags for all the rings that are present in the HW. Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
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-08-12tests: Document ABI extension catchersDaniel Vetter
Our invalid-flags/params testcases are meant to catch abi extensions by just testing for the next available flag/param. Unfortunately we need that since without those we forgot to write testcases for these new flags way too often :( But it's not entirely clear why this is, so document this trick with comments. Also gem_wait wasn't this paranoid, so change the testcase to be so. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-07-06tests/gem_exec_params: check invalid flags for Resource StreamerAbdiel Janulgue
Make sure resource streamer flags works only in correct ring in addition to checking next flag after the RS boundary fails. v2: Make sure we reject RS on pre-hsw. v3: Don't skip 1<<15 for the exec flags (Jani Nikula) Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-01-22tests/gem_exec_params: check the invalid flags for dual bsd ringZhipeng Gong
v2: add more tests to address Daniel's comments(Zhipeng) Signed-off-by: Zhipeng Gong <zhipeng.gong@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-08-29igt: Prettify igt_assert_eq() failure messagesChris Wilson
This just improves the language about the exact failure to reduce confusion. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-04-28tests/gem_exec_params: One more invalid ring testsDaniel Vetter
With the vebox 2 patches the number of internal rings don't match the number of exposed rings. So add another subtest with an invalid ring which should be invalid both internally and externally. The bug this will catch is using the ring structure before validation, which the old "invalide-ring" wont be able to due to the internal vebox2 ring. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-04-24tests/gem_exec_params: Fix rel-constants-invalid subtestDaniel Vetter
Reported by Ville and Zhao Yakui. Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-04-24tests: Add gem_exec_paramsDaniel Vetter
This fills all the gaps we've had in our execbuf testing. Overflow testing of the various arrays is already done by gem_reloc_overflow. Also add kms_flip_tiling to .gitignore. This will cause a bunch of failures since current kernels don't catch all fallout. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>