mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2025-12-20 04:40:09 +01:00
The name string is allocated on the heap, so the memcmp() function will not return 0 even though two nodes share the same device name. Also, the device info will not be populated when counting the available drm devices. For example, using drmGetDevices2(0, NULL, 0). In that case, drmGetDevices2() will eventually crash in drmDevicesEqual() while merging nodes belonging to the same device due to passing null pointers to memcmp(). This change adds faux device name to businfo. The businfo is populated regardless whether device info is needed, which is needed to make the drmGetDevices2(0, NULL, 0) case work. drmFauxBusInfo can also be used with the memcmp() function to match the other cases in drmDevicesEqual(). Signed-off-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org> |
||
|---|---|---|
| .. | ||
| amdgpu | ||
| etnaviv | ||
| exynos | ||
| modeprint | ||
| modetest | ||
| nouveau | ||
| proptest | ||
| radeon | ||
| tegra | ||
| ttmtest | ||
| util | ||
| vbltest | ||
| Android.bp | ||
| drmdevice.c | ||
| drmsl.c | ||
| hash.c | ||
| meson.build | ||