Lines Matching refs:local_devices
3682 static void drmFoldDuplicatedDevices(drmDevicePtr local_devices[], int count) in drmFoldDuplicatedDevices() argument
3688 if (drmDevicesEqual(local_devices[i], local_devices[j])) { in drmFoldDuplicatedDevices()
3689 local_devices[i]->available_nodes |= local_devices[j]->available_nodes; in drmFoldDuplicatedDevices()
3690 node_type = log2(local_devices[j]->available_nodes); in drmFoldDuplicatedDevices()
3691 memcpy(local_devices[i]->nodes[node_type], in drmFoldDuplicatedDevices()
3692 local_devices[j]->nodes[node_type], drmGetMaxNodeName()); in drmFoldDuplicatedDevices()
3693 drmFreeDevice(&local_devices[j]); in drmFoldDuplicatedDevices()
3786 drmDevicePtr *local_devices; in drmGetDevice2()
3816 local_devices = calloc(max_count, sizeof(drmDevicePtr)); in drmGetDevice2()
3817 if (local_devices == NULL) in drmGetDevice2()
3882 temp = realloc(local_devices, max_count * sizeof(drmDevicePtr)); in drmGetDevice2()
3885 local_devices = temp; in drmGetDevice2()
3890 local_devices[i] = local_devices[0]; in drmGetDevice2()
3891 local_devices[0] = d; in drmGetDevice2()
3894 local_devices[i] = d; in drmGetDevice2()
3899 drmFoldDuplicatedDevices(local_devices, node_count); in drmGetDevice2()
3901 *device = local_devices[0]; in drmGetDevice2()
3902 drmFreeDevices(&local_devices[1], node_count - 1); in drmGetDevice2()
3905 free(local_devices); in drmGetDevice2()
3911 drmFreeDevices(local_devices, i); in drmGetDevice2()
3915 free(local_devices); in drmGetDevice2()
3952 drmDevicePtr *local_devices; in drmGetDevices2() local
3966 local_devices = calloc(max_count, sizeof(drmDevicePtr)); in drmGetDevices2()
3967 if (local_devices == NULL) in drmGetDevices2()
4038 temp = realloc(local_devices, max_count * sizeof(drmDevicePtr)); in drmGetDevices2()
4041 local_devices = temp; in drmGetDevices2()
4044 local_devices[i] = device; in drmGetDevices2()
4049 drmFoldDuplicatedDevices(local_devices, node_count); in drmGetDevices2()
4053 if (!local_devices[i]) in drmGetDevices2()
4057 devices[device_count] = local_devices[i]; in drmGetDevices2()
4059 drmFreeDevice(&local_devices[i]); in drmGetDevices2()
4065 free(local_devices); in drmGetDevices2()
4069 drmFreeDevices(local_devices, i); in drmGetDevices2()
4073 free(local_devices); in drmGetDevices2()