summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c
diff options
context:
space:
mode:
authorNirmoy Das <nirmoy.das@amd.com>2021-03-08 16:00:06 +0300
committerAlex Deucher <alexander.deucher@amd.com>2021-04-09 23:45:12 +0300
commit9fd5543e9552acff859af7f154bd3402b7983dc5 (patch)
tree91a97299d90c85cb85cc538018ea8d376df0b3b2 /drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c
parent87cc7f9ebf7ce10f82250002d667ef3e93a79d44 (diff)
downloadlinux-9fd5543e9552acff859af7f154bd3402b7983dc5.tar.xz
drm/amdgpu: allow variable BO struct creation
Allow allocating BO structures with different structure size than struct amdgpu_bo. v2: Check bo_ptr_size in all amdgpu_bo_create() caller. Signed-off-by: Nirmoy Das <nirmoy.das@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c
index d9b35df33806..313517f7cf10 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c
@@ -85,6 +85,8 @@ static void amdgpu_benchmark_move(struct amdgpu_device *adev, unsigned size,
bp.flags = 0;
bp.type = ttm_bo_type_kernel;
bp.resv = NULL;
+ bp.bo_ptr_size = sizeof(struct amdgpu_bo);
+
n = AMDGPU_BENCHMARK_ITERATIONS;
r = amdgpu_bo_create(adev, &bp, &sobj);
if (r) {