Timo Aaltonen pushed to branch debian-unstable at X Strike Force / lib / libdrm


Commits:
2c1d39ef by Mario Limonciello at 2025-10-15T09:20:59-05:00
amdgpu: Read model name from /proc/cpuinfo for APUs

The correct marketing name is encoded in the model name field
that is read from the hardware on an APU.  Try to read from /proc/cpuinfo
when an APU is found to identify such hardware.

Signed-off-by: Mario Limonciello <[email protected]>

- - - - -
7518cc4f by Jesse.Zhang at 2025-10-22T08:59:55+08:00
amdgpu: Add parameter validation to amdgpu_bo functions to fix SIGSEGV

This commit adds essential parameter validation to several key
functions in amdgpu_bo.c to prevent null pointer dereferences
that were causing segmentation faults and improve overall code
robustness.

The changes address the following crash scenario:
Received signal SIGSEGV.
Stack trace:
 #0 [fatal_sig_handler+0x17b]
 #1 [__sigaction+0x50]
 #2 [amdgpu_bo_alloc+0x37]
 #3 [__igt_unique____real_main461+0x7d5]
 #4 [main+0x2d]
 #5 [__libc_init_first+0x90]
 #6 [__libc_start_main+0x80]
 #7 [_start+0x25]

Changes made:

1. amdgpu_bo_alloc():
   - Validate alloc_buffer and buf_handle parameters
   - Return -EINVAL if either is NULL
   - Prevents null pointer dereference in memset and subsequent operations

2. amdgpu_bo_set_metadata():
   - Validate info parameter
   - Return -EINVAL if info is NULL
   - Prevents accessing invalid metadata structure

3. amdgpu_bo_query_info():
   - Validate info parameter in addition to existing bo->handle check
   - Return -EINVAL if info is NULL
   - Prevents writing to invalid info pointer

4. amdgpu_bo_list_create():
   - Validate resources parameter
   - Return -EINVAL if resources is NULL when number_of_resources > 0
   - Prevents invalid memory access during resource array processing

These changes ensure proper error handling when callers pass invalid
null pointers, preventing potential segmentation faults and making
the API more robust against programming errors. The validation occurs
early in each function to minimize performance impact.

Reviewed-by: Marek Olšák <[email protected]>
Signed-off-by: Jesse Zhang <[email protected]>

- - - - -
90656fc8 by Mario Limonciello (AMD) at 2025-10-22T03:08:52+00:00
amdgpu: Slice and dice the string for APUs

The string will generally have a CPU and GPU component, so if both
are found split it up.  Make sure that it starts with AMD to be
consistent.

Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Mario Limonciello (AMD) <[email protected]>

- - - - -
871e326a by Mario Limonciello at 2025-10-22T03:08:52+00:00
amdgpu: Only read /proc/cpuinfo as a fallback

Some older Vega APUs don't provide a very useful string. If we have
a string in amdgpu.ids use that, but fallback to /proc/cpuinfo.

Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Mario Limonciello <[email protected]>

- - - - -
aaf8a893 by Christian König at 2025-10-27T07:32:56+00:00
test/amdgpu: remove amdgpu unit tests

Those haven't been updated in the last two years and have been replaced by
IGT test cases: https://gitlab.freedesktop.org/drm/igt-gpu-tools

Signed-off-by: Christian König <[email protected]>

- - - - -
7816984a by Marek Olšák at 2025-11-01T22:14:40-04:00
Revert ABI breakage "drm/amdgpu: Add user queue HQD count to hw_ip info"

This reverts commit e4bd1ba753641672fe4f108142b94fa2a1a7220c.

Such a change of ABI is illegal and causes crashes. See:
https://gitlab.freedesktop.org/mesa/libdrm/-/issues/121#note_3172362

- - - - -
679c4749 by Marek Olšák at 2025-11-01T22:30:31-04:00
Bump version to 2.4.128

- - - - -
39680280 by Samuel Pitoiset at 2025-11-03T09:43:51+01:00
amdgpu: update marketing names

https://www.amd.com/en/products/graphics/desktops/radeon/9000-series/amd-radeon-rx-9060xt.html

Closes: https://gitlab.freedesktop.org/mesa/libdrm/-/issues/120
Signed-off-by: Samuel Pitoiset <[email protected]>

- - - - -
35a21916 by Alex Deucher at 2025-11-10T14:37:06-05:00
amdgpu: update marketing names

