diff options
| author | Nirmoy Das <[email protected]> | 2021-03-08 13:00:06 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2021-04-09 20:45:12 +0000 |
| commit | 9fd5543e9552acff859af7f154bd3402b7983dc5 (patch) | |
| tree | 91a97299d90c85cb85cc538018ea8d376df0b3b2 /drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | |
| parent | drm/amdgpu: load balance VCN3 decode as well v8 (diff) | |
| download | kernel-9fd5543e9552acff859af7f154bd3402b7983dc5.tar.gz kernel-9fd5543e9552acff859af7f154bd3402b7983dc5.zip | |
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 <[email protected]>
Reviewed-by: Christian König <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c index 5807cad833d3..c5a9a4fb10d2 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c @@ -126,6 +126,8 @@ int amdgpu_gart_table_vram_alloc(struct amdgpu_device *adev) AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS; bp.type = ttm_bo_type_kernel; bp.resv = NULL; + bp.bo_ptr_size = sizeof(struct amdgpu_bo); + r = amdgpu_bo_create(adev, &bp, &adev->gart.bo); if (r) { return r; |
