diff options
author | Takashi Iwai <tiwai@suse.de> | 2022-08-01 08:11:19 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2022-08-01 08:11:19 +0200 |
commit | 9769e44d41a1359b9000ff8458f0f2f66080ebf4 (patch) | |
tree | e91d2d71fd469c2fa9289fed87f0bb4fded196a5 /drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | |
parent | f38e6458e16df7bac3871f4e69f9681c0b3c58bd (diff) | |
parent | be561ffad708f0cee18aee4231f80ffafaf7a419 (diff) |
Merge branch 'for-next' into for-linus
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c index a0c0b7d9f444..7f4b480ae66e 100644 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c @@ -638,6 +638,12 @@ static int gmc_v11_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) && !amdgpu_passthrough(adev)) { + adev->gmc.aper_base = adev->mmhub.funcs->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) |