https://www.amd.com/en/products/graphics/desktops/radeon/7000-series/amd-radeon-rx-7700.html
https://www.amd.com/en/products/graphics/desktops/radeon/9000-series/amd-radeon-rx-9060.html
https://www.amd.com/en/products/accelerators/instinct/mi350/mi350x.html
https://www.amd.com/en/products/accelerators/instinct/mi350/mi355x.html

Signed-off-by: Alex Deucher <[email protected]>

- - - - -
31e68ea8 by Simon Ser at 2025-11-16T20:45:03+01:00
Sync headers with drm-next

Synchronize drm.h, drm_mode.h and drm_fourcc.h to drm-next.

Generated using make headers_install
Generated from drm-next branch commit 2a084f4ad727244768b919455aa9dc1c04630487

Signed-off-by: Simon Ser <[email protected]>

- - - - -
a8e5e10a by Simon Ser at 2025-11-17T16:17:12+01:00
build: bump version to 2.4.128

Signed-off-by: Simon Ser <[email protected]>

- - - - -
540fd473 by Timo Aaltonen at 2025-11-29T23:29:35+02:00
Merge branch 'upstream-unstable' into debian-unstable

- - - - -
2d45bd10 by Timo Aaltonen at 2025-11-29T23:30:01+02:00
version bump

- - - - -
51678775 by Timo Aaltonen at 2025-11-29T23:33:59+02:00
patches: Refreshed.

- - - - -
baf23e77 by Timo Aaltonen at 2025-11-29T23:35:29+02:00
releasing package libdrm version 2.4.129-1

- - - - -
c3c7fb21 by Sergio Costas Rodriguez at 2025-12-02T17:02:39+01:00
amdgpu: add env support for amdgpu.ids path

In some cases, like when building a Snap application that uses
libdrm, the `amdgpu.ids` file isn't directly available at the
compiling place, but inside a mounted folder. This forces each
application to link/bind the file from the current place
(usually at the $SNAP/gnome-platform/usr/share/libdrm/amdgpu.ids)
which is cumbersome.

This patch allows to set an environment variable, called
AMDGPU_ASIC_ID_TABLE_PATH, where the file will be also searched
if it isn't located in the default, meson-configured, path.

- - - - -
a050f86e by Sergio Costas Rodriguez at 2025-12-02T17:03:09+01:00
Support multiple paths in AMDGPU_ASIC_ID_TABLE_PATH envar

This patch allows to specify several colon-separated paths where
to search for the `amdgpu.ids` file in the AMDGPU_ASIC_ID_TABLE_PATH
environment variable.

- - - - -
d72d7c6e by Sergio Costas Rodriguez at 2025-12-03T10:53:38+01:00
amdgpu: Fix envar name in documentation

After a change in the patch, the environment variable name for
the `amdgpu.ids` file paths changed to plurar form, but the
documentation wasn't updated.

This patch fixes it.

- - - - -
b71953a1 by Andrew Davis at 2025-12-04T09:39:10+00:00
omap: fix omap_bo_size for tiled buffers

The buffer size is calculated using pixels, not bytes as it should. The
result is often correct, though, as the stride is aligned to page size,
but there are still many cases where the size ends up being wrong.

Fix this by not calculating the size at all, as in that case
DRM_OMAP_GEM_INFO ioctl is used to get the correct size from the kernel.
This is better in any case as then the userspace library doesn't need to
know how the tiled buffers need to be aligned.

Signed-off-by: Tomi Valkeinen <[email protected]>
Signed-off-by: Andrew Davis <[email protected]>

- - - - -
bef7c6fc by Val Packett at 2025-12-07T20:06:56-03:00
headers: drm: Sync virtgpu_drm.h with Linux v6.16

The header shipped with libdrm was missing blob resources, context_init,
syncobj support, and capset definitions.

Update to the current version from Linux, which was last modified in 6.16.

Signed-off-by: Val Packett <[email protected]>

- - - - -
1b68532f by Simon Ser at 2025-12-08T13:09:09+00:00
Sync headers with drm-next

Synchronize drm.h, drm_mode.h and drm_fourcc.h to drm-next.

Generated using make headers_install
Generated from drm-next branch commit 0692602defb0c273f80dec9c564ca50726404aca

Signed-off-by: Simon Ser <[email protected]>

