Commit 053d35de authored by Alex Deucher's avatar Alex Deucher

drm/amdgpu: store the mall size in the gmc structure

This will be useful in future patches.
Acked-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 8eece29c
......@@ -257,6 +257,9 @@ struct amdgpu_gmc {
struct amdgpu_bo *pdb0_bo;
/* CPU kmapped address of pdb0*/
void *ptr_pdb0;
/* MALL size */
u64 mall_size;
};
#define amdgpu_gmc_flush_gpu_tlb(adev, vmid, vmhub, type) ((adev)->gmc.gmc_funcs->flush_gpu_tlb((adev), (vmid), (vmhub), (type)))
......
......@@ -883,6 +883,24 @@ static int gmc_v10_0_sw_init(void *handle)
adev->gmc.vram_vendor = vram_vendor;
}
switch (adev->ip_versions[GC_HWIP][0]) {
case IP_VERSION(10, 3, 0):
adev->gmc.mall_size = 128 * 1024 * 1024;
break;
case IP_VERSION(10, 3, 2):
adev->gmc.mall_size = 96 * 1024 * 1024;
break;
case IP_VERSION(10, 3, 4):
adev->gmc.mall_size = 32 * 1024 * 1024;
break;
case IP_VERSION(10, 3, 5):
adev->gmc.mall_size = 16 * 1024 * 1024;
break;
default:
adev->gmc.mall_size = 0;
break;
}
switch (adev->ip_versions[GC_HWIP][0]) {
case IP_VERSION(10, 1, 10):
case IP_VERSION(10, 1, 1):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment