On Mon, Nov 12, 2018 at 12:02 PM Liu, Shaoyun <Shaoyun.Liu@xxxxxxx> wrote: > > In XGMI configuration, the FB region covers vram region from peer > device, adjust system aperture to cover all of them > > Change-Id: I15b14727bbd11f7c2a237fb6ca7b32fb708b2e32 > Signed-off-by: shaoyunl <shaoyun.liu@xxxxxxx> Reviewed-by: Alex Deucher <alexander.deucher@xxxxxxx> > --- > drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 6 +++--- > drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 6 +++--- > 2 files changed, 6 insertions(+), 6 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c b/drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c > index 6a48cad..f5edddf 100644 > --- a/drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c > +++ b/drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c > @@ -77,7 +77,7 @@ static void gfxhub_v1_0_init_system_aperture_regs(struct amdgpu_device *adev) > > /* Program the system aperture low logical page number. */ > WREG32_SOC15(GC, 0, mmMC_VM_SYSTEM_APERTURE_LOW_ADDR, > - min(adev->gmc.vram_start, adev->gmc.agp_start) >> 18); > + min(adev->gmc.fb_start, adev->gmc.agp_start) >> 18); > > if (adev->asic_type == CHIP_RAVEN && adev->rev_id >= 0x8) > /* > @@ -87,11 +87,11 @@ static void gfxhub_v1_0_init_system_aperture_regs(struct amdgpu_device *adev) > * to get rid of the VM fault and hardware hang. > */ > WREG32_SOC15(GC, 0, mmMC_VM_SYSTEM_APERTURE_HIGH_ADDR, > - max((adev->gmc.vram_end >> 18) + 0x1, > + max((adev->gmc.fb_end >> 18) + 0x1, > adev->gmc.agp_end >> 18)); > else > WREG32_SOC15(GC, 0, mmMC_VM_SYSTEM_APERTURE_HIGH_ADDR, > - max(adev->gmc.vram_end, adev->gmc.agp_end) >> 18); > + max(adev->gmc.fb_end, adev->gmc.agp_end) >> 18); > > /* Set default page address. */ > value = adev->vram_scratch.gpu_addr - adev->gmc.vram_start > diff --git a/drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c b/drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c > index 3881a42..d0d966d 100644 > --- a/drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c > +++ b/drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c > @@ -95,7 +95,7 @@ static void mmhub_v1_0_init_system_aperture_regs(struct amdgpu_device *adev) > > /* Program the system aperture low logical page number. */ > WREG32_SOC15(MMHUB, 0, mmMC_VM_SYSTEM_APERTURE_LOW_ADDR, > - min(adev->gmc.vram_start, adev->gmc.agp_start) >> 18); > + min(adev->gmc.fb_start, adev->gmc.agp_start) >> 18); > > if (adev->asic_type == CHIP_RAVEN && adev->rev_id >= 0x8) > /* > @@ -105,11 +105,11 @@ static void mmhub_v1_0_init_system_aperture_regs(struct amdgpu_device *adev) > * to get rid of the VM fault and hardware hang. > */ > WREG32_SOC15(MMHUB, 0, mmMC_VM_SYSTEM_APERTURE_HIGH_ADDR, > - max((adev->gmc.vram_end >> 18) + 0x1, > + max((adev->gmc.fb_end >> 18) + 0x1, > adev->gmc.agp_end >> 18)); > else > WREG32_SOC15(MMHUB, 0, mmMC_VM_SYSTEM_APERTURE_HIGH_ADDR, > - max(adev->gmc.vram_end, adev->gmc.agp_end) >> 18); > + max(adev->gmc.fb_end, adev->gmc.agp_end) >> 18); > > /* Set default page address. */ > value = adev->vram_scratch.gpu_addr - adev->gmc.vram_start + > -- > 2.7.4 > > _______________________________________________ > amd-gfx mailing list > amd-gfx@xxxxxxxxxxxxxxxxxxxxx > https://lists.freedesktop.org/mailman/listinfo/amd-gfx _______________________________________________ amd-gfx mailing list amd-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/amd-gfx