aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c
diff options
context:
space:
mode:
authorChristian König <[email protected]>2021-04-12 13:11:47 +0000
committerChristian König <[email protected]>2021-06-02 09:07:25 +0000
commitd3116756a710e3cd51293a9d58b525957ab7e784 (patch)
treefde36f419dfcaadc3386320f9170cc8b14a35701 /drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c
parentdrm: Fix misleading documentation of drm_gem_cma_create() (diff)
downloadkernel-d3116756a710e3cd51293a9d58b525957ab7e784.tar.gz
kernel-d3116756a710e3cd51293a9d58b525957ab7e784.zip
drm/ttm: rename bo->mem and make it a pointer
When we want to decouble resource management from buffer management we need to be able to handle resources separately. Add a resource pointer and rename bo->mem so that all code needs to change to access the pointer instead. No functional change. Signed-off-by: Christian König <[email protected]> Reviewed-by: Matthew Auld <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c
index 6a84c9778cc0..fac563fb6f0c 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c
@@ -122,7 +122,7 @@ static int amdgpu_gtt_mgr_new(struct ttm_resource_manager *man,
int r;
spin_lock(&mgr->lock);
- if ((&tbo->mem == mem || tbo->mem.mem_type != TTM_PL_TT) &&
+ if ((tbo->resource == mem || tbo->resource->mem_type != TTM_PL_TT) &&
atomic64_read(&mgr->available) < mem->num_pages) {
spin_unlock(&mgr->lock);
return -ENOSPC;