Age | Commit message (Collapse) | Author |
|
Use the definition from kernel headers.
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
|
|
There is no such thing in the kernel as ioctl
DRM_COMMAND_BASE + DRM_I915_GEM_GET_APERTURE returning a struct with
stolen_total_size. So gem_total_stolen_size() always returns 0.
Also there are no callers for gem_total_stolen_size(), except for
gem_require_stolen_support() which is unused.
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
|
|
Just use the one from the kernel headers. Updated with:
git grep -l LOCAL_I915 | \
xargs sed -i -e '/^#define LOCAL_I915/d' -e 's/LOCAL_\(I915[[:alnum:]_]*\)/\1/g'
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
|
|
Create framebuffer object from lmem for discrete file descriptor
The framebuffer backing object should be from local memory for discrete.
Cc: Michael J. Ruhl <michael.j.ruhl@intel.com>
Signed-off-by: Mohammed Khajapasha <mohammed.khajapasha@intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
Acked-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
|
|
With an introduction of Local Memory concept we should be able to
allocate object in specific memory region. This patch implements
helper functions that allow this, both for querying what the device
supports and hooking into gem_create_ext to select the placements.
Co-authored-by: Lukasz Kalamarz <lukasz.kalamarz@intel.com>
Co-authored-by: Zbigniew Kempczynski <zbigniew.kempczynski@intel.com>
Signed-off-by: Andrzej Turko <andrzej.turko@linux.intel.com>
Signed-off-by: Lukasz Kalamarz <lukasz.kalamarz@intel.com>
Signed-off-by: Zbigniew Kempczynski <zbigniew.kempczynski@intel.com>
Cc: Zbigniew Kempczynski <zbigniew.kempczynski@intel.com>
Cc: Dominik Grzegorzek <dominik.grzegorzek@intel.com>
Cc: Petri Latvala <petri.latvala@intel.com>
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Acked-by: Petri Latvala <petri.latvala@intel.com>
|
|
The general direction at this time is to phase out pread/write ioctls
and not support them in future products. This means IGT must handle
the absence of these ioctls. This patch does this by modifying
gem_read() and gem_write() to do the read/write using the pread/pwrite
ioctls first but when these ioctls are unavailable fall back to doing
the read/write using a combination of mmap and memcpy.
Callers who must absolutely use the pread/pwrite ioctls (such as tests
which test these ioctls or must otherwise only use the pread/pwrite
ioctls) must use gem_require_pread_pwrite() to skip when these ioctls
are not available.
v1: Removed __gem_pread, gem_pread, __gem_pwrite and gem_pwrite
introduced previously since they are not necessary,
gem_require_pread_pwrite is sufficient
v2: Fix CI failures in gem_advise and gen9_exec_parse by introducing
gem_require_pread_pwrite
v3: Skip mmap for 0 length read/write's
v4: Remove redundant igt_assert's
v5: Re-run
v6: s/EOPNOTSUPP/-EOPNOTSUPP/
v7: Rebase on latest master, skip gem_exec_parallel@userptr with
gem_require_pread_pwrite
v8: Re-run
v9: Rebase
Acked-by: Dave Airlie <airlied@redhat.com>
Acked-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
|
|
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>
|
|
In order to find the correct aperture size for the test, we want to pass
the test's device into the query.
Reported-by: Bruce Chang <yu.bruce.chang@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Bruce Chang <yu.bruce.chang@intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
|
|
Add a generic helper for DRM_IOCTL_GET_CAP ioctl.
v10: -No changes.
v11: -Pass cap ID instead of the whole structure. (Ville)
-Fix the patch ordering. (Ville)
Signed-off-by: Karthik B S <karthik.b.s@intel.com>
[vsyrjala: make the docs and code match]
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
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>
|
|
Local macros were declared in several files as a prelude to upstream
implementations. Now that we ship include/drm-uapi, we can remove LOCAL
as we upstream.
Cc: Dixit, Ashutosh <ashutosh.dixit@intel.com>
Cc: Tahvanainen Jari <jari.tahvanainen@intel.com>
Signed-off-by: ranjeet kumar <ranjeet1.kumar@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
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>
|
|
gem_total_mappable_size() has no callers and calls the
DRM_I915_GEM_GET_APERTURE ioctl using 'struct
local_i915_gem_get_aperture' which has fields which are unsupported in
the kernel. Delete the function.
Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Move inline upper_32_bits() and lower_32_bits() function from tests to
library. Functiom will be usefull for elsewhere use.
v2: fix function description
Cc: Katarzyna Dec <katarzyna.dec@intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
Signed-off-by: Daniel Mrzyglod <daniel.t.mrzyglod@intel.com>
|
|
To produce surfaces that are compressed using the media compression
format we need to use one of the media engines. The simplest way for
this is to use the vebox engine's tiling convert command, so add support
for this.
v2:
- Rebase on latest igt. (Mika)
Cc: Mika Kahola <mika.kahola@intel.com>
Cc: Brian Welty <brian.welty@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
|
|
Gen12 display can decompress surfaces compressed by render engine with Clear Color, add
a new modifier as the driver needs to know the surface was compressed by render engine.
Signed-off-by: Mika Kahola <mika.kahola@intel.com>
Reviewed-by: Radhakrishna Sripada<radhakrishna.sripada@intel.com>
|
|
As we've agreed that using I915_GEM_PREAD/PWRITE IOCTLs on dma-buf
objects doesn't make much sense, we are not going to extend their
handlers in the i915 driver with new processing paths required for them
to work correctly with dma-buf objects on future hardware with no
mappable aperture. When running on that kind of hardware, just skip
subtests which use those IOCTLs.
v2: Examine pread/pwrite ABI, not mmap ABI (Chris)
v3: Don't use "no mappable GGTT" wording in commit message (Chris)
Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Gen-12 has a new compression format for render compression.
For this, a new modifier is needed to indicate that.
Signed-off-by: Mika Kahola <mika.kahola@intel.com>
Reviewed-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
|
|
With the new engine query method engines are reachable through
an index and context they are combined with.
The 'gem_has_ring()' becomes 'gem_context_has_engine()' that
requires the index that the engine is mapped within the driver.
The function has been moved from lib/ioctl_wappers to
lib/i915/gem_context where it is more appropriate.
The previous 'gem_has_ring()' function becomes a wrapper to the
new 'gem_context_has_engine()'.
Signed-off-by: Andi Shyti <andi.shyti@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
|
|
One significant usecase for intel_reg/etc. is to be able to examine
the hardware state *before* loading the driver. If the tool forces
the driver to load we've totally lost that capability.
This reverts commit 8ae86621d6fff60b6e20c6b0f9b336785c935b0f.
Cc: Michał Winiarski <michal.winiarski@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Acked-by: Michał Winiarski <michal.winiarski@intel.com>
|
|
It allows us to make things a little bit more generic. Also, we now
require fd rather than doing guesswork when it comes to pci address.
v2: Use readlinkat rather than string concat, move stuff around, provide
a version that does not assert. (Chris)
v3: Print addr on failure, avoid assignment in conditionals. (Chris)
Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Move all mmap flavours and support function to separate file in i915
folder. This helps with moving i915 specific functions away from common
libraries.
v2:
- Autotools still exists. (Petri)
- Include gem_mman.h directly. (Chris)
v3:
- Keep includes explicit. (Chris)
Signed-off-by: Antonio Argenziano <antonio.argenziano@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>
|
|
vmwgfx and amdgpu doesn't support fb modifiers, yet kms_addfb() requires
modifier support. Since many tests don't need this to run, the
requirement can be made less broad.
Therefore, tighten the requirement to cases where modifiers are actually
needed.
v2:
* In create_fb() calls to kms_addfb(), remove the modifier flag iff the
driver doesn't support modifiers and the modifer is 0
* Don't modify the flag in kms_addfb().
Signed-off-by: Deepak Rawat <drawat@vmware.com>
Signed-off-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Nobody uses the function directly, instead using the various helpers to
determine if ppgtt is present.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
|
|
Currently __kms_addfb() assumes that only the first plane can be
at offset 0. I don't particularly like such assumptions so let's
just pass in the number of planes explicitly.
We'll also require offsets[] to be passed in always. Nothing really
to gain by making it optional.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
|
|
Make __kms_addfb() usable with planar formats by passing in the
stride for each plane.
v2: Handle strides[1] for planar formats in kms_available_modes_crc
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
|
|
Setup a userptr object that only has a read-only mapping back to a file
store (memfd). Then attempt to write into that mapping using the GPU and
assert that those writes do not land (while also writing via a writable
userptr mapping into the same memfd to verify that the GPU is working!)
v2: Pull the random batch construction into a routine to avoid
duplication.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
|
|
Pollable spin batch exports a spin->running pointer which can be checked
by dereferencing it to see if the spinner is actually executing on the
GPU.
This is useful for tests which want to make sure they do not proceed with
their next step whilst the spinner is potentially only being processed by
the driver and not actually executing.
Pollable spinner can be created with igt_spin_batch_new_poll or
__igt_spin_batch_new_poll, after which igt_spin_busywait_until_running can
be used to busy wait until it is executing.
v2:
* Move READ_ONCE to igt_core.
* Add igt_spin_busywait_until_running. (Chris Wilson)
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Add support to create planar framebuffers, but don't add formats
that support them yet. This first requires conversion to the RGB24 format.
Changes since v1:
- Don't crash in igt_create_bo_with_dimensions().
Changes since v2:
- Zero offsets for dumb fb too.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
[mlankhorst: Change memset(4 * ..) to memset(ARRAY_SIZE(format->plane_bpp) * ..)]
|
|
We'd like to make ioctl_wrappers a bit thinner, and we plan to add new
helpers in the following patch. Let's move context related helpers before
adding more content.
Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Katarzyna Dec <katarzyna.dec@intel.com>
Cc: Petri Latvala <petri.latvala@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com>
Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
|
|
Couple of tests are using either determining scheduler capabilities or
pretty printing. Let's move those to helpers in lib. We can also keep
the value obtained from getparam static.
v2: Break the trend of expanding ioctl_wrappers
Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Katarzyna Dec <katarzyna.dec@intel.com>
Cc: Petri Latvala <petri.latvala@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com>
Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
|
|
We want to create very large objects, larger than the 2G limit imposed
by using ints.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Reviwed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
|
|
We have two style of ioctl wrappers. The principle interface does error
checking on behalf of the caller (to avoid having lots of repetitious
code in each test), and for the few cases where the error is important
for the test, we also expose a double underscore version. Fix up
__gem_create() to follow this pattern and report the negative error code
returned by the kernel.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
|
|
The early gen3 machines inherited the MI block and restrictions from
gen2, and may only use physical addresses in conjunction with
MI_STORE_DATA_IMM -- that makes it unusable for us from userspace, where
we can only use virtual offsets.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Soon we will have tests that are only for platforms with reset-engine
(GEN8+), so add a helper to query the has_gpu_reset via the getparam ioctl.
v2: Add more helper functions to avoid using magic numbers in tests (Arek).
Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Signed-off-by: Michel Thierry <michel.thierry@intel.com>
Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
|
|
gem_execbuf_wr was duplicated in multiple places.
Moving everything to lib/
Signed-off-by: Lukasz Fiedorowicz <lukasz.fiedorowicz@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
When the memory backing the userptr object is released by the user, but the
BO itself is not closed, it's possible to trigger recursive deadlock
caused by operations done on different BO mapped in that region.
Testcases are simulating such behaviour by using MAP_FIXED mmap flag.
Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
|
|
Trying to execbuf with a purged object is meant to fail.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
SIGRTMAX appears to be used by valgrind now for its internal tracking,
so avoid it in the helpers.
Also add some valgrind annotations in gem_mmap, to make sure that its
accesses are tracked correctly. I've also added gem_munmap, but there
are a lot of places that don't use it yet in tests/.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
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>
|
|
Add a few subtests that check that lossless compressed render targets
are properly displayed. Also test a few error conditions.
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Acked-by: Ben Widawsky <ben@bwidawsk.net>
|
|
The opposite direction of to_user_pointer() is from_user_pointer().
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Add to_user_pointer() helper function which helps cast
pointers properly when being used with ioctls.
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Context BAN_PERIOD will get depracated so subsitute it with BANNABLE
property. Make ctx param test to accept both variants for now
until kernel changes have landed, to not break BAT.
v2: check against - EINVAL on get/set ban as it can return -EPERM
v3: better naming for get/set (Chris)
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
|
|
The kernel tries to hide L-shaped memory with asymmetric swizzling from
userspace by reporting lies through the get-tiling interface. Check for
these lies by comparing the reported swizzle with the actual swizzle,
and only run swizzling tests where we know the underlying physical
swizzling.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97108
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Avoid macro expansion inside the asserts so that the error messages are
readable.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|