drm/amdgpu: Move MAX_MEM_RANGES to amdgpu_gmc.h

This relocation allows MAX_MEM_RANGES to be shared
across multiple products

Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Hawking Zhang
2025-06-13 19:58:49 +08:00
committed by Alex Deucher
parent f268cef77e
commit 97c894758b
2 changed files with 4 additions and 4 deletions

View File

@@ -78,8 +78,6 @@
#define mmHUBP0_DCSURF_PRI_VIEWPORT_DIMENSION_DCN2 0x05ea
#define mmHUBP0_DCSURF_PRI_VIEWPORT_DIMENSION_DCN2_BASE_IDX 2
#define MAX_MEM_RANGES 8
static const char * const gfxhub_client_ids[] = {
"CB",
"DB",
@@ -1934,7 +1932,7 @@ gmc_v9_0_init_acpi_mem_ranges(struct amdgpu_device *adev,
struct amdgpu_mem_partition_info *mem_ranges)
{
struct amdgpu_numa_info numa_info;
int node_ids[MAX_MEM_RANGES];
int node_ids[AMDGPU_MAX_MEM_RANGES];
int num_ranges = 0, ret;
int num_xcc, xcc_id;
uint32_t xcc_mask;
@@ -2042,7 +2040,7 @@ static int gmc_v9_0_init_mem_ranges(struct amdgpu_device *adev)
{
bool valid;
adev->gmc.mem_partitions = kcalloc(MAX_MEM_RANGES,
adev->gmc.mem_partitions = kcalloc(AMDGPU_MAX_MEM_RANGES,
sizeof(struct amdgpu_mem_partition_info),
GFP_KERNEL);
if (!adev->gmc.mem_partitions)