Skip to content

Commit

Permalink
drm/amdgpu: Add memory partitions to gmc
Browse files Browse the repository at this point in the history
Some ASICs have the device memory divided into multiple partitions. The
parititions could be denoted by a numa node or by a range of pages.

Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Le Ma <le.ma@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
Lijo Lazar authored and Alex Deucher committed Jun 9, 2023
1 parent fa0497c commit 14493cb
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,21 @@ struct amdgpu_xgmi {
struct amdgpu_xgmi_ras *ras;
};

struct amdgpu_mem_partition_info {
union {
struct {
uint32_t fpfn;
uint32_t lpfn;
} range;
struct {
int node;
} numa;
};
uint64_t size;
};

#define INVALID_PFN -1

struct amdgpu_gmc {
/* FB's physical address in MMIO space (for CPU to
* map FB). This is different compared to the agp/
Expand Down Expand Up @@ -266,6 +281,8 @@ struct amdgpu_gmc {
bool tmz_enabled;
bool is_app_apu;

struct amdgpu_mem_partition_info *mem_partitions;
uint8_t num_mem_partitions;
const struct amdgpu_gmc_funcs *gmc_funcs;

struct amdgpu_xgmi xgmi;
Expand Down

0 comments on commit 14493cb

Please sign in to comment.