Commit Graph

7093 Commits (ad750dc60898ee4d544aff3cc14d29aafa81dfa6)

Author SHA1 Message Date
Alex Deucher 3f266e57d0 amdgpu: add marketing names from 22.10
Add new marketing names

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2022-05-13 13:20:14 -04:00
Eleni Maria Stea ae6d81da20 tests/modeprint: fix argument type
Replaced the type PRId64 with PRIu64 in a printf as the argument was
unsigned to fix the related compiler warning.

Signed-off-by: Eleni Maria Stea <elene.mst@gmail.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
2022-05-09 15:54:20 +03:00
Eleni Maria Stea 4caec56fb8 modeprint, modetest, proptest: cast __u64 to uint64_t
It seems that __u64 values are defined differently across systems. In
glibc it's defined as unsigned long, in Linux kernel headers
(int-ll64.h) as unsigned long long, and on FreeBSD as uint64_t so it
matches glibc. A temporal solution is to cast all __u64 values to
uint64_t to avoid warnings on Linux, but ideally we'd like a better fix
in the future.

See also: https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/212
for discussion.

Signed-off-by: Eleni Maria Stea <elene.mst@gmail.com>
2022-05-09 15:53:56 +03:00
Eleni Maria Stea c907d4ade1 xf86drm.c: fix C99 warning
Moved declaration to the top to resolve C99 compliance warning.

Signed-off-by: Eleni Maria Stea <elene.mst@gmail.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
2022-05-09 14:56:11 +03:00
Karol Herbst 678a32b98f nouveau: add ioctl wrapper to check for dead channels
v2: explicitly set nr_push to 0 as well

Signed-off-by: Karol Herbst <kherbst@redhat.com>
2022-05-03 11:23:30 +00:00
Tejas Upadhyay d95b12e7e3 intel: Add support for RPLP
Add RPLP platform support and PCIIDs

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Tejas Upadhyay <tejaskumarx.surendrakumar.upadhyay@intel.com>
Signed-off-by: Raviteja Goud Talla <ravitejax.goud.talla@intel.com>
2022-04-21 23:04:33 +05:30
Matt Turner 62e25c8baa man: Add formatting to drmModeGetConnector reference
Signed-off-by: Matt Turner <mattst88@gmail.com>
2022-04-19 13:13:13 -07:00
Matt Turner 37d50e1cbf man: Fix some typos
Signed-off-by: Matt Turner <mattst88@gmail.com>
2022-04-19 13:10:50 -07:00
Daniel Stone 2b997bb4bb libkms: Remove libkms completely
libkms was a very early attempt at a KMS management library, that only
got as far as handling requests to create buffers. It has since been
superseded by GBM in doing this, which everyone uses, unlike libkms
which no-one uses.

Remove it from the tree to avoid any confusion.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2022-04-15 22:40:29 +00:00
Flora Cui 85393adb12 tests/amdgpu: add dispatch test for gfx10
Signed-off-by: Flora Cui <flora.cui@amd.com>
2022-03-30 16:39:02 +08:00
Flora Cui f2314a4871 tests/amdgpu: add draw test for gfx10
Signed-off-by: Flora Cui <flora.cui@amd.com>
2022-03-30 16:39:02 +08:00
Lu Jiacheng 7c28f52830 tests/amdgpu: Add test suite CP DMA 2022-03-09 15:05:04 +00:00
Alex Deucher 2e91f124a3 amdgpu: add marketing names from 21.50
Add new marketing names

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2022-03-02 11:51:08 -05:00
Alex Deucher dce623f525 test/amdgpu: only disable deadlock tests on asics without GPU reset
Switch the logic to only disable the tests for asics which don't
have GPU reset support.  This way we don't need to update it
every time we add a new asic which does support it.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2022-03-02 16:10:41 +00:00
Andrey Grodzovsky b47c057d69 tests/amdgpu/hotunplu: Enable hotunplug tests.
I tested with latest amd-staging-drm-next and after minor
fix for me all the testys pass. I bumped libdrm minor version
for this.

Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
2022-03-01 12:57:39 -05:00
Thierry Reding 8376362245 tests: tegra: Add VIC flip test
This test will attempt to use the VIC to blit one surface to another
and perform a vertical flip.

Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-02-23 16:06:49 +01:00
Thierry Reding 8c4887b4e1 tests: tegra: Add VIC blit test
This test will attempt to use the VIC to blit from one surface to
another.

Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-02-23 16:06:49 +01:00
Thierry Reding e9ddc93d8e tests: tegra: Add VIC clear test
This test will attempt to use VIC to clear a surface.

Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-02-23 16:06:49 +01:00
Thierry Reding 26b872ebad tests: tegra: Add VIC 4.2 support
The Video Image Composer (VIC) 4.2 can be found on NVIDIA Tegra194 SoCs.
It uses a different class (C5B6) that is slightly incompatible with the
class found on earlier generations, although it is backwards compatible
with the class implemented on Tegra186 (B1B6).

Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-02-23 16:06:49 +01:00
Thierry Reding 5217c5c747 tests: tegra: Add VIC 4.1 support
The Video Image Composer (VIC) 4.1 can be found on NVIDIA Tegra186 SoCs.
It uses a different class (B1B6) that is slightly incompatible with the
class found on earlier generations.

Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-02-23 16:06:49 +01:00
Thierry Reding fa5dc0c925 tests: tegra: Add VIC 4.0 support
The Video Image Composer (VIC) 4.0 can be found on NVIDIA Tegra210 SoCs.
It uses a different class (B0B6) that is slightly incompatible with the
class found on earlier generations.

Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-02-23 16:06:49 +01:00
Thierry Reding 8215b29832 tests: tegra: Add VIC 3.0 support
The Video Image Composer (VIC) 3.0 can be found on NVIDIA Tegra124 SoCs.

Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-02-23 15:40:17 +01:00
Thierry Reding 2ddf703bc3 tests: tegra: Add VIC support
Implement a small abstraction interface to allow different versions of
VIC to be used transparently. An implementation will be chosen based on
the VIC version number reported by the DRM_TEGRA_IOCTL_OPEN_CHANNEL
IOCTL.

Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-02-23 15:40:15 +01:00
Thierry Reding b707a71654 tests: tegra: Add syncpoint timeout test
This test can be used to purposefully trigger a job timeout.

Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-02-23 15:40:12 +01:00
Thierry Reding 637d6a46d3 tests: tegra: Add syncpt-wait test
This is a very simple sanity test to check whether or not a syncpt can
be incremented by a host1x client. This uses gr2d on Tegra20 through
Tegra114 and VIC on Tegra124 and later.

Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-02-23 15:40:11 +01:00
Thierry Reding 8f8e54d688 tests: tegra: Add gr2d-fill test
This test uses the IOCTLs for job submission and fences to fill a sub-
region of the screen to a specific color using gr2d.

Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-02-23 15:40:09 +01:00
Thierry Reding 37fbc4c892 tests: tegra: Add helper library for tests
This library provides helpers for common functionality needed by test
programs.

Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-02-23 15:40:06 +01:00
Thierry Reding 55bc688f11 tegra: Add syncpoint APIs
These new functions can be used to allocate and free syncpoints, as well
as wait for a syncpoint threshold to be reached. Jobs can also be waited
on if a syncpoint was attached to them.

Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-02-23 15:40:04 +01:00
Thierry Reding 4c18828e16 tegra: Add job and push buffer APIs
These new functions can be used to create a job on a given channel, add
commands to the job using its push buffer and submit the job.

Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-02-23 15:40:02 +01:00
Thierry Reding b77af8ece6 tegra: Add channel APIs
These new functions can be used to open a channel to a given engine, map
and unmap buffer objects to that channel, and close the channel.

Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-02-23 15:40:01 +01:00
Thierry Reding dece59037d tegra: Include private.h in list of source files
This makes sure that the proper dependencies are created and that the
file is distributed.

Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-02-23 15:39:59 +01:00
Thierry Reding 5f920e61c8 tegra: Update for new UABI
This new UABI is a more modern version that works better with both old
and recent chips.

Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-02-23 15:39:57 +01:00
Thierry Reding 37e9695d51 tegra: Install tegra-openclose test
Allow this simple test to be installed so that it can easily be run on a
target device.

Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-02-23 15:39:55 +01:00
Thierry Reding 69fa0dd940 tegra: Make API more consistent
Most functions in libdrm_tegra take as first parameter the object that
they operate on. Make the device and buffer object creation functions
follow the same scheme.

Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-02-23 15:39:53 +01:00
Thierry Reding abe27b1757 tegra: Add PRIME support helpers
These helpers facilitate exporting and importing buffer objects to and
from PRIME file descriptors.

Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-02-23 15:39:15 +01:00
Thierry Reding f7a77f6993 tegra: Add flink helpers
Add helpers to export and import buffer objects via flink names.

Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-02-23 15:39:09 +01:00
Thierry Reding 1842707183 tegra: Fix mmap() of GEM buffer objects
Store 64-bit offset values and use libdrm's built-in drm_mmap() function
instead of mmap() to ensure the full 64-bit offset is used.

Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-02-23 15:39:06 +01:00
Thierry Reding e44e781603 tegra: Extract common buffer object allocation code
All of the buffer object allocation functions use the same boilerplate
code. Move that code into a separate function that can be reused.

Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-02-23 15:38:21 +01:00
Thierry Reding bec2a28e98 tegra: Remove unused IOCTL implementations
The DRM_TEGRA_GEM_{GET,SET}_FLAGS and DRM_TEGRA_GEM_{GET,SET}_TILING
IOCTLs were badly designed and have since been obsoleted by framebuffer
modifiers. Remove these implementations to make it clear their usage is
discouraged.

Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-02-23 15:38:18 +01:00
Thierry Reding bca42ae004 tegra: Indent according to .editorconfig
Reindent the sources according to the settings found in the newly added
.editorconfig.

Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-02-23 14:41:16 +01:00
Sathishkumar S d13ab997f5 tests/amdgpu: enable vcn test based on ip query
family_id checks can be removed and instead use ip major/minor version

