xf86drm: Drop drmFauxDeviceInfo

Its contents is the same as drmFauxBusInfo. While it is technically an
API breaking change, libdrm with the relevant changes has been released
only recently and there are issues with quering DRM nodes that are on
the faux bus, which result in crashes, so it is unlikely that there are
users that depend on the new API.

Signed-off-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
This commit is contained in:
Vlad Zahorodnii 2025-10-14 19:29:40 +03:00
parent 1e9b50f1d5
commit 7a325ad150
2 changed files with 1 additions and 26 deletions

View file

@ -4020,12 +4020,6 @@ static void drmFreeHost1xDevice(drmDevicePtr device)
}
}
static void drmFreeFauxDevice(drmDevicePtr device)
{
if (device->deviceinfo.faux)
free(device->deviceinfo.faux->name);
}
drm_public void drmFreeDevice(drmDevicePtr *device)
{
if (device == NULL)
@ -4040,10 +4034,6 @@ drm_public void drmFreeDevice(drmDevicePtr *device)
case DRM_BUS_HOST1X:
drmFreeHost1xDevice(*device);
break;
case DRM_BUS_FAUX:
drmFreeFauxDevice(*device);
break;
}
}
@ -4507,8 +4497,7 @@ static int drmProcessFauxDevice(drmDevicePtr *device,
char *ptr;
int ret;
dev = drmDeviceAlloc(node_type, node, sizeof(drmFauxBusInfo),
sizeof(drmFauxDeviceInfo), &ptr);
dev = drmDeviceAlloc(node_type, node, sizeof(drmFauxBusInfo), 0, &ptr);
if (!dev)
return -ENOMEM;
@ -4520,15 +4509,6 @@ static int drmProcessFauxDevice(drmDevicePtr *device,
if (ret < 0)
goto free_device;
if (fetch_deviceinfo) {
ptr += sizeof(drmFauxBusInfo);
dev->deviceinfo.faux = (drmFauxDeviceInfoPtr)ptr;
dev->deviceinfo.faux->name = strdup(dev->businfo.faux->name);
if (!dev->deviceinfo.faux->name)
goto free_device;
}
*device = dev;
return 0;

View file

@ -896,10 +896,6 @@ typedef struct _drmFauxBusInfo {
char name[DRM_FAUX_DEVICE_NAME_LEN];
} drmFauxBusInfo, *drmFauxBusInfoPtr;
typedef struct _drmFauxDeviceInfo {
char *name; /* deprecated, use drmFauxBusInfo::name instead */
} drmFauxDeviceInfo, *drmFauxDeviceInfoPtr;
typedef struct _drmDevice {
char **nodes; /* DRM_NODE_MAX sized array */
int available_nodes; /* DRM_NODE_* bitmask */
@ -916,7 +912,6 @@ typedef struct _drmDevice {
drmUsbDeviceInfoPtr usb;
drmPlatformDeviceInfoPtr platform;
drmHost1xDeviceInfoPtr host1x;
drmFauxDeviceInfoPtr faux;
} deviceinfo;
} drmDevice, *drmDevicePtr;