diff options
author | Chunming Zhou <David1.Zhou@amd.com> | 2017-01-16 10:45:50 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-05-24 17:41:09 -0400 |
commit | bc099ee974fbbd1a109e4390ae16d6bdf0e74e89 (patch) | |
tree | d3ab2ef1cacb0a9b7d1782b9f3b272a47aceef6d /drivers | |
parent | 2d8e898e097cba408f7df9ba81cab9ba6ced4e4d (diff) |
drm/amdgpu/gmc9: change fb offset sequence so that used wider
Initialize the values earlier.
Signed-off-by: Chunming Zhou <David1.Zhou@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c index a29a31f5b012..787d20b5bbb9 100644 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c @@ -415,6 +415,11 @@ static void gmc_v9_0_vram_gtt_location(struct amdgpu_device *adev, amdgpu_vram_location(adev, &adev->mc, base); adev->mc.gtt_base_align = 0; amdgpu_gtt_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; } /** @@ -547,12 +552,6 @@ static int gmc_v9_0_vm_init(struct amdgpu_device *adev) adev->vm_manager.num_level = 3; amdgpu_vm_manager_init(adev); - /* 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; - return 0; } |