#
1.7 |
|
30-Sep-2023 |
mrg |
drm: enable almost all PCIe functionality
linux_pci.c revisions 1.24 and 1.25 implemented most of the remaining missing PCIe backends, but only enabled them for some amdgpu portions.
this enables all code marked with "XXX amdgpu pcie", "XXX radeon pcie", and "XXX pcie speed". for most of it, simply removing #ifndefs __NetBSD__ to enable compliation was required, once the new "bus->max_bus_speed" member was added to struct pci_bus. add an "always fails" backend for pci_enable_atomic_ops_to_root() which seems to only be necessary for virtual GPU functionality (and could be implemented if needed.)
tested on radeon 5450, 7750, R7 240 [radeon], and RX 550 [amdgpu], and nvidia 750 and 1030 [nouveau].
this still does not quite work on nvidia cards. there are two problems that remain:
- the call to set the link speed is skipped because the speed is set to the default value of "-1". nvkm_pcie_set_link() will actually determine the right value for this and for some cards, calling this function if the current speed is -1 helps set the link speed. it may be that on linux other paths we don't have enabled properly would set this (there's one via debugfs, and a jetson specific one, though perhaps setting either AC or DC speed values as boot options (after hooking up these for netbsd) would currently work.
- worse, cards newer than kepler - geforce 900, 1000, and newer, are all lacking the backing support to set pcie link speed. the GT 1030 card i have been testing with remains at pcie 1.0.
|
Revision tags: netbsd-10-base
|
#
1.6 |
|
17-Oct-2022 |
mrg |
add pcie capability and read request size linux compat, some pci root support
implement support for: - pcie_capability_read_dword() - pcie_capability_read_word() - pcie_capability_write_dword() - pcie_capability_write_word() - pcie_get_readrq() - pcie_set_readrq()
implement the "struct pci_dev" bus->self member by creating a minimal fake "struct pci_dev" for the pci bus itself. this is kind of gross. it checks that the current device's parent is a netbsd "pci" device, and that it has a (grand) parent "ppb" device, and then fills in the fake device based upon the pci and ppb devices.
add some PCIE_LCSR2_TGT_LSPEED encodings, and map them to linux names. map several other PCIE_LCSR and PCIE_LCAP names.
uncomment several pcie code segments in radeon and amdgpu. (not sure that we can test the amdgpu_si.c change, as we use the radeon version and the amdgpu version hangs on the one machine i have.)
tested on amdgpu (RX550) and radeon (7750 & 3650).
ok @riastradh
|
Revision tags: bouyer-sunxi-drm-base
|
#
1.5 |
|
19-Dec-2021 |
riastradh |
First whack at amdgpu. Long way to go.
|
#
1.4 |
|
18-Dec-2021 |
riastradh |
Merge linux-drm-v5-6-rc3
|
Revision tags: netbsd-9-3-RELEASE thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base thorpej-i2c-spi-conf-base thorpej-cfargs-base thorpej-futex-base netbsd-9-1-RELEASE bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906
|
#
1.3 |
|
27-Aug-2018 |
riastradh |
branches: 1.3.2; 1.3.6; Make amdgpu cik build.
- Sprinkle __UNCONST and __UNVOLATILE judiciously. - Ifdef out debugfs stuff and other unused things. - Add includes. - Convert void * to char * before arithmetic. - Add prototype for amdgpu_cik_gpu_check_soft_reset. . XXX Should really be in a header file, but whatever... - Mark unused variables. - sprintf -> snprintf
|
#
1.2 |
|
27-Aug-2018 |
riastradh |
Disable PCIe stuff until I can figure out what it does.
|
#
1.1 |
|
27-Aug-2018 |
riastradh |
branches: 1.1.1; New option AMDGPU_CIK for devices covered by radeon and amdgpu.
|
#
1.6 |
|
17-Oct-2022 |
mrg |
add pcie capability and read request size linux compat, some pci root support
implement support for: - pcie_capability_read_dword() - pcie_capability_read_word() - pcie_capability_write_dword() - pcie_capability_write_word() - pcie_get_readrq() - pcie_set_readrq()
implement the "struct pci_dev" bus->self member by creating a minimal fake "struct pci_dev" for the pci bus itself. this is kind of gross. it checks that the current device's parent is a netbsd "pci" device, and that it has a (grand) parent "ppb" device, and then fills in the fake device based upon the pci and ppb devices.
add some PCIE_LCSR2_TGT_LSPEED encodings, and map them to linux names. map several other PCIE_LCSR and PCIE_LCAP names.
uncomment several pcie code segments in radeon and amdgpu. (not sure that we can test the amdgpu_si.c change, as we use the radeon version and the amdgpu version hangs on the one machine i have.)
tested on amdgpu (RX550) and radeon (7750 & 3650).
ok @riastradh
|
Revision tags: bouyer-sunxi-drm-base
|
#
1.5 |
|
19-Dec-2021 |
riastradh |
First whack at amdgpu. Long way to go.
|
#
1.4 |
|
18-Dec-2021 |
riastradh |
Merge linux-drm-v5-6-rc3
|
Revision tags: netbsd-9-3-RELEASE thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base thorpej-i2c-spi-conf-base thorpej-cfargs-base thorpej-futex-base netbsd-9-1-RELEASE bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906
|
#
1.3 |
|
27-Aug-2018 |
riastradh |
branches: 1.3.2; 1.3.6; Make amdgpu cik build.
- Sprinkle __UNCONST and __UNVOLATILE judiciously. - Ifdef out debugfs stuff and other unused things. - Add includes. - Convert void * to char * before arithmetic. - Add prototype for amdgpu_cik_gpu_check_soft_reset. . XXX Should really be in a header file, but whatever... - Mark unused variables. - sprintf -> snprintf
|
#
1.2 |
|
27-Aug-2018 |
riastradh |
Disable PCIe stuff until I can figure out what it does.
|
#
1.1 |
|
27-Aug-2018 |
riastradh |
branches: 1.1.1; New option AMDGPU_CIK for devices covered by radeon and amdgpu.
|
#
1.5 |
|
19-Dec-2021 |
riastradh |
First whack at amdgpu. Long way to go.
|
#
1.4 |
|
18-Dec-2021 |
riastradh |
Merge linux-drm-v5-6-rc3
|
Revision tags: thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base thorpej-i2c-spi-conf-base thorpej-cfargs-base thorpej-futex-base netbsd-9-1-RELEASE bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906
|
#
1.3 |
|
27-Aug-2018 |
riastradh |
branches: 1.3.2; 1.3.6; Make amdgpu cik build.
- Sprinkle __UNCONST and __UNVOLATILE judiciously. - Ifdef out debugfs stuff and other unused things. - Add includes. - Convert void * to char * before arithmetic. - Add prototype for amdgpu_cik_gpu_check_soft_reset. . XXX Should really be in a header file, but whatever... - Mark unused variables. - sprintf -> snprintf
|
#
1.2 |
|
27-Aug-2018 |
riastradh |
Disable PCIe stuff until I can figure out what it does.
|
#
1.1 |
|
27-Aug-2018 |
riastradh |
branches: 1.1.1; New option AMDGPU_CIK for devices covered by radeon and amdgpu.
|
Revision tags: isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906
|
#
1.3 |
|
27-Aug-2018 |
riastradh |
branches: 1.3.2; Make amdgpu cik build.
- Sprinkle __UNCONST and __UNVOLATILE judiciously. - Ifdef out debugfs stuff and other unused things. - Add includes. - Convert void * to char * before arithmetic. - Add prototype for amdgpu_cik_gpu_check_soft_reset. . XXX Should really be in a header file, but whatever... - Mark unused variables. - sprintf -> snprintf
|
#
1.2 |
|
27-Aug-2018 |
riastradh |
Disable PCIe stuff until I can figure out what it does.
|
#
1.1 |
|
27-Aug-2018 |
riastradh |
New option AMDGPU_CIK for devices covered by radeon and amdgpu.
|