aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArvind Yadav <arvind.yadav.cs@gmail.com>2017-07-02 05:13:58 -0400
committerAlex Deucher <alexander.deucher@amd.com>2017-07-14 11:06:03 -0400
commit1aaa56029f47e16f9d03e25a313677f16212ad72 (patch)
tree5408f83f413733ded0cf362d420cc87e7c7d4d81
parentc4fc445a9ded54cfbe4fca6299c0fcb7dcd0b47b (diff)
drm: amd: amdgpu: constify ttm_place structures.
ttm_place are not supposed to change at runtime. All functions working with ttm_place provided by <drm/ttm/ttm_placement.h> work with const ttm_place. So mark the non-const structs as const. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
index 7064d31f0be5..ace178b393dd 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
@@ -186,7 +186,7 @@ static void amdgpu_evict_flags(struct ttm_buffer_object *bo,
186{ 186{
187 struct amdgpu_device *adev = amdgpu_ttm_adev(bo->bdev); 187 struct amdgpu_device *adev = amdgpu_ttm_adev(bo->bdev);
188 struct amdgpu_bo *abo; 188 struct amdgpu_bo *abo;
189 static struct ttm_place placements = { 189 static const struct ttm_place placements = {
190 .fpfn = 0, 190 .fpfn = 0,
191 .lpfn = 0, 191 .lpfn = 0,
192 .flags = TTM_PL_MASK_CACHING | TTM_PL_FLAG_SYSTEM 192 .flags = TTM_PL_MASK_CACHING | TTM_PL_FLAG_SYSTEM