[PATCH 1/9] drm/amdgpu: Fix hardcoded base offset of vram pages
Christian König
ckoenig.leichtzumerken at gmail.com
Wed Feb 7 12:41:51 UTC 2018
Am 07.02.2018 um 13:34 schrieb Feifei Xu:
> In gmc_v9_0_vram_gtt_location(),the vram_base_offset is hardcoded
> to 0 in dGPU. Fix it by reading mmMC_VM_FB_OFFSET or return
> zfb_phys_addr if ZFB is enabled.
>
> Change-Id: I585b7d4d96ebab2a5d7178fe8d1d6a746ef0c72a
> Signed-off-by: Feifei Xu <Feifei.Xu at amd.com>
> Signed-off-by: Hawking Zhang <Hawking.Zhang at amd.com>
Reviewed-by: Christian König <christian.koenig at amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
> index 0a1868b..27f50c8 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
> @@ -686,10 +686,7 @@ static void gmc_v9_0_vram_gtt_location(struct amdgpu_device *adev,
> amdgpu_device_vram_location(adev, &adev->gmc, base);
> amdgpu_device_gart_location(adev, mc);
> /* base offset of vram pages */
> - if (adev->flags & AMD_IS_APU)
> - adev->vm_manager.vram_base_offset = gfxhub_v1_0_get_mc_fb_offset(adev);
> - else
> - adev->vm_manager.vram_base_offset = 0;
> + adev->vm_manager.vram_base_offset = gfxhub_v1_0_get_mc_fb_offset(adev);
> }
>
> /**
More information about the amd-gfx
mailing list