Age | Commit message (Collapse) | Author |
|
Y410 is packed with compressed a channel and only 32 bpp, like
10 bits RGB formats. Y416 is a packed 16 bits per component format.
Changes since v1:
- Rebase on top of upstream YUV changes.
Changes since v2:
- Discard alpha channel, not used upstream.
Changes since v3:
- Handle the XVYU formats and Y41x formats correctly.
Changes since v4:
- Fix YUV conversion routines. (Ville)
- Use memset64 to clear initial fb. (Ville)
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
[mlankhorst: Add missing ULL (Ville)
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Those formats are packed like YUYV, but only 16 bits per component.
Changes since v1:
- Rebase on top of upstream YUV changes.
Changes since v2:
- Use drm_fourcc.h from upstream.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
The chroma address needs to be 256 byte aligned on amdgpu and the
easiest way to do so is to align the minimum stride for the luma.
v2: added this patch
Cc: Leo Li <sunpeng.li@amd.com>
Cc: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
|
|
A black FB on amdgpu returns a CRC of (0, 0, 0), which IGT considers
suspicious. All our CRC values are also 16-bit so a value of 0xffffffff
can't be obtained.
Drop the suspicious CRC checks on amdgpu by checking the device in
crc_sanity_checks. We need the drm_fd for this so pass in pipe_crc
to the function to get it. It makes more sense to me to do it this
way than to duplicate code and the explanation on both calls to
crc_sanity_checks.
v2: rebase
Cc: Leo Li <sunpeng.li@amd.com>
Cc: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
|
|
These helpers will be used to address amdgpu specific quirks and
features. They're implemented like the i915 and VC4 helpers.
In order for the string comparison to pick up "amdgpu" the buffer size
had to be expanded for __is_device. I've gone ahead and made it 12 bytes
to cover everything that's there right now.
v2: rebase
Cc: Leo Li <sunpeng.li@amd.com>
Cc: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
|
|
Avoid embedding the DRM_IOCTL() macro into the error message as it is
unreadable, and instead always wrap the ioctl with a self-descriptive
helper.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
|
|
Read the RAPL power metrics courtesy of perf. Or your local HW
equivalent?
v2: uselocale()
v3: Use gpu_power_s(), gpu_power_J(), gpu_power_W() to try and make the
scale factors self-consistent.
v4: Use igt_sysfs
v5: s/tN/sampleN/
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>
|
|
Do not use it on older gens.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109612
Cc: Tony Ye <tony.ye@intel.com>
Reviewed-by: Tony Ye <tony.ye@intel.com>
|
|
Add CML IDS, an additional ICL ID and EHL.
Align with kernel commits:
a7b4deeb02b9 ("drm/i915/cml: Add CML PCI IDS")
9a751b999d17 ("drm/i915: Add new ICL PCI ID")
29f3863d33d1 ("drm/i915/ehl: Add EHL platform info and PCI IDs")
This is in sync with kernel header as of
b024ab9b2d3a ("drm/i915/bios: iterate over child devices to initialize ddi_port_info")
v2: Copy header from kernel (Jose)
- Change commit message (Lucas)
v3: Add corresponding kernel commit ids (Antonio)
v4: Add EHL (Lucas)
Cc: Antonio Argenziano <antonio.argenziano@intel.com>
Signed-off-by: Anusha Srivatsa <anusha.srivatsa@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
|
|
A linear mapping setup for Y, Yf tiled and CCS modifiers. Instead of
checking against each CCS modifier, let's make use of this wrapper.
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.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>
|
|
Now that we've extracted card index, we no longer have the need to
iterate over device nodes.
v2: Drop ret.
Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Similar to sysfs_path - more explicit more better.
Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
It's not operating on FD, and we've provided a nice reimplementation
that does. Let's use it instead.
Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
And use it! But let's start small.
Rather than going with "and by the way, here's the card index" from
igt_sysfs_path, we're making things more explicit.
v2: Drop idx comment. (Chris)
Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
plane alpha and blend would affect other tests if left
in unexpected states
v2 (ville syrjälä): use "Pre-multiplied" as default for
IGT_PLANE_PIXEL_BLEND_MODE.
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Include whether the scheduler is using HW semaphore assistance in our
pretty debug strings, and make the caps known for requires.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Antonio Argenziano <antonio.argenziano@intel.com>
|
|
Steal if from kms_plane.c and put it into igt_fb.h
Also tiny bikeshed to remove the space, so it fits more tidily into
the usual name1=value1, name2=value2 style printing.
v2: Rebase
v3: It better compile :-/
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> (v1)
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
|
|
In order to execute negative tests that validate fb creation, tests need to
be able to call the addfb ioctl themselves so that the arguments can be
manipulated. Add a library function to provide an initialized fb without
registering the fb with the kernel.
Cc: Clinton Taylor <clinton.a.taylor@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Rename the igt_fb.tiling to igt_fb.modifier to better reflect
what information it carries. Now it's clear whether we're talking
about a modifier or a i915 tiling thing.
Cc: Clinton Taylor <clinton.a.taylor@intel.com>
>From DK:
Rebased on vc4 changes
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
|
|
Plug in rendercopy to the cairo surface stuff so that we can
generate compressed buffers with cairo.
v2: s/modifier_has_ccs/is_ccs_modifier/
v3: From DK
Set buf.bpp when initializing and rebase.
v4: From DK
Fix Yf-tiled BGR formats
Cc: Clinton Taylor <clinton.a.taylor@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Reviewed-by: Clint Taylor <Clinton.A.Taylor@intel.com>
|
|
Set up the surface state accordingly to support Yf/Ys tiling.
>From DK:
Rebase.
Move support to gen-9 surface state
Cc: Lukasz Kalamarz <lukasz.kalamarz@intel.com>
Cc: Katarzyna Dec <katarzyna.dec@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com>
|
|
Create a gen9 specific struct so that the gen-9+ Yf/Ys tiling bits can be
added there.
Suggested-by: Katarzyna Dec <katarzyna.dec@intel.com>
Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com>
|
|
No one is using anything but the "auto" crc source, so the enum
listing other options is quite pointless. Let's switch to just
using the string instead of the enum. That way any hypothetical
test that wants to use a more specific crc source can just
pass in the proper string.
v2: Assert the string isn't NULL (Chris)
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Add some missing documentation.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Add the missing docs for the 'drm_fd' parameter.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Deal with frame counter wraparound correcrtly.
v2: Make the comparison functions available for everyone (Chris)
Add some docs (gtk-doc seems obtuse so not 100% warning free)
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> #v1
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Read sizeof - 1 to buffers so null-termination stays in bounds.
v2: Also clear the buffers before reusing (Chris).
Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
YVU420 and YVU422 will otherwise use offsets for P010 and pals.
Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> #irc
|
|
Read sizeof - 1 to buf so it stays null-terminated.
Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Free test_line in all paths out of the function.
v2: Avoid freeing too soon (Chris)
Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Add a missing closedir call.
Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
An igt_plane_t is defined per igt_pipe_t. It is treated as its
own independent resource but DRM planes can be exposed to being used on
a number of possible CRTCs - making it a shared resource.
In IGT planes with multiple possible CRTCs are added to the plane list
for each pipe that the plane supports. The internal state remains
independent in IGT so when the same plane is modified for multiple
pipes in a single commit the last pipe to modify it is the one whose
state gets fully applied.
This situation happens fairly often in practice - resetting the display
at the start of the test before a commit will reset the CRTC ID and FB
ID for each plane.
For an example, consider the
igt@kms_plane_alpha_blend@pipe-a-constant-alpha-max test.
This test will fail for any overlay plane exposed for multiple CRTCs.
The test tries to set a framebuffer for pipe A but has all the other
pipes reset the plane state in the same commit. If there are multiple
pipes on the hardware then the last pipe will be the one to set all the
plane properties. The driver will receive a commit with no overlay
plane enabled since the last pipe set CRTC ID and FB ID to 0, disabling
the plane. The reference CRC capture will be incorrect since not all
the planes have been enabled and the subsequent CRC captures will
not match, failing the test.
The simplest (but hacky) fix to this problem is to only set the
properties for the plane for the pipe that last had it bound.
This patch introduces a global plane list on igt_display_t that keeps
track of the pipe that pipe that last called igt_plane_set_fb. The
properties for the plane will only be applied from that single pipe
when commiting the state to DRM.
No behavioral changes should be introduced by this patch for hardware
whose planes are only ever exposed one CRTC.
It would likely be best to eventually modify the igt_pipe_t plane list
to be a list of pointers to planes instead (igt_plane_t**)
instead of being the actual plane objects, but that can come later.
Many areas of the code like to make use of the backpointer to the pipe
on the plane which makes refactoring the code in that manner a little
trickier.
v2: Add igt_plane_set_fb, use igt_plane_t for global plane list (Daniel)
v3: Leave TODO for filling in all state/props on global planes
Cc: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
|
|
As we already have the previous portion of the mmap mlocked, we only
need to mlock() the fresh portion for testing available memory.
v2: Fixup the uint64_t pointer arithmetric and only use a single mmap to
avoid subsequent mlock fail (for reasons unknown, but bet on mm/).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Caz Yokoyama <Caz.Yokoyama@intel.com>
Reviewed-by: Caz Yokoyama <Caz.Yokoyama@intel.com>
|
|
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>
|
|
With recent changes to the igt_fb code, VC4 support is now integrated
in common helpers. As a result, VC4 helpers have to be built as part
of the library.
This is already the case with meson, but VC4 support was removed from
autotools. Bring it back unconditionally to match meson behaviour.
This fixes a build error with autotools.
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
|
|
This introduces the checkerboard chamelium checking type and hooks the
call to the associated igt_frame matching helper in the frame match
chamelium helper.
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Maxime Ripard <maxime.ripard@bootlin.com>
|
|
This introduces a new frame comparison method that was designed for
patterns that follow a checkerboard style. These patterns are made of
consecutive rectangular shapes with alternating solid colors. They are
currently used for some Chamelium-based tests.
The method is particularly adapted for cases where the edges of the
shapes might be blurred (e.g. due to scaling), which makes it impossible
to use pixel-perfect or CRC-based comparisons to decide whether the
captured frame matches the reference.
Overall, this test will first detect the edges of the pattern and later
exclude them from comparison. Colors are compared between the reference
and capture with a low threshold for error. A percentage of the faulty
pixels is calculated and the captured frame is considered invalid if
more than one percent of the pixels are erroneous.
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Maxime Ripard <maxime.ripard@bootlin.com>
|
|
In prevision of adding support for another type of frame matching,
rename chamelium_assert_analog_frame_match_or_dump to drop the
analog part and feed it the check type. This way, the bulk of the
helper can apply to other frame matching types.
This requires moving the chamelium_check enum from the test to the
common chamelium header.
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Maxime Ripard <maxime.ripard@bootlin.com>
|
|
The frame dump logic is the same for all comparison helpers, so split
it to a dedicated function and adapt helpers using it to avoid
duplicating operations.
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Maxime Ripard <maxime.ripard@bootlin.com>
|
|
This fixes a bunch of occurrences of memory not being properly
liberated after its use in helpers revolving around frame/CRC
comparison.
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Maxime Ripard <maxime.ripard@bootlin.com>
|
|
With helpers to count and iterate among planes of a given type from the
pipe in place, we can use them with the current pipe for the output to
make it possible for tests to use them (the pipe struct is not currently
easily exposed to tests and exposing it adds unnecessary complexity).
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Maxime Ripard <maxime.ripard@bootlin.com>
|
|
This introduces helpers that allow counting how many planes of a given
type are present from a pipe and getting the n-th plane of a given type.
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Maxime Ripard <maxime.ripard@bootlin.com>
|
|
This pipes-in support for the VC4 modifiers that we have conversion
helpers for. A new temporary linear framebuffer is introduced, that
is either freed later or copied to the destination framebuffer
pointer.
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Reviewed-by: Maxime Ripard <maxime.ripard@bootlin.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
|
|
The modifier is part of how a frame is represented, so add it as an
extra argument so that it can be specified when converting framebuffers.
For now, only a linear modifier is supported.
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Reviewed-by: Maxime Ripard <maxime.ripard@bootlin.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
|
|
In order to test buffers with SAND tiling, it is useful to convert
linear buffers to SAND tiling mode.
Introduce helpers to assist in that direction, one that calculates the
memory offset in the SAND-tiled buffer for a given pixel position and
one that makes use of the latter for framebuffer conversion.
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Acked-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Maxime Ripard <maxime.ripard@bootlin.com>
|
|
In order to integrate testing of T-tiled buffers, the easiest path is to
generate patterns (with the already-existing functions) in linear
buffers and convert them to T-tiled subsequently.
Add helpers to do that conversion, with a first helper that returns the
memory offset for a given position in a T-tiled buffer and a second
helper that uses it for converting between framebuffers.
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Acked-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Maxime Ripard <maxime.ripard@bootlin.com>
|
|
Introduce a helper to allocate and fill-in a list of available DRM
formats, which is useful for picking one at random in tests.
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Maxime Ripard <maxime.ripard@bootlin.com>
|
|
The format bpp for a given plane is stored in the static format_desc
structure and is not accessible to tests, which is inconvenient to
get the minimum stride for a format when testing various strides.
Add a simple helper to expose the information.
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Maxime Ripard <maxime.ripard@bootlin.com>
|