[PATCH v3 3/9] drm/amdgpu/ttm: Add New AMDGPU_PL_MMIO_REMAP Placement
Alex Deucher
alexdeucher at gmail.com
Thu Aug 28 15:21:17 UTC 2025
On Thu, Aug 28, 2025 at 5:53 AM Srinivasan Shanmugam
<srinivasan.shanmugam at amd.com> wrote:
>
> Introduce a kernel-internal TTM placement type AMDGPU_PL_MMIO_REMAP
> for the HDP flush MMIO remap page
>
> Plumbing added:
> - amdgpu_res_cursor.{first,next}: treat MMIO_REMAP like DOORBELL
> - amdgpu_ttm_io_mem_reserve(): return BAR bus address + offset
> for MMIO_REMAP, mark as uncached I/O
> - amdgpu_ttm_io_mem_pfn(): PFN from register BAR
> - amdgpu_res_cpu_visible(): visible to CPU
> - amdgpu_evict_flags()/amdgpu_bo_move(): non-migratable
> - amdgpu_ttm_tt_pde_flags(): map as SYSTEM
> - amdgpu_bo_mem_stats_placement(): report AMDGPU_PL_MMIO_REMAP
> - amdgpu_fdinfo: print “mmioremap” bucket label
>
> Cc: Alex Deucher <alexander.deucher at amd.com>
> Suggested-by: Christian König <christian.koenig at amd.com>
> Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam at amd.com>
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h
> index 2309df3f68a9..bb17987f0447 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h
> @@ -34,7 +34,8 @@
> #define AMDGPU_PL_OA (TTM_PL_PRIV + 2)
> #define AMDGPU_PL_PREEMPT (TTM_PL_PRIV + 3)
> #define AMDGPU_PL_DOORBELL (TTM_PL_PRIV + 4)
> -#define __AMDGPU_PL_NUM (TTM_PL_PRIV + 5)
> +#define AMDGPU_PL_MMIO_REMAP (TTM_PL_PRIV + 5)
> +#define __AMDGPU_PL_NUM (TTM_PL_PRIV + 6)
>
> #define AMDGPU_GTT_MAX_TRANSFER_SIZE 512
> #define AMDGPU_GTT_NUM_TRANSFER_WINDOWS 2
> --
> 2.34.1
>
More information about the amd-gfx
mailing list