public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ard Biesheuvel" <ardb@kernel.org>
To: devel@edk2.groups.io
Cc: leif@nuviainc.com, Ard Biesheuvel <ardb@kernel.org>
Subject: [PATCH edk2-platforms] Platform/Overdrive: enable resizable BAR support
Date: Tue,  1 Feb 2022 14:23:06 +0100	[thread overview]
Message-ID: <20220201132306.631632-1-ardb@kernel.org> (raw)

Enable resizable BAR support so that BARs for, e.g., GPU cards that are
sized conservatively by default, but can be resized to cover all of the
GPU's VRAM, are resized by the firmware before handing over to the OS.
This is a more appropriate time to perform the resize, as usually, the
boot time GPU driver and the GOP will be up during PCI discovery of the
OS.

Tested on Overdrive B1 with an AMD GPU based on the Oland ASIC and the
Linux radeon driver (which does not implement PCI BAR resizing in the
first place)

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
---
 Platform/AMD/OverdriveBoard/OverdriveBoard.dsc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
index af207391209c..01d320a6d0ef 100644
--- a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
+++ b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
@@ -452,6 +452,8 @@ [PcdsFixedAtBuild.common]
   gAmdModulePkgTokenSpaceGuid.PcdPort0NetSpeed|1
   gAmdModulePkgTokenSpaceGuid.PcdPort1NetSpeed|1
 
+  gEfiMdeModulePkgTokenSpaceGuid.PcdPcieResizableBarSupport|TRUE
+
 [PcdsDynamicDefault.common]
   gAmdStyxTokenSpaceGuid.PcdEthMacA|{0x2,0xA1,0xA2,0xA3,0xA4,0xA5}
   gAmdStyxTokenSpaceGuid.PcdEthMacB|{0x2,0xB1,0xB2,0xB3,0xB4,0xB5}
-- 
2.30.2


             reply	other threads:[~2022-02-01 13:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-01 13:23 Ard Biesheuvel [this message]
2022-02-02 11:10 ` [PATCH edk2-platforms] Platform/Overdrive: enable resizable BAR support Leif Lindholm

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-list 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=20220201132306.631632-1-ardb@kernel.org \
    --to=devel@edk2.groups.io \
    /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