../intel/test_decode.c: In function ‘compare_batch’:
../intel/test_decode.c:109:39: error: dereferencing type-punned pointer might break strict-aliasing rules [-Werror=strict-aliasing]
109 | out = open_memstream((char **)&ptr, &size);
| ^~~~
cc1: some warnings being treated as errors
The fix is simple: just declare `ptr` as a `char *` to begin with.
According to the kernel documentation:
Returns non-zero if @v was not @u, and zero otherwise.
Fixes: 63fc571863 ("atomic: add atomic_add_unless()")
Closes: https://gitlab.freedesktop.org/mesa/drm/issues/17
Signed-off-by: David Shao <davshao@gmail.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
[Eric: fix its callers to maintain current behaviour]
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Allows users to easily enable everything (eg. packagers), or select just
the drivers they want with something like:
-D auto-features=disabled -D amdgpu=enabled
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Simon Ser <contact@emersion.fr>
You can't have an error if your driver is requested by you're missing
a dep, but then happily build that driver without the dep in `auto`.
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Building the project as a meson subproject, meson inherits the warning level
from the parent project. Making the tests optional bypasses that issue and
reduces build time.
Signed-off-by: Simon Zeni <simon@bl4ckb0ne.ca>
Reviewed-by: Simon Ser <contact@emersion.fr>
Issue slow copy linear for sdma to trigger SDMA hang test.
Signed-off-by: Likun Gao <Likun.Gao@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
This synchronizes with kernel commit 7835303982d1 ("drm/i915/mtl: Add
MeteorLake PCI IDs") to bring in the missing PCI IDs for several recent
platforms.
These days adding PCI IDs to libdrm doesn't really matter for real-world
system usage. However there are still a few driver testing situations
where they're needed (such as the IGT dma-buf tests that still rely on
libdrm's bufmgr code). At some point we should probably break that
final IGT dependency on libdrm so that these PCI ID resyncs won't be
necessary anymore, but that hasn't happened yet.
References: https://gitlab.freedesktop.org/drm/intel/-/issues/5416
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Add an entry for the "simpledrm" driver, so that the test utilities
work with the simpledrm driver without passing the -M argument.
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Eric Curtin <ecurtin@redhat.com>
From VCN4, AMDGPU_HW_IP_VCN_ENC is re-used to support both encoding
and decoding jobs.
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Enable vcn decode software ring test for version 4 and later.
Signed-off-by: James Zhu <James.Zhu@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Nowadays, users don't really care about encoders except for retrieving
the list of CRTCs compatible with a connector. Introduce a new function
so that users no longer need to deal with encoders.
This is a re-do of [1], but with a slightly different API.
Signed-off-by: Simon Ser <contact@emersion.fr>
[1]: https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/102
Add support for vcn encoder unit test
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Signed-off-by: Saleemkhan Jamadar <saleemkhan.jamadar@amd.com>
Signed-off-by: Satyajit Sahu <satyajit.sahu@amd.com>
This acts as an additional ABI guarantee, and improves
documentation for users.
Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.com>
This is the only modifier printed with a "_MODIFIER" suffix. It
looks inconsistent when callers already print this word (e.g.
"modifier: INVALID_MODIFIER").
Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Marius Vlad <marius.vlad@collabora.com>
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>
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>
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>
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>
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>
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>
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>