- - - - -
523534ee by Simon Ser at 2025-12-08T14:15:17+01:00
build: bump version to 2.4.130

Signed-off-by: Simon Ser <[email protected]>

- - - - -
b7861fb5 by Samuel Pitoiset at 2025-12-11T08:52:33+01:00
amdgpu: add Steam Machine marketing name

Signed-off-by: Samuel Pitoiset <[email protected]>

- - - - -
64ef303d by Sergio Costas Rodriguez at 2025-12-11T15:41:39+01:00
amdgpu: NetBSD lacks secure_getenv

When adding support for defining extra paths for the `amdgpu.ids`
file using an environment variable, the patch used a call to
secure_getenv(), which is only available in GNU. This breaks the
build in NetBSD systems.

This patch adds conditional compilation to use secure_getenv()
only when compiling against the GNU libraries.

Fix 
https://gitlab.freedesktop.org/mesa/libdrm/-/commit/c3c7fb21aa21ee6694754b746bedd11dbf5b3d28#note_3229411

Signed-off-by: Sergio Costas Rodriguez <[email protected]>

- - - - -
6bfcfc72 by Simon Ser at 2025-12-11T22:17:34+01:00
build: bump version to 2.4.131

Signed-off-by: Simon Ser <[email protected]>

- - - - -
28d93d19 by Timo Aaltonen at 2026-02-02T08:23:34+02:00
Merge branch 'upstream-unstable' into debian-unstable

- - - - -
311b1259 by Timo Aaltonen at 2026-02-02T08:24:11+02:00
version bump

- - - - -
4d0361f1 by Timo Aaltonen at 2026-02-02T08:26:26+02:00
patches: Drop upstreamed patch.

- - - - -
1bc280d4 by Timo Aaltonen at 2026-02-02T08:28:03+02:00
releasing package libdrm version 2.4.131-1

- - - - -


41 changed files:

- README.rst
- amdgpu/amdgpu_asic_id.c
- amdgpu/amdgpu_bo.c
- data/amdgpu.ids
- debian/changelog
- − debian/patches/amdgpu-add-env-support-for-amdgpu-ids.patch
- debian/patches/series
- include/drm/amdgpu_drm.h
- include/drm/drm.h
- include/drm/drm_fourcc.h
- include/drm/drm_mode.h
- include/drm/virtgpu_drm.h
- meson.build
- omap/omap_drm.c
- − tests/amdgpu/amdgpu_test.c
- − tests/amdgpu/amdgpu_test.h
- − tests/amdgpu/basic_tests.c
- − tests/amdgpu/bo_tests.c
- − tests/amdgpu/cp_dma_tests.c
- − tests/amdgpu/cs_tests.c
- − tests/amdgpu/deadlock_tests.c
- − tests/amdgpu/decode_messages.h
- − tests/amdgpu/frame.h
- − tests/amdgpu/hotunplug_tests.c
- − tests/amdgpu/jpeg_tests.c
- tests/amdgpu/meson.build
- − tests/amdgpu/ras_tests.c
- − tests/amdgpu/security_tests.c
- − tests/amdgpu/shader_code.h
- − tests/amdgpu/shader_code_gfx10.h
- − tests/amdgpu/shader_code_gfx11.h
- − tests/amdgpu/shader_code_gfx9.h
- − tests/amdgpu/shader_code_hang.h
- − tests/amdgpu/shader_test_util.c
- − tests/amdgpu/syncobj_tests.c
- − tests/amdgpu/uvd_enc_tests.c
- − tests/amdgpu/uve_ib.h
- − tests/amdgpu/vce_ib.h
- − tests/amdgpu/vce_tests.c
- − tests/amdgpu/vcn_tests.c
- − tests/amdgpu/vm_tests.c


The diff was not included because it is too large.


View it on GitLab: 
https://salsa.debian.org/xorg-team/lib/libdrm/-/compare/48fac37cac9f2aaa30384c8ad993e3362bcef4cb...1bc280d4c05b3a2d94146ee33cd6791bc825b047

-- 
View it on GitLab: 
https://salsa.debian.org/xorg-team/lib/libdrm/-/compare/48fac37cac9f2aaa30384c8ad993e3362bcef4cb...1bc280d4c05b3a2d94146ee33cd6791bc825b047
You're receiving this email because of your account on salsa.debian.org.


Reply via email to