Signed-off-by: Sathishkumar S <sathishkumar.sundararaju@amd.com>
Reviewed-by: Veerabadhran Gopalakrishnan <veerabadhran.gopalakrishnan@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
2022-02-19 18:10:01 -05:00
Sathishkumar S 1d92f32741 tests/amdgpu: enable jpeg test based on ip query
enable jpeg test if ip query is successful and avoid family_id
based checks, instead use ip major/minor version

Signed-off-by: Sathishkumar S <sathishkumar.sundararaju@amd.com>
Reviewed-by: Veerabadhran Gopalakrishnan <veerabadhran.gopalakrishnan@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
2022-02-19 18:09:53 -05:00
Samuel Pitoiset 56f81e6776 build: bump version to 2.4.110
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2022-02-16 11:00:13 +01:00
Daniel Stone 79fa377c8b drm/atomic: Stable sort for atomic request de-duplication
Atomic request property lists are defined to be de-duplicated: an atomic
request can contain multiple sets for the same property on the same
object, and only the last one will take effect.

drmModeAtomicCommit already sorts the property set by object and
property ID. We were relying on qsort to also sort by cursor - i.e.
pointer value - when object and property ID are equal, however whilst
glibc does this, the sort order is explicitly undefined when the
comparator is equal. Using the pointer is also not stable on all
implementations.

Add an explicit 'cursor' member to each property set which is used as
the tie-breaker comparator.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Fixes: #46
2022-02-04 06:16:28 +00:00
Dylan Baker 7aede93ef9 meson: use summary() instead of message
It's cleaner, it's nicer looking, and it's a nice builtin.

Signed-off-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
2022-01-20 10:20:47 -08:00
Dylan Baker cc16120543 meson: use the modern interface for pkg.generate
This produces no differences in the generated output. I've had to
manually add `requires : 'libdrm'` to libdrm_intel, otherwise libdrm
ends up in `Requires.private` instead of `Requires`.

Signed-off-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
2022-01-20 10:20:40 -08:00
Dylan Baker 38c568775e meson: use cc.has_function_attribute instead of open coding
It's less code, and also allows meson to short circuit for compilers is
knows don't support this.

Signed-off-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
2022-01-20 10:08:23 -08:00
Dylan Baker f9539d4128 meson: use cc.check_header instead of open coding
Signed-off-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
2022-01-20 10:08:23 -08:00
Dylan Baker 52b96a6fbf meson: use more standard formatting for better readability
Signed-off-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
2022-01-20 10:08:23 -08:00
Dylan Baker eaf234c148 meson: switch to cc.get_supported_arguments
This is generally faster, as meson is able to parallelize the checks for
us.

This also removes the workaround for checking gcc/clang -Wno-*
arguments, which meson now handles internally so we don't need to handle
it ourselves.

Signed-off-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
2022-01-20 10:07:55 -08:00