summaryrefslogtreecommitdiff
path: root/tests/i915/gem_tiled_wc.c
AgeCommit message (Collapse)Author
2021-06-24i915: Handle the case where legacy mmap is not available, v2.Maarten Lankhorst
We will remove support for the legacy mmap ioctl, so handle that case without rewriting all tests. When the gem_mmap ioctl is not available, transparently fallback to mmap_offset. Changes since v1: - Skip gem_tiled_wc too, as it requires on legacy mmap behavior. (Ashutosh) - Remove fallback for __gem_mmap__gtt, it's already mmap_offset. (Ashutosh) Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@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-11lib/i915: Split gem_create.c from ioctl_wrappers.cAndrzej Turko
In preparation for a variation on the exisiting GEM_CREATE API, split the ioctl from out of the large ioctl_wrappers.c Signed-off-by: Andrzej Turko <andrzej.turko@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2020-12-23i915/gem_tiled_w[bc]: Require some fencesChris Wilson
In these tests we set the object via the GTT with an aperture detiling fence, and then read them back with WC/WB cpu maps, verifying that the read back is a linear view of the tiled buffer. These tests require both GTT and a fence through which to detile, and are simply irrelevant if there is no aperture detiling on the platform. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-03-01i915/gem_tiled_wc: Clamp runtimeChris Wilson
Use fixed runtime rather than fixed iteration count. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2020-01-29tests/i915/gem_tiled_wc: skip on platforms without GGTTZbigniew Kempczyński
On platforms without aperture ensure test is skipped. Localize GEM_MMAP ioctl() to make sure this interface is tested. Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@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>
2019-03-25i915: Mark up some forgotten set-domainChris Wilson
It is the user's responsibility to manage their domains. In libdrm, when you mmap a pointer, it calls set-domain automatically, but igt requires the caller to manage it explicitly, so do so. The vast majority already do correct manage the domain as they use the pointer into the mmap, just a few have been missed over the years. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2019-03-15i915/gem_tiled_w[bc]: Tighten computation of upper boundChris Wilson
Fix the off-by-one in computing the last page that caused us to try and mmap the page beyond the end of the object. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Antonio Argenziano <antonio.argenziano@intel.com>
2019-01-11i915/gem_tiled_wc: Reuse common gem_get_tilingChris Wilson
get_tiling == gem_get_tiling + igt_require; so do that instead of opencoding the ioctl. 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>
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>