Age | Commit message (Collapse) | Author |
|
For the purposes of testing different EDID features, we need to generate more
and more complex EDID blobs (e.g. with audio support). However currently IGT
uses a macro-based system to generate EDIDs. This doesn't scale well and is
pretty inflexible.
This commit introduces a new little library to generate EDIDs. For now it can't
do more than the old macro. Future commits will extend the API.
The structures are mostly based on the Linux kernel code (drm_edid.h). Setters
have been added for convenience.
Signed-off-by: Simon Ser <simon.ser@intel.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
|
|
Remember to free the bufmgr and batch after the convert surface is
destroyed. We'll do that by sucking the relevant code into
free_linear_mapping(), and for the sake of symmetry we'll move
the setup code into setup_linear_mapping().
Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
|
|
The blitter stride is limited to <32k. Fall back to gtt mmap or
rendercopy if we're about to exceed that.
Not quite sure why we're not just using gtt mmap for Y tiling
always. But let's keep it like that for now.
v2: Use rendercopy as the fallback for Yf
v3: Deal with gen4+ tiled stride correctly (Chris)
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
1<<31 (same as 2<<30) is undefined behaviour in C. When compiling with
GCC and UBSan, it gives this error:
../tools/intel_reg_decode.c: In function ‘ivb_debug_port’:
../tools/intel_reg_decode.c:398:3: error: case label does not reduce to an integer constant
case PORT_DBG_DRRS_HW_STATE_HIGH:
^~~~
This happens because 1<<31 isn't representable as a signed int. Instead,
use an unsigned int.
Signed-off-by: Simon Ser <simon.ser@intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
|
|
When fbcon is enabled, PSR will be active between cursor blinks so
what it should really use to test PSR is psr_wait_entry(), so a new
feature callback was added.
But the fbcon cursor blinks at 5hz what give us 200ms between each
screen update what make psr_wait_update() prone to fail the test
because it timed out before a blink could happen, so here adding and
using psr_long_wait_update() that have a longer timeout.
v3:
- 3 previous patches squashed in this one (Maarten)
- Back to !feature->wait_until_enabled() to test feature state when
all CRTCS are disabled(Dhinakaran)
Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Dhinkaran Pandiyan <dhinakaran.pandiyan@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
|
|
If cursor blinking is disabled no screen updates will happen and
fbcon_fbt subtests will fail, so lets enable cursor blink while
running this test and restore to the previous value when exiting it.
v4:
- renaming restore fd (Dhinakaran)
- saving previous value as char (Dhinakaran)
- skipping test if not able to open cursor blink file (Dhinakaran)
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
|
|
Since igt_assert family of functions logs last errno we get a lot of
those: "Last errno: 25, Inappropriate ioctl for device"
isatty() seems to be the biggest offender in that area, so this patch
should limit amount of confusing messages significantly.
Cc: Martin Peres <martin.peres@linux.intel.com>
Cc: Petri Latvala <petri.latvala@intel.com>
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
|
|
The kmstest_dumb_create API isn't suitable for creating multi-planar
buffers since it tries to calculate the size based on the first plane's
pitch only.
AMDGPU requires that the luma pitch be aligned to 256 for YUV buffers
which results in crashes on kms_plane@pixel-format-pipe-*-planes tests
when using kmstest_dumb_create since the buffer returned is smaller than
needed (16384 size returned, 24576 size required).
Create and map the buffer with the correct size by using the AMD helpers
introduced by this patch: igt_amd_create_bo and igt_amd_mmap_bo.
Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Leo Li <sunpeng.li@amd.com>
|
|
Petri pointed out that the maximum allowed number of files per process
is nr_open, not the system cap of file-max.
Suggested-by: Petri Latvala <petri.latvala@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110351
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Petri Latvala <petri.latvala@intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
|
|
Share the implementation to tweak the maximum number of open files.
The version in tests/i915/gem_exec_reuse.c was a little bit different,
but I don't think it needs to be because it would still return a
failure if any of the calls to setrlimit() fail. So I'm using the other
one.
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
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>
|
|
__for_each_engine_class_instance(fd, e) doesn't need and doesn't
use the fd argument. Remove it.
Signed-off-by: Andi Shyti <andi.shyti@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
|
|
First, we set errno to 0 before doing select() to avoid random pollution
of the assert message with things like:
"Last errno: 25, Inappropriate ioctl for device"
Second, we log explicitly if we exceeded the timeout (ret == 0).
Third, if we fail the select() we log that with some explanation.
Cc: Petri Latvala <petri.latvala@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
|
|
Sprinkle some asserts into rendercopy to make sure we don't try
to exceed the render engine surface size/stride limitations.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Just like we try to sanitize all properties in igt_plane_reset, we
should do the same for pipe properties. Loading a wrong lut could
affect passing and failing tests, so we need to be careful and set
sane defaults for everything.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
ICL has some many planes per pipe that it is causing this test to
skip due bandwidth limitation when combined with 4K displays.
The objective of this test is test the visibility of the planes when
switching between high and low resolution, more information in the
patch that added this test 12e34d8c909a ("tests/kms_plane_lowres:
Plane visibility after atomic modesets").
So it was setting all the planes the tested pipe in the bottom left
of the display using the height of high resolution, checking the
visibility and then switching to the low resolution mode and checking
again the visibility and now it is expected that all planes would be
invisible.
So to overcome ICL bandwidth issues, here it is testing each plane
individually.
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Mika Kahola <mika.kahola@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
|
|
Three test were duplicating this 1024x768 mode so lets move it to lib
and share it.
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@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>
|
|
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>
|