From: Kevin Hilman <khilman@baylibre.com>
To: Michal Lazo <michal.lazo@mdragon.org>, linux-amlogic@lists.infradead.org
Cc: Neil Armstrong <narmstrong@baylibre.com>
Subject: Re: How to fix pcie ranges for nvidia GFX card
Date: Mon, 09 Nov 2020 15:54:20 -0800 [thread overview]
Message-ID: <7ho8k6ulw3.fsf@baylibre.com> (raw)
In-Reply-To: <CAFW1BFwi9nXW3ZZjK2pH2JUPh9Xj0PdM61+4sOY-YjA=i-AwEQ@mail.gmail.com>
Michal Lazo <michal.lazo@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@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@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-amlogic
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
next prev parent reply other threads:[~2020-11-09 23:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-09 8:40 How to fix pcie ranges for nvidia GFX card Michal Lazo
2020-11-09 23:54 ` Kevin Hilman [this message]
2020-11-11 18:14 ` Michal Lazo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7ho8k6ulw3.fsf@baylibre.com \
--to=khilman@baylibre.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=michal.lazo@mdragon.org \
--cc=narmstrong@baylibre.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox