loader: use a maximum of 64 drmDevices
authorEmil Velikov <emil.velikov@collabora.com>
Tue, 19 Feb 2019 15:30:38 +0000 (15:30 +0000)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 1 Apr 2020 15:57:22 +0000 (16:57 +0100)
commit25b2b325885710dc7dc7539d6d37e77182767088
tree9f81da81faac1c83106b464f825174c886263f0c
parentd3c91439713ecf025c7fe97aae3a4829b3f1250b
loader: use a maximum of 64 drmDevices

Currently that's the hard-coded maximum in the kernel, even though the
libdrm API allows for more. Latter is done with extendability in mind.

Allocate 64 pointers^Wdevices on stack for now. Making for shorter and
ever-so-slightly faster code.

v2: Use single MAX_DRM_DEVICES #define (Eric)

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Adam Jackson <ajax@redhat.com> (v1)
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4084>
src/loader/loader.c