From: Bjorn Helgaas <helgaas@kernel.org>
To: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: "Bjorn Helgaas" <bhelgaas@google.com>,
"Christian König" <christian.koenig@amd.com>,
linux-pci@vger.kernel.org,
"Alex Deucher" <alexander.deucher@amd.com>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] PCI (& drm/amdgpu): BAR to be excluded depends on HW generation
Date: Fri, 14 Nov 2025 12:20:26 -0600 [thread overview]
Message-ID: <20251114182026.GA2332245@bhelgaas> (raw)
In-Reply-To: <20251114103053.13778-1-ilpo.jarvinen@linux.intel.com>
On Fri, Nov 14, 2025 at 12:30:53PM +0200, Ilpo Järvinen wrote:
> Depending on HW generation, BAR that needs to be excluded from
> pci_resize_resource() is either 2 or 5.
>
> Suggested-by: Christian König <christian.koenig@amd.com>
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
> ---
>
> This change should be be folded into the commit 73cd7ee85e78 ("PCI: Fix
> restoring BARs on BAR resize rollback path") in the pci/resource branch.
>
> Also the changelog should be changed: "(BAR 5)" -> "(BAR 2 or 5)".
>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
Squashed into 73cd7ee85e78, thanks:
https://git.kernel.org/cgit/linux/kernel/git/pci/pci.git/commit/?id=40a8789930e2
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 4e241836ae68..bf0bc38e1c47 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -1736,7 +1736,9 @@ int amdgpu_device_resize_fb_bar(struct amdgpu_device *adev)
>
> pci_release_resource(adev->pdev, 0);
>
> - r = pci_resize_resource(adev->pdev, 0, rbar_size, 1 << 5);
> + r = pci_resize_resource(adev->pdev, 0, rbar_size,
> + (adev->asic_type >= CHIP_BONAIRE) ? 1 << 5
> + : 1 << 2);
> if (r == -ENOSPC)
> dev_info(adev->dev,
> "Not enough PCI address space for a large BAR.");
>
> base-commit: 73cd7ee85e788bc2541bfce2500e3587cf79f081
> --
> 2.39.5
>
prev parent reply other threads:[~2025-11-14 18:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-14 10:30 [PATCH 1/1] PCI (& drm/amdgpu): BAR to be excluded depends on HW generation Ilpo Järvinen
2025-11-14 10:32 ` Christian König
2025-11-14 18:20 ` Bjorn Helgaas [this message]
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=20251114182026.GA2332245@bhelgaas \
--to=helgaas@kernel.org \
--cc=airlied@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=bhelgaas@google.com \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=simona@ffwll.ch \
/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