Commit bf314ca3 authored by Christian König's avatar Christian König Committed by Alex Deucher

drm/amdgpu: reduce the number of placements for a BO

Make struct amdgpu_bo a bit smaller.
Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent c704ab18
...@@ -216,6 +216,8 @@ void amdgpu_bo_placement_from_domain(struct amdgpu_bo *abo, u32 domain) ...@@ -216,6 +216,8 @@ void amdgpu_bo_placement_from_domain(struct amdgpu_bo *abo, u32 domain)
c++; c++;
} }
BUG_ON(c >= AMDGPU_BO_MAX_PLACEMENTS);
placement->num_placement = c; placement->num_placement = c;
placement->placement = places; placement->placement = places;
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include "amdgpu.h" #include "amdgpu.h"
#define AMDGPU_BO_INVALID_OFFSET LONG_MAX #define AMDGPU_BO_INVALID_OFFSET LONG_MAX
#define AMDGPU_BO_MAX_PLACEMENTS 3
struct amdgpu_bo_param { struct amdgpu_bo_param {
unsigned long size; unsigned long size;
...@@ -77,7 +78,7 @@ struct amdgpu_bo { ...@@ -77,7 +78,7 @@ struct amdgpu_bo {
/* Protected by tbo.reserved */ /* Protected by tbo.reserved */
u32 preferred_domains; u32 preferred_domains;
u32 allowed_domains; u32 allowed_domains;
struct ttm_place placements[AMDGPU_GEM_DOMAIN_MAX + 1]; struct ttm_place placements[AMDGPU_BO_MAX_PLACEMENTS];
struct ttm_placement placement; struct ttm_placement placement;
struct ttm_buffer_object tbo; struct ttm_buffer_object tbo;
struct ttm_bo_kmap_obj kmap; struct ttm_bo_kmap_obj kmap;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment