Commit Graph

6984 Commits (e2504b921f12738b9b02acb8aa7ea95596bd9545)

Author SHA1 Message Date
Jordan Justen e2504b921f
include/drm/drm_fourcc.h: Update from Linux v6.0-rc7
Generated from the Linux v6.0-rc7 tag with a sha1 of
f76349cf41451c5c42a99f18a9163377e4b364ff.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
2022-09-28 17:03:04 -07:00
Eli Schwartz 474894ed17
meson: fast-fail on unsupported OSes
It's not worth even attempting to configure anything on OSes where there
is no DRM to have a userspace library for.

This failure message can be useful in e.g. the case where libdrm is an
optional wrap fallback in another project.

Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2022-09-11 01:49:42 -04:00
Simon Ser fb5c0c301a build: bump to version 2.4.113
Signed-off-by: Simon Ser <contact@emersion.fr>
2022-08-31 16:38:38 +02:00
Simon Ser e761875fc5 tests/modetest: use drmGetFormatName()
Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Marius Vlad <marius.vlad@collabora.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
2022-08-31 06:40:49 +00:00
Simon Ser baa4b8cafc xf86drm: add drmGetFormatName()
Same as drmGetFormatModifierName() but for formats.

Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Marius Vlad <marius.vlad@collabora.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
2022-08-31 06:40:49 +00:00
Matt Roper 03e0ab4d88 intel: Hook up new platforms IDs
In commit 98794e2a0d ("lib: sync i915_pciids.h with kernel") we
resynchronized the PCI header with the kernel to bring in the
definitions for several new platforms.  But before those IDs will be
recognized, we still need to hook them up in the libdrm chipset code as
well.

References: https://gitlab.freedesktop.org/drm/intel/-/issues/5416
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
2022-08-30 19:32:48 +00:00
Sui Jingfeng 33f0009de5 meson: auto-enable etnaviv on arm, arc, mips and loongarch architectures
There is a Vivante GC1000 gpu in LS2K1000 and LS7A1000.

LS7A1000 is a bridge chip made by Loongson corporation
which act as north and/or south bridge of loongson's
desktop and server level processor. It is equivalent
to RS780E or something like that. In fact, the company
use RS780E as bridge of LS3A3000 at its early stage,
but as RS780E is out of stock long long time ago, the
company have to made one by themself. More details can
be read from its user manual[1].

This bridge chip typically use with LS3A3000, LS3A4000
and LS3A5000.

LS3A3000 is 4 core 1.45gHz mips64r2 compatible cpu.
LS3A4000 is 4 core 1.8gHz mips64r5 compatible cpu.
LS3A5000 is 4 core 2.5gHz loongarch cpu, the company
acclaim that loongarch a new archtecture with its
instruction set is released[2].

LS2K1000 is a double core 1.0Ghz mips64r2 compatible SoC[3].

we need to enable it to test and developing driver on above
listed archtecture.

[1] https://loongson.github.io/LoongArch-Documentation/Loongson-7A1000-usermanual-EN.html
[2] https://loongson.github.io/LoongArch-Documentation/Loongson-3A5000-usermanual-EN.html
[3] https://wiki.debian.org/InstallingDebianOn/Lemote/Loongson2K1000

Signed-off-by: Sui Jingfeng <15330273260@189.cn>

[Eric: rebase over meson changes, add ARM & ARC architectures, and drop
"experimental" from the description]
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
2022-08-30 16:03:36 +01:00
Matt Turner d4bb19e2c4 intel: Avoid aliasing violation
../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.
2022-08-23 22:54:15 +00:00
Eric Engestrom 3ff3d59ed9 atomic: fix atomic_add_unless() fallback's return value
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>
2022-08-23 22:49:34 +00:00
Matthieu Herrb cf54ebf6cf Remove unused 3rd parameter to open(2)
The 3rd parameter is only used with the O_CREAT flag

Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
2022-08-23 22:43:38 +00:00
Eric Engestrom a64a176cfd meson: simplify some more build options by using features
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Simon Ser <contact@emersion.fr>
2022-08-23 18:52:16 +01:00
Eric Engestrom 26eb15165b meson: convert auto combos into proper features
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>
2022-08-23 18:52:16 +01:00
Eric Engestrom 4a7706b2a4 ci: drop dead script since e722ba9f67
Noticed-by: Michel Daenzer <michel@daenzer.net>
2022-08-23 17:54:58 +01:00
Eric Engestrom 502f64cb30 meson: fix value of `auto` for a bunch of drivers
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>
2022-08-22 21:06:22 +01:00
Eric Engestrom 3e3874d50d ci: bump images tags to take !255 into effect
Reviewed-by: Simon Ser <contact@emersion.fr>
2022-08-22 18:53:08 +01:00
Eric Engestrom f32db9d354 ci/freedesktop: bump python version of docutils package as 3.8 no longer exists 2022-08-22 18:50:04 +01:00
Eric Engestrom 1637d8b020 ci: fix the tested meson version
Reviewed-by: Simon Ser <contact@emersion.fr>
2022-08-22 17:41:18 +01:00
Eric Engestrom 24163f40d3 ci: remove system meson before installing the pip one
Reviewed-by: Simon Ser <contact@emersion.fr>
2022-08-22 17:40:42 +01:00
Simon Zeni 46d1e99a5d build: make tests optional
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>
2022-08-18 09:58:41 +00:00
Likun Gao 003eb2a554 tests/amdgpu: add sdma slow copy linear hang test
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>
2022-08-15 06:10:15 +00:00
Likun Gao 3c04686ae5 tests/amdgpu: add sdma corrupted header hang test
Issue corrupted header for sdma to trigger SDMA hang test.

