summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/gfxhub_v1_1.c
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2018-06-19 16:11:56 -0500
committerAlex Deucher <alexander.deucher@amd.com>2018-09-10 22:47:34 -0500
commit6fdd68b14a943ead1d0ce1c0c7023cd2dbfde4c2 (patch)
tree921555fbb9f3274f1984c9de9fd6b10fe0e567a2 /drivers/gpu/drm/amd/amdgpu/gfxhub_v1_1.c
parentbf0a60b78b61a7b31bb22e60cc7b2e7fc538d38f (diff)
drm/amdgpu/gmc9: Adjust GART and AGP location with xgmi offset (v2)
On hives with xgmi enabled, the fb_location aperture is a size which defines the total framebuffer size of all nodes in the hive. Each GPU in the hive has the same view via the fb_location aperture. GPU0 starts at offset (0 * segment size), GPU1 starts at offset (1 * segment size), etc. For access to local vram on each GPU, we need to take this offset into account. This including on setting up GPUVM page table and GART table v2: squash in "drm/amdgpu: Init correct fb region for none XGMI configuration" Acked-by: Huang Rui <ray.huang@amd.com> Acked-by: Slava Abramov <slava.abramov@amd.com> Signed-off-by: Shaoyun Liu <Shaoyun.Liu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com> Acked-by: Huang Rui <ray.huang@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/gfxhub_v1_1.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gfxhub_v1_1.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfxhub_v1_1.c b/drivers/gpu/drm/amd/amdgpu/gfxhub_v1_1.c
index d4170cb41055..5e9ab8eb214a 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfxhub_v1_1.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfxhub_v1_1.c
@@ -44,6 +44,9 @@ int gfxhub_v1_1_get_xgmi_info(struct amdgpu_device *adev)
REG_GET_FIELD(xgmi_lfb_cntl, MC_VM_XGMI_LFB_CNTL, PF_LFB_REGION);
if (adev->gmc.xgmi.physical_node_id > 3)
return -EINVAL;
+ adev->gmc.xgmi.node_segment_size = REG_GET_FIELD(
+ RREG32_SOC15(GC, 0, mmMC_VM_XGMI_LFB_SIZE),
+ MC_VM_XGMI_LFB_SIZE, PF_LFB_SIZE) << 24;
}
return 0;