diff options
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) | |||
1845 | (unsigned)(gtt_size / (1024 * 1024))); | 1845 | (unsigned)(gtt_size / (1024 * 1024))); |
1846 | 1846 | ||
1847 | /* Initialize various on-chip memory pools */ | 1847 | /* Initialize various on-chip memory pools */ |
1848 | adev->gds.mem.total_size = adev->gds.mem.total_size << AMDGPU_GDS_SHIFT; | ||
1849 | adev->gds.mem.gfx_partition_size = adev->gds.mem.gfx_partition_size << AMDGPU_GDS_SHIFT; | ||
1850 | adev->gds.mem.cs_partition_size = adev->gds.mem.cs_partition_size << AMDGPU_GDS_SHIFT; | ||
1851 | adev->gds.gws.total_size = adev->gds.gws.total_size << AMDGPU_GWS_SHIFT; | ||
1852 | adev->gds.gws.gfx_partition_size = adev->gds.gws.gfx_partition_size << AMDGPU_GWS_SHIFT; | ||
1853 | adev->gds.gws.cs_partition_size = adev->gds.gws.cs_partition_size << AMDGPU_GWS_SHIFT; | ||
1854 | adev->gds.oa.total_size = adev->gds.oa.total_size << AMDGPU_OA_SHIFT; | ||
1855 | adev->gds.oa.gfx_partition_size = adev->gds.oa.gfx_partition_size << AMDGPU_OA_SHIFT; | ||
1856 | adev->gds.oa.cs_partition_size = adev->gds.oa.cs_partition_size << AMDGPU_OA_SHIFT; | ||
1857 | /* GDS Memory */ | 1848 | /* GDS Memory */ |
1858 | if (adev->gds.mem.total_size) { | 1849 | if (adev->gds.mem.total_size) { |
1859 | r = ttm_bo_init_mm(&adev->mman.bdev, AMDGPU_PL_GDS, | 1850 | r = ttm_bo_init_mm(&adev->mman.bdev, AMDGPU_PL_GDS, |
1860 | adev->gds.mem.total_size >> PAGE_SHIFT); | 1851 | adev->gds.mem.total_size); |
1861 | if (r) { | 1852 | if (r) { |
1862 | DRM_ERROR("Failed initializing GDS heap.\n"); | 1853 | DRM_ERROR("Failed initializing GDS heap.\n"); |
1863 | return r; | 1854 | return r; |
@@ -1867,7 +1858,7 @@ int amdgpu_ttm_init(struct amdgpu_device *adev) | |||
1867 | /* GWS */ | 1858 | /* GWS */ |
1868 | if (adev->gds.gws.total_size) { | 1859 | if (adev->gds.gws.total_size) { |
1869 | r = ttm_bo_init_mm(&adev->mman.bdev, AMDGPU_PL_GWS, | 1860 | r = ttm_bo_init_mm(&adev->mman.bdev, AMDGPU_PL_GWS, |
1870 | adev->gds.gws.total_size >> PAGE_SHIFT); | 1861 | adev->gds.gws.total_size); |
1871 | if (r) { | 1862 | if (r) { |
1872 | DRM_ERROR("Failed initializing gws heap.\n"); | 1863 | DRM_ERROR("Failed initializing gws heap.\n"); |
1873 | return r; | 1864 | return r; |
@@ -1877,7 +1868,7 @@ int amdgpu_ttm_init(struct amdgpu_device *adev) | |||
1877 | /* OA */ | 1868 | /* OA */ |
1878 | if (adev->gds.oa.total_size) { | 1869 | if (adev->gds.oa.total_size) { |
1879 | r = ttm_bo_init_mm(&adev->mman.bdev, AMDGPU_PL_OA, | 1870 | r = ttm_bo_init_mm(&adev->mman.bdev, AMDGPU_PL_OA, |
1880 | adev->gds.oa.total_size >> PAGE_SHIFT); | 1871 | adev->gds.oa.total_size); |
1881 | if (r) { | 1872 | if (r) { |
1882 | DRM_ERROR("Failed initializing oa heap.\n"); | 1873 | DRM_ERROR("Failed initializing oa heap.\n"); |
1883 | return r; | 1874 | return r; |