summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2023-09-14 16:23:01 -0400
committerAlex Deucher <alexander.deucher@amd.com>2023-10-04 18:36:07 -0400
commit917f91d8d8e866965f2193d7962e064a4d139d8d (patch)
tree3bf31a2a679afde517fdab7e624b9eecb874aab7 /drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h
parent52ed23dc29db2fe80e8332200e66a0e5a5c20683 (diff)
downloadlinux-917f91d8d8e866965f2193d7962e064a4d139d8d.tar.gz
linux-917f91d8d8e866965f2193d7962e064a4d139d8d.tar.bz2
linux-917f91d8d8e866965f2193d7962e064a4d139d8d.zip
drm/amdgpu/gmc: add a way to force a particular placement for GART
We normally place GART based on the location of VRAM and the available address space around that, but provide an option to force a particular location for hardware that needs it. v2: Switch to passing the placement via parameter Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h
index f593259a66c3..e699d1ca8deb 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h
@@ -199,6 +199,12 @@ struct amdgpu_mem_partition_info {
#define INVALID_PFN -1
+enum amdgpu_gart_placement {
+ AMDGPU_GART_PLACEMENT_BEST_FIT = 0,
+ AMDGPU_GART_PLACEMENT_HIGH,
+ AMDGPU_GART_PLACEMENT_LOW,
+};
+
struct amdgpu_gmc {
/* FB's physical address in MMIO space (for CPU to
* map FB). This is different compared to the agp/
@@ -391,7 +397,8 @@ void amdgpu_gmc_sysvm_location(struct amdgpu_device *adev, struct amdgpu_gmc *mc
void amdgpu_gmc_vram_location(struct amdgpu_device *adev, struct amdgpu_gmc *mc,
u64 base);
void amdgpu_gmc_gart_location(struct amdgpu_device *adev,
- struct amdgpu_gmc *mc);
+ struct amdgpu_gmc *mc,
+ enum amdgpu_gart_placement gart_placement);
void amdgpu_gmc_agp_location(struct amdgpu_device *adev,
struct amdgpu_gmc *mc);
void amdgpu_gmc_set_agp_default(struct amdgpu_device *adev,