linux/drivers/gpu/drm/amd
Harish Kasiviswanathan eac32ff423 drm/amdkfd: Fix GPU mappings for APU after prefetch
Fix the following corner case:-
 Consider a 2M huge page SVM allocation, followed by prefetch call for
the first 4K page. The whole range is initially mapped with single PTE.
After the prefetch, this range gets split to first page + rest of the
pages. Currently, the first page mapping is not updated on MI300A (APU)
since page hasn't migrated. However, after range split PTE mapping it not
valid.

Fix this by forcing page table update for the whole range when prefetch
is called.  Calling prefetch on APU doesn't improve performance. If all
it deteriotes. However, functionality has to be supported.

v2: Use apu_prefer_gtt as this issue doesn't apply to APUs with carveout
VRAM

v3: Simplify by setting the flag for all ASICs as it doesn't affect dGPU

v4: Remove v2 and v3 changes. Force update_mapping when range is split
at a size that is not aligned to prange granularity

Suggested-by: Philip Yang <Philip.Yang@amd.com>
Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
Reviewed-by: Philip Yang<Philip.Yang@amd.com>
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 076470b9f6)
2025-11-11 22:52:51 -05:00
..
acp
amdgpu drm/amdgpu/jpeg: Add parse_cs for JPEG5_0_1 2025-11-11 22:51:49 -05:00
amdkfd drm/amdkfd: Fix GPU mappings for APU after prefetch 2025-11-11 22:52:51 -05:00
amdxcp drm/amd/amdgpu: Release xcp drm memory after unplug 2025-08-04 14:35:48 -04:00
display drm/amd/display: Allow VRR params change if unsynced with the stream 2025-11-11 22:50:53 -05:00
include drm/amdgpu: fix SPDX header on irqsrcs_vcn_5_0.h 2025-10-28 11:02:49 -04:00
pm drm/amdgpu/smu: Handle S0ix for vangogh 2025-11-04 13:39:27 -05:00
ras/rascore drm/amd/ras: Add rascore status definition 2025-09-23 10:36:02 -04:00