diff options
| author | Christian König <[email protected]> | 2018-08-21 15:18:22 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2018-08-27 16:11:19 +0000 |
| commit | 4e830fb1b5f589352e711fc0df515c34e978e1a0 (patch) | |
| tree | 4b62f781db8cb8fb51bfc1dfe87d0302483e8eda /drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | |
| parent | drm/amdgpu: rename gart.robj into gart.bo (diff) | |
| download | kernel-4e830fb1b5f589352e711fc0df515c34e978e1a0.tar.gz kernel-4e830fb1b5f589352e711fc0df515c34e978e1a0.zip | |
drm/amdgpu: remove gart.table_addr
We can easily figure out the address on the fly.
Signed-off-by: Christian König <[email protected]>
Reviewed-by: Junwei Zhang <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c b/drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c index acfbd2d749cf..2baab7e69ef5 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c @@ -37,11 +37,10 @@ u64 gfxhub_v1_0_get_mc_fb_offset(struct amdgpu_device *adev) static void gfxhub_v1_0_init_gart_pt_regs(struct amdgpu_device *adev) { - uint64_t value; + uint64_t value = amdgpu_bo_gpu_offset(adev->gart.bo); - BUG_ON(adev->gart.table_addr & (~0x0000FFFFFFFFF000ULL)); - value = adev->gart.table_addr - adev->gmc.vram_start - + adev->vm_manager.vram_base_offset; + BUG_ON(value & (~0x0000FFFFFFFFF000ULL)); + value -= adev->gmc.vram_start + adev->vm_manager.vram_base_offset; value &= 0x0000FFFFFFFFF000ULL; value |= 0x1; /*valid bit*/ |
