diff options
author | Chunming Zhou <david1.zhou@amd.com> | 2018-01-17 16:51:16 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-02-19 14:17:57 -0500 |
commit | 156a81be3f3a3e4a37b6d31efeb5abefdbf51e73 (patch) | |
tree | d56f281d940c99b76f44a682d04a9043d4d47f82 /drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | |
parent | 6df21b77263141f77e6c5757764bc390bf0d75f9 (diff) | |
download | op-kernel-dev-156a81be3f3a3e4a37b6d31efeb5abefdbf51e73.zip op-kernel-dev-156a81be3f3a3e4a37b6d31efeb5abefdbf51e73.tar.gz |
drm/amdgpu: all vram is visible for APU (v2)
missed in gmc9.
v2: squash in build fix (Rex)
Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c index f049c84..830cf8f 100644 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c @@ -729,6 +729,12 @@ static int gmc_v9_0_mc_init(struct amdgpu_device *adev) adev->gmc.aper_base = pci_resource_start(adev->pdev, 0); adev->gmc.aper_size = pci_resource_len(adev->pdev, 0); +#ifdef CONFIG_X86_64 + if (adev->flags & AMD_IS_APU) { + adev->gmc.aper_base = gfxhub_v1_0_get_mc_fb_offset(adev); + adev->gmc.aper_size = adev->gmc.real_vram_size; + } +#endif /* In case the PCI BAR is larger than the actual amount of vram */ adev->gmc.visible_vram_size = adev->gmc.aper_size; if (adev->gmc.visible_vram_size > adev->gmc.real_vram_size) |