Commit 14493cb9 authored by Lijo Lazar's avatar Lijo Lazar Committed by Alex Deucher
Browse files

drm/amdgpu: Add memory partitions to gmc



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: default avatarLijo Lazar <lijo.lazar@amd.com>
Reviewed-by: default avatarLe Ma <le.ma@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent fa0497c3
Loading
Loading
Loading
Loading
+17 −0
Original line number Original line Diff line number Diff line
@@ -178,6 +178,21 @@ struct amdgpu_xgmi {
	struct amdgpu_xgmi_ras *ras;
	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 {
struct amdgpu_gmc {
	/* FB's physical address in MMIO space (for CPU to
	/* FB's physical address in MMIO space (for CPU to
	 * map FB). This is different compared to the agp/
	 * map FB). This is different compared to the agp/
@@ -266,6 +281,8 @@ struct amdgpu_gmc {
	bool tmz_enabled;
	bool tmz_enabled;
	bool is_app_apu;
	bool is_app_apu;


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


	struct amdgpu_xgmi xgmi;
	struct amdgpu_xgmi xgmi;