How to fix pcie ranges for nvidia GFX card

Michal Lazo michal.lazo at mdragon.org
Wed Nov 11 13:14:20 EST 2020


Hello
more bars has problem

[    1.417571] dw-pcie fc000000.pcie: IRQ index 1 not found
[    1.431519] meson-pcie fc000000.pcie: host bridge /soc/pcie at fc000000 ranges:
[    1.436260] meson-pcie fc000000.pcie:       IO
0x00fc600000..0x00fc9fffff -> 0x0000000000
[    1.444357] meson-pcie fc000000.pcie:      MEM
0x00fca00000..0x00fdffffff -> 0x00fca00000
[    1.479863] meson-pcie fc000000.pcie: Link up
[    1.479922] meson-pcie fc000000.pcie: PCI host bridge to bus 0000:00
[    1.484882] pci_bus 0000:00: root bus resource [bus 00-ff]
[    1.490314] pci_bus 0000:00: root bus resource [io  0x0000-0x3fffff]
[    1.496610] pci_bus 0000:00: root bus resource [mem 0xfca00000-0xfdffffff]
[    1.503438] pci 0000:00:00.0: [16c3:abcd] type 01 class 0x060400
[    1.509385] pci 0000:00:00.0: reg 0x38: [mem 0x00000000-0x0000ffff pref]
[    1.516038] pci 0000:00:00.0: supports D1
[    1.519991] pci 0000:00:00.0: PME# supported from D0 D1 D3hot D3cold
[    1.528550] pci 0000:01:00.0: [10de:128b] type 00 class 0x030000
[    1.532291] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x00ffffff]
[    1.538485] pci 0000:01:00.0: reg 0x14: [mem 0x00000000-0x07ffffff
64bit pref]
[    1.545642] pci 0000:01:00.0: reg 0x1c: [mem 0x00000000-0x01ffffff
64bit pref]
[    1.552781] pci 0000:01:00.0: reg 0x24: [io  0x0000-0x007f]
[    1.558301] pci 0000:01:00.0: reg 0x30: [mem 0x00000000-0x0007ffff pref]
[    1.564944] pci 0000:01:00.0: Max Payload Size set to 256 (was 128, max 256)
[    1.572269] pci 0000:01:00.0: 4.000 Gb/s available PCIe bandwidth,
limited by 5.0 GT/s PCIe x1 link at 0000:00:00.0 (capable of 63.008
Gb/s with 8.0 GT/s PCIe x8 link)
[    1.586828] pci 0000:01:00.0: vgaarb: VGA device added:
decodes=io+mem,owns=none,locks=none
[    1.595109] pci 0000:01:00.1: [10de:0e0f] type 00 class 0x040300
[    1.601025] pci 0000:01:00.1: reg 0x10: [mem 0x00000000-0x00003fff]
[    1.607345] pci 0000:01:00.1: Max Payload Size set to 256 (was 128, max 256)
[    1.643679] pci 0000:00:00.0: BAR 9: no space for [mem size 0x0c000000 pref]
[    1.645070] pci 0000:00:00.0: BAR 9: failed to assign [mem size
0x0c000000 pref]
[    1.652405] pci 0000:00:00.0: BAR 8: no space for [mem size 0x01800000]
[    1.658958] pci 0000:00:00.0: BAR 8: failed to assign [mem size 0x01800000]
[    1.665858] pci 0000:00:00.0: BAR 6: assigned [mem
0xfca00000-0xfca0ffff pref]
[    1.673017] pci 0000:00:00.0: BAR 7: assigned [io  0x1000-0x1fff]
[    1.679056] pci 0000:01:00.0: BAR 1: no space for [mem size
0x08000000 64bit pref]
[    1.686557] pci 0000:01:00.0: BAR 1: failed to assign [mem size
0x08000000 64bit pref]
[    1.694406] pci 0000:01:00.0: BAR 3: no space for [mem size
0x02000000 64bit pref]
[    1.701910] pci 0000:01:00.0: BAR 3: failed to assign [mem size
0x02000000 64bit pref]
[    1.709758] pci 0000:01:00.0: BAR 0: no space for [mem size 0x01000000]
[    1.716313] pci 0000:01:00.0: BAR 0: failed to assign [mem size 0x01000000]
[    1.723213] pci 0000:01:00.0: BAR 6: no space for [mem size 0x00080000 pref]
[    1.730200] pci 0000:01:00.0: BAR 6: failed to assign [mem size
0x00080000 pref]
[    1.737531] pci 0000:01:00.1: BAR 0: no space for [mem size 0x00004000]
[    1.744086] pci 0000:01:00.1: BAR 0: failed to assign [mem size 0x00004000]
[    1.750986] pci 0000:01:00.0: BAR 5: assigned [io  0x1000-0x107f]
[    1.757035] pci 0000:00:00.0: PCI bridge to [bus 01-ff]
[    1.762200] pci 0000:00:00.0:   bridge window [io  0x1000-0x1fff]
[    1.768580] pcieport 0000:00:00.0: PME: Signaling with IRQ 31
[    1.774709] pcieport 0000:00:00.0: AER: enabled with IRQ 31

