mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
drm/amdgpu: Use NPS ranges from discovery table
Add GMC API to fetch NPS range information from discovery table. Use NPS range information in GMC 9.4.3 SOCs when available, otherwise fallback to software method. Signed-off-by: Lijo Lazar <lijo.lazar@amd.com> Reviewed-by: Le Ma <le.ma@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
@@ -199,6 +199,13 @@ struct amdgpu_mem_partition_info {
|
||||
|
||||
#define INVALID_PFN -1
|
||||
|
||||
struct amdgpu_gmc_memrange {
|
||||
uint64_t base_address;
|
||||
uint64_t limit_address;
|
||||
uint32_t flags;
|
||||
int nid_mask;
|
||||
};
|
||||
|
||||
enum amdgpu_gart_placement {
|
||||
AMDGPU_GART_PLACEMENT_BEST_FIT = 0,
|
||||
AMDGPU_GART_PLACEMENT_HIGH,
|
||||
@@ -439,4 +446,8 @@ int amdgpu_gmc_vram_checking(struct amdgpu_device *adev);
|
||||
int amdgpu_gmc_sysfs_init(struct amdgpu_device *adev);
|
||||
void amdgpu_gmc_sysfs_fini(struct amdgpu_device *adev);
|
||||
|
||||
int amdgpu_gmc_get_nps_memranges(struct amdgpu_device *adev,
|
||||
struct amdgpu_mem_partition_info *mem_ranges,
|
||||
int exp_ranges);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user