Signed-off-by: Likun Gao <Likun.Gao@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
2022-08-15 06:10:15 +00:00
Flora Cui f1b897ec83 tests/amdgpu: add dispatch/draw test for gfx11
Signed-off-by: Flora Cui <flora.cui@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
2022-08-15 06:10:15 +00:00
Flora Cui cc3c80c6ae tests/amdgpu: refactor dispatch/draw test
Signed-off-by: Flora Cui <flora.cui@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
2022-08-15 06:10:15 +00:00
Hawking Zhang 176e6ce6f3 tests/amdgpu: skip gfx CE subtest in gfx11
CE is not available in gfx11

Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Likun Gao <Likun.Gao@amd.com>
2022-08-15 06:10:15 +00:00
Matt Roper 98794e2a0d lib: sync i915_pciids.h with kernel
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>
2022-08-03 22:48:27 +00:00
Stephan Lachnit 40fcca248b
build: set c_std to c11
Signed-off-by: Stephan Lachnit <stephanlachnit@debian.org>
2022-07-25 17:37:32 +02:00
Eric Curtin 512c8a88ca tests/util: Add simpledrm driver
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>
2022-07-22 13:25:53 +01:00
Ruijing Dong 6070e6a798 tests/amdgpu/vcn: add unified queue support in vcn4
add unified queue headers on the existing tests.

Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
2022-07-20 18:23:59 -04:00
Ruijing Dong 8be3042864 tests/amdgpu/vcn: align comments for AMDGPU_HW_IP_VCN_ENC
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>
2022-07-20 18:23:55 -04:00
James Zhu e83aaae15e tests/amdgpu: enable vcn swRing test for version 4 and later
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>
2022-07-20 18:23:45 -04:00
Alex Deucher e214a6a6e8 amdgpu: update marketing names for 22.20
Add new marketing names.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2022-07-18 17:08:21 -04:00
Simon Ser 60cf6bcef1 build: bump version to 2.4.112
Signed-off-by: Simon Ser <contact@emersion.fr>
2022-07-06 10:43:38 +02:00
Simon Ser 3ee004ef52 xf86drmMode: introduce drmModeConnectorGetPossibleCrtcs
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
2022-07-02 22:22:49 +02:00
Simon Ser 0427c1f669 tests: use drmModeGetConnectorTypeName
Drop util_lookup_connector_type_name and use
drmModeGetConnectorTypeName instead.

Signed-off-by: Simon Ser <contact@emersion.fr>
2022-07-02 20:13:29 +00:00
Simon Ser 50f8d51773 xf86drmMode: introduce drmModeGetConnectorTypeName
User-space often needs to print the name of a connector type.
When a new connector type is added, all user-space programs need
to be updated to support the new connector type.

Expose a function to get a connector type name in libdrm.

The names are taken from the kernel [1].

[1]: https://cgit.freedesktop.org/drm/drm/tree/drivers/gpu/drm/drm_connector.c?h=4fc8cb47fcfdc93e274a1291757e478df4f9c39b#n83

Signed-off-by: Simon Ser <contact@emersion.fr>
2022-07-02 20:13:29 +00:00
Saleemkhan Jamadar f7828dc180 tests/amdgpu/vcn:vcn encoder unit test
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>
2022-06-11 12:13:26 -04:00
Sathishkumar S 0b21fcb214 tests/amdgpu: fix decode test failure on VCN2.5
For VCN2.5 wrong index was chosen, fix it.

Signed-off-by: Sathishkumar S <sathishkumar.sundararaju@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
2022-06-11 12:13:03 -04:00
Simon Ser f83ad09dc0 xf86drmMode: constify drmModeAtomicReq functions
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>
2022-06-09 11:44:38 +02:00
Simon Ser 3bede5dbbc gen_table_fourcc: strip _MODIFIER suffix for INVALID
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>
2022-06-08 14:02:48 +02:00
Dave Airlie f801b07a60 build: bump version to 2.4.111
Signed-off-by: Dave Airlie <airlied@redhat.com>
2022-06-03 14:04:41 +10:00
Guchun Chen 362a93d1fb tests/amdgpu: use appropriate ring for different asics
Use compute ring in case of no gfx ring.

Signed-off-by: Guchun Chen <guchun.chen@amd.com>
2022-05-26 21:02:33 +08:00
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