On Tue, Nov 10, 2020 at 12:54 AM Kevin Hilman <khilman at baylibre.com> wrote:
>
> Michal Lazo <michal.lazo at mdragon.org> writes:
>
> > Hello
> > I have khadas vim3 with nvidia PCIe card
> > Anybody has an idea how to fix pcie ranges so we can have nvidia gpu working?
>
> Can you try this patch[1]?  Neil found this issue and we were testing
> locally, but hadn't yet submitted a fix.  If this works, we'll get a
> formal patch upstream.
>
> Hope that helps,
>
> Kevin
>
> [1]
> diff --git a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
> index 1e83ec5b8c91..0a220fb10841 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
> +++ b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
> @@ -134,8 +134,8 @@ pcie: pcie at fc000000 {
>                         #address-cells = <3>;
>                         #size-cells = <2>;
>                         device_type = "pci";
> -                       ranges = <0x81000000 0 0 0x0 0xfc600000 0 0x00100000
> -                                 0x82000000 0 0xfc700000 0x0 0xfc700000 0 0x1900000>;
> +                       ranges = <0x81000000 0 0 0x0 0xfc600000 0 0x00400000
> +                                 0x82000000 0 0xfca00000 0x0 0xfca00000 0 0x1600000>;
>
>                         clocks = <&clkc CLKID_PCIE_PHY
>                                   &clkc CLKID_PCIE_COMB
>
> > This is what I get in dmesg
> >
> > [    1.548188] pci 0000:01:00.0: 4.000 Gb/s available PCIe bandwidth,
> > limited by 5.0 GT/s PCIe x1 link at 0000:00:00.0 (capable of 63.008
> > Gb/s with 8.0 GT/s PCIe x8 link)
> > [    1.562742] pci 0000:01:00.0: vgaarb: VGA device added:
> > decodes=io+mem,owns=none,locks=none
> > [    1.571028] pci 0000:01:00.1: [10de:0e0f] type 00 class 0x040300
> > [    1.576944] pci 0000:01:00.1: reg 0x10: [mem 0x00000000-0x00003fff]
> > [    1.583263] pci 0000:01:00.1: Max Payload Size set to 256 (was 128, max 256)
> > [    1.622407] pci 0000:00:00.0: BAR 9: no space for [mem size 0x0c000000 pref]
> > [    1.623803] pci 0000:00:00.0: BAR 9: failed to assign [mem size
> > 0x0c000000 pref]
> > [    1.631136] pci 0000:00:00.0: BAR 8: assigned [mem 0xfc800000-0xfdffffff]
> > [    1.637861] pci 0000:00:00.0: BAR 6: assigned [mem
> > 0xfc700000-0xfc70ffff pref]
> > [    1.645033] pci 0000:00:00.0: BAR 7: assigned [io  0x1000-0x1fff]
> > [    1.651070] pci 0000:01:00.0: BAR 1: no space for [mem size
> > 0x08000000 64bit pref]
> > [    1.658576] pci 0000:01:00.0: BAR 1: failed to assign [mem size
> > 0x08000000 64bit pref]
> > [    1.666410] pci 0000:01:00.0: BAR 3: no space for [mem size
> > 0x02000000 64bit pref]
> > [    1.673913] pci 0000:01:00.0: BAR 3: failed to assign [mem size
> > 0x02000000 64bit pref]
> > [    1.681763] pci 0000:01:00.0: BAR 0: assigned [mem 0xfd000000-0xfdffffff]
> > [    1.688500] pci 0000:01:00.0: BAR 6: assigned [mem
> > 0xfc800000-0xfc87ffff pref]
> > [    1.695648] pci 0000:01:00.1: BAR 0: assigned [mem 0xfc880000-0xfc883fff]
> > [    1.702385] pci 0000:01:00.0: BAR 5: assigned [io  0x1000-0x107f]
> > [    1.708426] pci 0000:00:00.0: PCI bridge to [bus 01-ff]
> > [    1.713592] pci 0000:00:00.0:   bridge window [io  0x1000-0x1fff]
> > [    1.719626] pci 0000:00:00.0:   bridge window [mem 0xfc800000-0xfdffffff]
> >
> >
> > And this is what we use right now to setup ranges
> > https://github.com/chewitt/linux/blob/master/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi#L137
> >
> >
> > Any idea how to properly set up ranges ?
> >
> > _______________________________________________
> > linux-amlogic mailing list
> > linux-amlogic at lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/linux-amlogic



-- 
Best Regards

Michal Lazo
Senior developer engineer
mdragon.org
Slovakia



More information about the linux-amlogic mailing list