Skip to contentSkip to conversation

drm/amdgpu: all vram is visible for APU

PATCH In review Chunming Zhou 2 participants 2 messages Jan 17, 2018 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: all vram is visible for APU

missed in gmc9.

Change-Id I710044595454338edd770092100f13d6f46cb0fe
---
 drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +6 -0
index 7ec54c23c07d..995db2309f38 100644
@@ -728,6 +728,12 @@ static int gmc_v9_0_mc_init(struct amdgpu_device *adev)
 	adev->mc.aper_base = pci_resource_start(adev->pdev, 0);
 	adev->mc.aper_size = pci_resource_len(adev->pdev, 0);
 
+#ifdef CONFIG_X86_64
+	if (adev->flags & AMD_IS_APU) {
+		adev->mc.aper_base = gfxhub_v1_0_get_mc_fb_offset(adev);
+		adev->mc.aper_size = adev->mc.real_vram_size;
+	}
+#endif
 	/* In case the PCI BAR is larger than the actual amount of vram */
 	adev->mc.visible_vram_size = adev->mc.aper_size;
 	if (adev->mc.visible_vram_size > adev->mc.real_vram_size)
Signature · 6 lines
2.14.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): [email protected]

Reviewed-by
#2 lore raw

Am 17.01.2018 um 09:53 schrieb Chunming Zhou:

Quoted 4 lines

missed in gmc9.

Change-Id I710044595454338edd770092100f13d6f46cb0fe
Quoted 11 lines
---
  drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 6 ++++++
  1 file changed, 6 insertions(+)
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +0 -0
index 7ec54c23c07d..995db2309f38 100644
@@ -728,6 +728,12 @@ static int gmc_v9_0_mc_init(struct amdgpu_device *adev)
  	adev->mc.aper_base = pci_resource_start(adev->pdev, 0);
  	adev->mc.aper_size = pci_resource_len(adev->pdev, 0);

drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c static int gmc_v9_0_mc_init(struct amdgpu_device *adev) · line 739

Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +6 -0
 
+#ifdef CONFIG_X86_64
+	if (adev->flags & AMD_IS_APU) {
+		adev->mc.aper_base = gfxhub_v1_0_get_mc_fb_offset(adev);
+		adev->mc.aper_size = adev->mc.real_vram_size;
+	}
+#endif
  	/* In case the PCI BAR is larger than the actual amount of vram */
  	adev->mc.visible_vram_size = adev->mc.aper_size;
  	if (adev->mc.visible_vram_size > adev->mc.real_vram_size)

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx