aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
diff options
context:
space:
mode:
authorChristian König <[email protected]>2018-07-18 09:16:35 +0000
committerAlex Deucher <[email protected]>2018-07-25 20:06:13 +0000
commitbf314ca3f10d4ba4335808dc678631908881db8b (patch)
tree36e66a47cb29c7f379430b6221657f71bb402cb6 /drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
parentdrm/amdgpu: consistenly name amdgpu_bo_ functions (diff)
downloadkernel-bf314ca3f10d4ba4335808dc678631908881db8b.tar.gz
kernel-bf314ca3f10d4ba4335808dc678631908881db8b.zip
drm/amdgpu: reduce the number of placements for a BO
Make struct amdgpu_bo a bit smaller. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_object.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_object.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
index 7b3398c337f1..21bfa2d8039e 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
@@ -216,6 +216,8 @@ void amdgpu_bo_placement_from_domain(struct amdgpu_bo *abo, u32 domain)
c++;
}
+ BUG_ON(c >= AMDGPU_BO_MAX_PLACEMENTS);
+
placement->num_placement = c;
placement->placement = places;