From: Frank Min <Frank.Min@amd.com>
To: <amd-gfx@lists.freedesktop.org>
Cc: Frank Min <Frank.Min@amd.com>, Kevin Wang <kevin.wang@amd.com>
Subject: [PATCH 6/9] drm/amdgpu: Fix system aperture size for gfx13
Date: Fri, 4 Dec 2026 22:24:05 +0800 [thread overview]
Message-ID: <20261204142408.988734-6-Frank.Min@amd.com> (raw)
In-Reply-To: <20261204142408.988734-1-Frank.Min@amd.com>
Gfx13 vram layout introduced vram offset, but aperture space should
not be affected. So fix system aperture size to align with it.
Signed-off-by: Frank Min <Frank.Min@amd.com>
Reviewed-by: Kevin Wang <kevin.wang@amd.com>
---
drivers/gpu/drm/amd/amdgpu/gmc_v13_0.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v13_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v13_0.c
index 49fee18eb5253..b548b748d670e 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v13_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v13_0.c
@@ -618,10 +618,14 @@ static int gmc_v13_0_late_init(struct amdgpu_ip_block *ip_block)
return amdgpu_irq_get(adev, &adev->gmc.vm_fault, 0);
}
-static void gmc_v13_0_vram_gtt_location(struct amdgpu_device *adev, struct amdgpu_gmc *mc, u64 base, u64 offset)
+static void gmc_v13_0_vram_gtt_location(struct amdgpu_device *adev,
+ struct amdgpu_gmc *mc, u64 base)
{
amdgpu_gmc_set_agp_default(adev, mc);
amdgpu_gmc_vram_location(adev, mc, base);
+
+ if (!amdgpu_sriov_vf(adev))
+ mc->fb_start = adev->mmhub.funcs->get_fb_location(adev);
amdgpu_gmc_gart_location(adev, mc, AMDGPU_GART_PLACEMENT_LOW);
if (!amdgpu_sriov_vf(adev) && (amdgpu_agp == 1))
amdgpu_gmc_agp_location(adev, mc);
@@ -630,7 +634,9 @@ static void gmc_v13_0_vram_gtt_location(struct amdgpu_device *adev, struct amdgp
if (amdgpu_sriov_vf(adev))
adev->vm_manager.vram_base_offset = 0;
else
- adev->vm_manager.vram_base_offset = adev->mmhub.funcs->get_mc_fb_offset(adev) + offset;
+ adev->vm_manager.vram_base_offset =
+ adev->mmhub.funcs->get_mc_fb_offset(adev) +
+ mc->vram_start - mc->fb_start;
}
/**
@@ -689,7 +695,7 @@ static int gmc_v13_0_mc_init(struct amdgpu_device *adev)
/* set the gart size */
amdgpu_gmc_set_gart_size(adev, SZ_512M);
- gmc_v13_0_vram_gtt_location(adev, &adev->gmc, base, mc_vram_offset);
+ gmc_v13_0_vram_gtt_location(adev, &adev->gmc, base);
return 0;
}
--
2.43.0
next prev parent reply other threads:[~2026-12-04 14:24 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-04 14:24 [PATCH 1/9] drm/amdgpu: skip vm inv for kiq ring Frank Min
2026-12-04 14:24 ` [PATCH 2/9] drm/amdgpu: disable gfx 13 pipe 1 ring Frank Min
2026-12-04 14:55 ` sashiko-bot
2026-12-04 16:05 ` Alex Deucher
2026-12-04 14:24 ` [PATCH 3/9] drm/amdgpu: update table info retrieval from discovery binary Frank Min
2026-12-04 15:14 ` sashiko-bot
2026-12-04 16:19 ` Alex Deucher
2026-12-04 14:24 ` [PATCH 4/9] drm/amdgpu: add lsdma v8 fw query interface Frank Min
2026-12-04 15:25 ` sashiko-bot
2026-12-04 16:21 ` Alex Deucher
2026-12-04 14:24 ` [PATCH 5/9] drm/amdgpu: add lsdma v8 fw loading support Frank Min
2026-12-04 15:47 ` sashiko-bot
2026-12-04 14:24 ` Frank Min [this message]
2026-12-04 16:01 ` [PATCH 6/9] drm/amdgpu: Fix system aperture size for gfx13 sashiko-bot
2026-12-04 14:24 ` [PATCH 7/9] drm/amdgpu: remove the unused ring parameter in update_spm_vmid() " Frank Min
2026-12-04 16:03 ` Alex Deucher
2026-12-04 16:11 ` sashiko-bot
2026-12-04 14:24 ` [PATCH 8/9] drm/amdgpu: enable uni-mes " Frank Min
2026-12-04 16:41 ` sashiko-bot
2026-12-04 17:24 ` Alex Deucher
2026-12-04 14:24 ` [PATCH 9/9] drm/amdgpu: fix mutex unlock position for ucode loading Frank Min
2026-12-04 16:12 ` Alex Deucher
2026-12-04 16:52 ` sashiko-bot
2026-12-04 14:41 ` [PATCH 1/9] drm/amdgpu: skip vm inv for kiq ring sashiko-bot
2026-12-04 16:16 ` Alex Deucher
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=20261204142408.988734-6-Frank.Min@amd.com \
--to=frank.min@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=kevin.wang@amd.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.