Skip to content

Commit 42b756e

Browse files
committed
GPU (Linux): revert show sub-device if available
1 parent 91dac15 commit 42b756e

File tree

4 files changed

+4
-11
lines changed

4 files changed

+4
-11
lines changed

src/detection/gpu/gpu.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,5 @@ const char* ffDetectGPUImpl(const FFGPUOptions* options, FFlist* gpus);
4444
const char* ffGetGPUVendorString(unsigned vendorId);
4545

4646
#if defined(__linux__) || defined(__FreeBSD__)
47-
void ffGPUParsePciIds(FFstrbuf* content, uint8_t subclass, uint16_t vendor, uint16_t device, uint16_t subVendor, uint16_t subDevice, FFGPUResult* gpu);
47+
void ffGPUParsePciIds(FFstrbuf* content, uint8_t subclass, uint16_t vendor, uint16_t device, FFGPUResult* gpu);
4848
#endif

src/detection/gpu/gpu_bsd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ const char* ffDetectGPUImpl(const FFGPUOptions* options, FFlist* gpus)
7474
{
7575
if (pciids.length == 0)
7676
loadPciIds(&pciids);
77-
ffGPUParsePciIds(&pciids, pc->pc_subclass, pc->pc_vendor, pc->pc_device, pc->pc_subvendor, pc->pc_subdevice, gpu);
77+
ffGPUParsePciIds(&pciids, pc->pc_subclass, pc->pc_vendor, pc->pc_device, gpu);
7878
}
7979

8080
#ifdef FF_USE_PROPRIETARY_GPU_DRIVER_API

src/detection/gpu/gpu_linux.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ static const char* pciDetectGPUs(const FFGPUOptions* options, FFlist* gpus)
143143
{
144144
if (!pciids.length)
145145
loadPciIds(&pciids);
146-
ffGPUParsePciIds(&pciids, subclassId, (uint16_t) vendorId, (uint16_t) deviceId, (uint16_t) subVendorId, (uint16_t) subDeviceId, gpu);
146+
ffGPUParsePciIds(&pciids, subclassId, (uint16_t) vendorId, (uint16_t) deviceId, gpu);
147147
}
148148

149149
pciDetectDriver(gpu, &pciDir, &buffer);

src/detection/gpu/gpu_pci.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include "gpu.h"
22

3-
void ffGPUParsePciIds(FFstrbuf* content, uint8_t subclass, uint16_t vendor, uint16_t device, uint16_t subVendor, uint16_t subDevice, FFGPUResult* gpu)
3+
void ffGPUParsePciIds(FFstrbuf* content, uint8_t subclass, uint16_t vendor, uint16_t device, FFGPUResult* gpu)
44
{
55
if (content->length)
66
{
@@ -40,13 +40,6 @@ void ffGPUParsePciIds(FFstrbuf* content, uint8_t subclass, uint16_t vendor, uint
4040
if (start)
4141
{
4242
start += len;
43-
44-
// Search for subvendor and subdevice
45-
len = (uint32_t) snprintf(buffer, sizeof(buffer), "\n\t\t%04x %04x ", subVendor, subDevice);
46-
char* subStart = memmem(start, (size_t) (end - start), buffer, len);
47-
if (subStart)
48-
start = subStart + len;
49-
5043
end = memchr(start, '\n', (uint32_t) (end - start));
5144
if (!end)
5245
end = content->chars + content->length;

0 commit comments

Comments
 (0)