diff options
author | Christian König <christian.koenig@amd.com> | 2018-09-14 16:06:31 +0200 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-09-19 12:38:48 -0500 |
commit | 77a2faa55c1a497f4e7e89eabd11830f0e3cb3dd (patch) | |
tree | 6c0eb5f3977246e97ae34339b72b45bd1a65ac21 /drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | |
parent | 403009bfba45163887398652762ed1fc6645181c (diff) | |
download | linux-77a2faa55c1a497f4e7e89eabd11830f0e3cb3dd.tar.bz2 |
drm/amdgpu: fix up GDS/GWS/OA shifting
That only worked by pure coincident. Completely remove the shifting and
always apply correct PAGE_SHIFT.
Signed-off-by: Christian König <christian.koenig@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index d61910873627..0c4ab72474e4 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c @@ -1845,19 +1845,10 @@ int amdgpu_ttm_init(struct amdgpu_device *adev) (unsigned)(gtt_size / (1024 * 1024))); /* Initialize various on-chip memory pools */ - adev->gds.mem.total_size = adev->gds.mem.total_size << AMDGPU_GDS_SHIFT; - adev->gds.mem.gfx_partition_size = adev->gds.mem.gfx_partition_size << AMDGPU_GDS_SHIFT; - adev->gds.mem.cs_partition_size = adev->gds.mem.cs_partition_size << AMDGPU_GDS_SHIFT; - adev->gds.gws.total_size = adev->gds.gws.total_size << AMDGPU_GWS_SHIFT; - adev->gds.gws.gfx_partition_size = adev->gds.gws.gfx_partition_size << AMDGPU_GWS_SHIFT; - adev->gds.gws.cs_partition_size = adev->gds.gws.cs_partition_size << AMDGPU_GWS_SHIFT; - adev->gds.oa.total_size = adev->gds.oa.total_size << AMDGPU_OA_SHIFT; - adev->gds.oa.gfx_partition_size = adev->gds.oa.gfx_partition_size << AMDGPU_OA_SHIFT; - adev->gds.oa.cs_partition_size = adev->gds.oa.cs_partition_size << AMDGPU_OA_SHIFT; /* GDS Memory */ if (adev->gds.mem.total_size) { r = ttm_bo_init_mm(&adev->mman.bdev, AMDGPU_PL_GDS, - adev->gds.mem.total_size >> PAGE_SHIFT); + adev->gds.mem.total_size); if (r) { DRM_ERROR("Failed initializing GDS heap.\n"); return r; @@ -1867,7 +1858,7 @@ int amdgpu_ttm_init(struct amdgpu_device *adev) /* GWS */ if (adev->gds.gws.total_size) { r = ttm_bo_init_mm(&adev->mman.bdev, AMDGPU_PL_GWS, - adev->gds.gws.total_size >> PAGE_SHIFT); + adev->gds.gws.total_size); if (r) { DRM_ERROR("Failed initializing gws heap.\n"); return r; @@ -1877,7 +1868,7 @@ int amdgpu_ttm_init(struct amdgpu_device *adev) /* OA */ if (adev->gds.oa.total_size) { r = ttm_bo_init_mm(&adev->mman.bdev, AMDGPU_PL_OA, - adev->gds.oa.total_size >> PAGE_SHIFT); + adev->gds.oa.total_size); if (r) { DRM_ERROR("Failed initializing oa heap.\n"); return r; |