summaryrefslogtreecommitdiff
path: root/tests/i915/gem_create.c
AgeCommit message (Collapse)Author
2022-06-30tests/i915/gem_create: exercise NEEDS_CPU_ACCESSMatthew Auld
Add some basic tests for this new flag. Signed-off-by: Matthew Auld <matthew.auld@intel.com> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com> Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
2022-06-30lib/i915: wire up optional flags for gem_create_extMatthew Auld
For now limit to direct callers. Signed-off-by: Matthew Auld <matthew.auld@intel.com> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com> Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
2022-05-31igt: Promote/rename OS helpersRob Clark
Promote intel_os.c helpers to igt_os.c, so that I can re-use them for some additional msm tests. Just big churny rename, no functional change. Signed-off-by: Rob Clark <robdclark@chromium.org> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2022-03-07i915/gem_create: Added test description for test casePriyanka Dandamudi
Added test description to all the available subtests. v2: Added test description for newly added subtets. v3: Updated test descriptions. Cc: Melkaveri Arjun <Arjun.Melkaveri@intel.com> Cc: Kamil Konieczny <kamil.konieczny@linux.intel.com> Signed-off-by: Priyanka Dandamudi <priyanka.dandamudi@intel.com> Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
2021-08-10tests/gem_create: Adopt to use allocatorZbigniew Kempczyński
For newer gens we're not able to rely on relocations. Adopt to use offsets acquired from the allocator. Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Cc: Ashutosh Dixit <ashutosh.dixit@intel.com> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
2021-07-08tests/i915/gem_create: Convert to intel_ctx_tJason Ekstrand
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> Acked-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2021-05-27tests/i915/gem_create: exercise placements extensionMatthew Auld
Add some explicit testcases for the create_ext placements extension. Signed-off-by: Matthew Auld <matthew.auld@intel.com> Cc: Dominik Grzegorzek <dominik.grzegorzek@intel.com> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com>
2021-05-27lib/i915/gem_create: Add gem_create_extAndrzej Turko
Add a wrapper for gem_create_ext ioctl (a version of gem_create that accepts extensions). In preparation for the driver change implementing it, a local definition of its id and necessary structs have been added, which are to be erased as soon as those definitions appear in the i915_drm.h file. The new ioctl wrapper is added to a separate file. For consistency the wrapper of the old ioctl, gem_create is moved from ioctl_wrappers to gem_create. Signed-off-by: Andrzej Turko <andrzej.turko@linux.intel.com> Cc: Zbigniew Kempczynski <zbigniew.kempczynski@intel.com> Cc: Dominik Grzegorzek <dominik.grzegorzek@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Cc: Chris P Wilson <chris.p.wilson@intel.com> Signed-off-by: Matthew Auld <matthew.auld@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com>
2021-01-20i915/gem_create: Exercise an impossible allocationChris Wilson
The largest processor in the works can support 57b of address space, far more memory than we can afford to use in CI! It is safe to assume that we will not have 64b processors for some time, so we can use the top bit to exercise our oversized object detection. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
2021-01-20i915/gem_create: Check wrap condition for -1Chris Wilson
Check that we correctly reject an object size that will intentionally wrap upon aligning to a page. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
2020-12-11i915/gem_create: Exercise bo creation while the GPU is busyChris Wilson
We always expect to be able to create new buffer, regardless of the state of the GPU. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Matthew Auld <matthew.auld@intel.com>
2020-11-19Remove unused intel_bufmgr.h headersDominik Grzegorzek
Delete intel_bufmgr include where it is not necessary. Signed-off-by: Dominik Grzegorzek <dominik.grzegorzek@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2020-06-03i915: purge i915_gem_create_v2Matthew Auld
The gem_create_v2 uapi was never merged, which would have been a nice addition to allow userspace to utilise stolen memory. Since it can only get in the way at this point, let's just remove it. Signed-off-by: Matthew Auld <matthew.auld@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2020-05-07lib/i915: Split igt_require_gem() into i915/Chris Wilson
igt_require_gem() is a pecularity of i915/, move it out of the core. Similar opportunistic move of gem_reopen_driver() and gem_quiescent_gpu(). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2020-05-03i915/gem_create: Skip random number of pages in checking always-clearChris Wilson
Try to reduce the time spent checking each object (just in case we get trapped reading a huge object back via UC) and at the same time try to catch higher pages unawares and unflushed. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-02-05tests/i915/gem_create: Modify the page nonaligned testsRamalingam C
Considering that kernel returns the real memory size(page aligned) allocated, "create-invalid-nonaligned" test is not needed anymore. Hence removing them. At "create-valid-nonaligned" test we are asserting the returned mem size from kernel to be minimum page aligned and checking the write into padded memory. Signed-off-by: Ramalingam C <ramalingam.c@intel.com> cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-12-03tests/i915/gem: remove igt_skip_on_simulation()Swati Sharma
Removing igt_skip_on_simulation() from all the gem tests since this feature is not supported anymore. v2: Rebase v3: Corrected build failure, because of deletion of gem_exec_blt.c Signed-off-by: Swati Sharma <swati2.sharma@intel.com> Signed-off-by: Karthik B S <karthik.b.s@intel.com> Reviewed-by: Martin Peres <martin.peres@linux.intel.com>
2019-11-13i915/gem_create: Check for cache bypass around zeroed pagesChris Wilson
Check that even if userspace tries to sneak around the CPU caches of its zeroed pages, it sees nothing but zeroes. Suggested-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Cc: Matthew Auld <matthew.auld@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
2019-07-04i915/gem_create: Show number of pages clearedChris Wilson
Just a little bit of feedback at the end of an otherwise quiet 20s. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
2019-06-25i915/gem_create: use atomic_* instead of __sync_*Guillaume Tucker
This fixes builds on some architectures, in particular MIPS which doesn't have __sync_add_and_fetch_8 and __sync_val_compare_and_swap_8 for 64-bit variable handling. * replace calls to the older __sync_* functions with the new atomic_* standard ones * use the _Atomic type modifier as required with stdatomic.h functions * add dependency for gem_create on libatomic Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com> Reviewed-by: Simon Ser <simon.ser@intel.com>
2019-04-12tests/gem_create: Test unaligned BO size updateMichał Winiarski
The driver is supposed to update the size when it's trying to outsmart userspace. Let's test it. v2: Rework to use local ioctl wrapper (Chris) v3: s/16/15, move test a bit earlier (Chris) Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Janusz Krzysztofik <janusz.krzysztofik@intel.com> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-03-14i915/gem_create: Always try to create an object of at least one pageChris Wilson
0-byte objects are not allowed. References: https://bugs.freedesktop.org/show_bug.cgi?id=110106 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
2019-02-17i915/gem_create: Verify that all new objects are clearChris Wilson
The kernel must not return stale information back to userspace when they create a new object. For that purpose, we always clear objects on creation, so verify that this is so. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Matthew Auld <matthew.auld@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
2018-10-23tests: Introduce i915 directoryArkadiusz Hiler
We can already move all the tests with distinct prefixes: gem_, gen3_ and i915_. pm_ and drv_ tests will follow in batches, so we can do the adjustments in the reporting/filtering layer of the CI system. v2: Fix test-list.txt generation with meson v3: Fix docs build (Petri) Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Petri Latvala <petri.latvala@intel.com> Cc: Martin Peres <martin.peres@linux.intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com> Tested-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Chris Wilson <chris@chris-wilson.co.uk>