Age | Commit message (Collapse) | Author |
|
X-Patchwork-Id: 478682
Message-Id: <20220317205414.13668-3-jeevan.b@intel.com>
To: igt-dev@lists.freedesktop.org
Date: Fri, 18 Mar 2022 02:24:12 +0530
Adding subtest to test new tiling format
Signed-off-by: Jeevan B <jeevan.b@intel.com>
Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
|
|
DRM_FORMAT_MOD_LINEAR is the more sensible name for
DRM_FORMAT_MOD_NONE. Use the better name.
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
In 22643ce4014a ("Return allocated size in gem_create_in_memory_regions()
and friends") we modified __gem_create_in_memory_regions and
gem_create_in_memory_regions to return the allocated size for buffer
objects. However, this also unnecessarily complicates programming in the
majority of cases where the allocated size is not needed. For example in
several cases it requires tracking the requested and allocated sizes
separately, the size used must be strictly uint64_t etc.
In order to simplify things and provide greater flexibility, here we change
22643ce4014a to follow the same scheme followed in gem_create_ext (and in
gem_create) where __gem_create_ext returns the allocated size but
gem_create_ext doesn't. With this change, __gem_create_in_memory_regions
returns the allocated size for situations where it is needed but in the
majority of cases where the allocated size is not needed we can just use
gem_create_in_memory_regions for casual use as before.
v2: Store requested not allocated bo size in intel_buf->size (Zbigniew)
Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
|
|
Often the allocated size is of interest and is different from the
requested size. Therefore return allocated size for the object (by
__gem_create_ext()) in gem_create_in_memory_regions() and friends.
v2: Assign buf->size correctly in __intel_buf_init (Zbigniew)
Cc: Andrzej Turko <andrzej.turko@linux.intel.com>
Cc: Zbigniew Kempczynski <zbigniew.kempczynski@intel.com>
Cc: John Harrison <John.C.Harrison@intel.com>
Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
|
|
[Why]
Looking at multiple drivers such as i915, amdgpu, and msm, EINVAL is the
standard errno when failing some fb errors.
Unless it's an exception like nouveau, every driver should act in a
standard manner and return EINVAL just like every other driver. Hence,
no special handling for unknown vendor is needed.
[How]
Remove asserts for specific drivers except for a known exception.
Tested on ChromeOS Trogdor(msm).
Signed-off-by: Mark Yacoub <markyacoub@chromium.org>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
|
|
The test will fail on discrete and needs to be skipped.
Cc: Imre Deak <imre.deak@intel.com>
Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
|
|
Skip subtests that are testing interoperability of FB modifiers and
hardware tiling if the device does not support HW tiling.
v2: Don't skip basic-y-tiled-legacy even on platforms w/o fences (Imre)
Reviewed-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Vanshidhar Konda <vanshidhar.r.konda@intel.com>
Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
|
|
[Why]
Some devices such as Trogdor do not support DRM_FORMAT_C8 pixel format.
Skip any addfb2 test on such devices that is expected to succeed such as
subtest size-max.
[How]
Only run the check on devices with DRM_FORMAT_C8 support
Tested on ChromeOS Trogdor
v1:
Use igt_display_has_format_mod instead of checking for specific drivers.
Signed-off-by: Mark Yacoub <markyacoub@chromium.org>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
|
|
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>
|
|
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>
|
|
Currently we pass the devid as if it were the fd, which doesn't work.
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Mohammed Khajapasha <mohammed.khajapasha@intel.com>
Cc: Latvala Petri <petri.latvala@intel.com>
Cc: Michael J. Ruhl <michael.j.ruhl@intel.com>
Reviewed-by: Ramalingam C <ramalingam.c@intel.com>
|
|
[Why]
AMDGPU and MSM devices have a known errno when it fails coorectly for
bad pitches.
[How]
Assert `errno` to `EINVAL` for both AMDGPU and MSM as well.
Signed-off-by: Mark Yacoub <markyacoub@chromium.org>
Reviewed-by: Arkadiusz Hiler <arek@hiler.eu>
|
|
Add invalid buffer object test case for discrete, to validate
IOCTL_MODE_ADDFB2 ioctl for LMEM, the framebuffer backing
gem objects should be from local memory for discrete.
Cc: Latvala Petri <petri.latvala@intel.com>
Cc: Michael J. Ruhl <michael.j.ruhl@intel.com>
Signed-off-by: Mohammed Khajapasha <mohammed.khajapasha@intel.com>
Acked-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
|
|
use igt_display_has_format_mod(..) to test if tile supported
or no.
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Added description for all subtests
Signed-off-by: Arundhati Hagaragi <arundhati.hagaragi@intel.com>
Cc: Laxminarayan Bharadiya, Pankaj<Pankaj.Laxminarayan.Bharadiya@intel.com>
v2: Modified description to be more specific. (Pankaj)
v3, v4: Modified description. (Pankaj)
Reviewed-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
|
|
This adjusts the check on failed calls to DRM_IOCTL_MODE_ADDFB2 in
various scenarios. According to the kernel's
drm_mode_config_funcs.fb_create documentation, a negative return code is
all that is required to signal failure, and different drivers return
different errors in these scenarios.
Particularly, Nouveau returns -ERANGE rather than -EINVAL in scenarios
where the buffer is too small for the proposed configuration.
In situations where Nouveau and Intel return codes diverge, split out
the errno assertions into device-specific blocks.
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
Signed-off-by: Jeremy Cline <jcline@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
|
|
Several tests in the addfb suite only apply to i915 devices. Mark them
as such so these tests are skipped on non-Intel devices.
Reviewed-by: Lyude Paul <lyude@redhat.com>
Signed-off-by: Jeremy Cline <jcline@redhat.com>
|
|
Tests require legacy get_tiling/set_tiling API's. Renaming the subtest
names to make it obvious that these are legacy-only tests.
v2: Made test name consistent (Matt)
v3: Changed test names in fastfeedback (Petri)
Suggested-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
Acked-by: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
|
|
Not skipping the affected tests causes all the rest to fail on
non-Intel drivers.
Signed-off-by: Mihail Atanassov <mihail.atanassov@arm.com>
Reviewed-by: Simon Ser <simon.ser@intel.com>
|
|
Fix test to check for addfb failure instead.
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Just realized we don't seem to have any testcase for this. Fill this
gap asap!
v2: Use igt_device_set/drop_master (Chris)
v3: Use "" for local includes (Chris)
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> (v1)
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
Some drivers and some hardware do not support KMS and so the addfb
ioctls are expected to fail. However, since they are expected to fail
with a specific errno (ENOTSUP) in the case KMS is not supported on the
fd, we can check for that and skip the tests where they are not
appropriate.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
The legacy interface passes in a single handle, and instead of providing
the pixel_format fourcc, passes in a bpp/depth combination that the
kernel translates into a fourcc. If that is an illegal combination, the
kernel should be reporting EINVAL rather than pass an unknown
framebuffer to the drivers.
As the number of possible permutations of bpp/depth (both are strictly
u32 parameters) is huge, we simply fuzz the interface for 1s.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
If we request the object to be tiled with the same tiling as it
currently has, the kernel may spot the no-op and report success.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
If we request the object to be tiled with the same tiling as it
currently has, the kernel may spot the no-op and report success.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
There's no properties on fb modeset objects, bug bugs in the
kernel when trying to use those ioctls in such an invalid way.
Cc: Dave Airlie <airlied@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
So those subtests that require tiling don't cause unrelated subtests to
be skipped.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
|
|
When moving the call to gem_set_tiling into the subtests, the one needed
by addfb25-framebuffer-vs-set-tiling was left out.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
|
|
For those tests that now pass on drivers other than i915, call
drm_open_driver_master with DRIVER_ANY.
Also do so from igt_enable_connectors.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Because determining the Intel GFX generation requires a call to
DRM_IOCTL_I915_GETPARAM, move the code that requires it to a subtest
that can be skipped on drivers other than i915.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
So they don't cause unrelated subtests to be skipped when testing
drivers other than i915.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Move tests requiring tiled BOs to the end so they don't cause unrelated
subtests to be skipped when testing drivers with only dumb buffer
support.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Because calls to gem_set_tiling will cause the subtest to be skipped on
drivers other than i915, move them to each subtest that needs them so
the other subtests aren't skipped as well.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Many tests can do their work on drivers other than i915 and even with
just dumb buffers, so call igt_create_bo_with_dimensions instead of
gem_create which will paper out the differences and call the proper
ioctls or cause the subtest to be skipped if that's not possible.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Make sure the kernel doesn't clobber the modifiers when the user didn't
pass any.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
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>
|
|
The drm core doesn't check unused fields of ADDFB2 for pre-FB_MODIFIERS
userspace, so use igt_require_fb_modifiers(). Also, the size of the
ioctl changed with the addition of the modifiers, so it is necessary to
use the LOCAL_ version of it, otherwise some data may get truncated.
v2: Improve commit message. (Thomas)
Remove one spurious change to use LOCAL_DRM_IOCTL_ADDFB2. (Thomas)
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
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>
|
|
We should always be able to create simple and tiled objects.
v2: make the whole test basic (Daniel)
add to .gitignore
Reviewed-by: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
|