1
0
nvidia-open-driver-G06-signed/generati-pci-table.sh
Stefan Dirsch a0eb738252 - introduce %hardcode_pci_list macro for hardcoding PCI ID
modaliases for Supplements; make it default to *temporarily*
  workaround boo#1207520
  * TW: enable only officially supported headless GPUs!
  * Leap/sle: enable all Turing and Ampere GPUs and set the
    appropriate modprobe.d option, so we can at least begin
    testing on sle15-sp5 ...

OBS-URL: https://build.opensuse.org/package/show/X11:Drivers:Video:Redesign/nvidia-open-driver-G06-signed?expand=0&rev=17
2023-01-29 16:24:50 +00:00

64 lines
1.6 KiB
Bash

#!/bin/sh
if [ $# -ne 1 ]; then
echo "$0 <input_file"
exit 1
fi
input=$1
cat > nvidia/nv_pci_table_list.h <<EOF
EOF
cat > nvidia/nv_module_pci_table_list.h <<EOF
EOF
for did in $(cat $input | cut -d " " -f1 ); do
echo $did
cat >> nvidia/nv_pci_table_list.h <<EOF
{
.vendor = PCI_VENDOR_ID_NVIDIA,
.device = $did,
.subvendor = PCI_ANY_ID,
.subdevice = PCI_ANY_ID,
.class = (PCI_CLASS_DISPLAY_VGA << 8),
.class_mask = ~0
},
{
.vendor = PCI_VENDOR_ID_NVIDIA,
.device = $did,
.subvendor = PCI_ANY_ID,
.subdevice = PCI_ANY_ID,
.class = (PCI_CLASS_DISPLAY_3D << 8),
.class_mask = ~0
},
EOF
cat >> nvidia/nv_module_pci_table_list.h <<EOF
{
.vendor = PCI_VENDOR_ID_NVIDIA,
.device = $did,
.subvendor = PCI_ANY_ID,
.subdevice = PCI_ANY_ID,
.class = (PCI_CLASS_DISPLAY_VGA << 8),
.class_mask = ~0
},
{
.vendor = PCI_VENDOR_ID_NVIDIA,
.device = $did,
.subvendor = PCI_ANY_ID,
.subdevice = PCI_ANY_ID,
.class = (PCI_CLASS_DISPLAY_3D << 8),
.class_mask = ~0
},
{
.vendor = PCI_VENDOR_ID_NVIDIA,
.device = $did,
.subvendor = PCI_ANY_ID,
.subdevice = PCI_ANY_ID,
.class = (PCI_CLASS_BRIDGE_OTHER << 8),
.class_mask = ~0
},
EOF
done
cp nvidia/nv_pci_table_list.h nvidia-drm/nv_pci_table_list.h
cp nvidia/nv_module_pci_table_list.h nvidia-drm/nv_module_pci_table_list.h