diff options
author | Christian König <christian.koenig@amd.com> | 2021-04-15 09:52:58 +0200 |
---|---|---|
committer | Christian König <christian.koenig@amd.com> | 2021-06-04 15:16:45 +0200 |
commit | bfa3357ef9abc9d56a2910222d2deeb9f15c91ff (patch) | |
tree | d2e8e7898f21a3f39bf8b9961bdbf9fa619e9f0c /drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | |
parent | 4e566003571244f508408f59ce78f6ac2ccdba8e (diff) | |
download | linux-stable-bfa3357ef9abc9d56a2910222d2deeb9f15c91ff.tar.gz linux-stable-bfa3357ef9abc9d56a2910222d2deeb9f15c91ff.tar.bz2 linux-stable-bfa3357ef9abc9d56a2910222d2deeb9f15c91ff.zip |
drm/ttm: allocate resource object instead of embedding it v2
To improve the handling we want the establish the resource object as base
class for the backend allocations.
v2: add missing error handling
Signed-off-by: Christian König <christian.koenig@amd.com>
Acked-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210602100914.46246-1-christian.koenig@amd.com
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_object.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c index 03c6b63d1d54..59723c3d5826 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c @@ -362,14 +362,14 @@ int amdgpu_bo_create_kernel_at(struct amdgpu_device *adev, if (cpu_addr) amdgpu_bo_kunmap(*bo_ptr); - ttm_resource_free(&(*bo_ptr)->tbo, (*bo_ptr)->tbo.resource); + ttm_resource_free(&(*bo_ptr)->tbo, &(*bo_ptr)->tbo.resource); for (i = 0; i < (*bo_ptr)->placement.num_placement; ++i) { (*bo_ptr)->placements[i].fpfn = offset >> PAGE_SHIFT; (*bo_ptr)->placements[i].lpfn = (offset + size) >> PAGE_SHIFT; } r = ttm_bo_mem_space(&(*bo_ptr)->tbo, &(*bo_ptr)->placement, - (*bo_ptr)->tbo.resource, &ctx); + &(*bo_ptr)->tbo.resource, &ctx); if (r) goto error; |