diff options
| author | Christian König <[email protected]> | 2020-12-09 14:07:50 +0000 |
|---|---|---|
| committer | Christian König <[email protected]> | 2020-12-14 13:20:46 +0000 |
| commit | e11bfb99d6ece23b772b57c29fa80448639fd6e5 (patch) | |
| tree | dec88f65673c213ab7dfa71ddda4fd864cc09095 /drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | |
| parent | drm/drv: Remove invalid assignments (diff) | |
| download | kernel-e11bfb99d6ece23b772b57c29fa80448639fd6e5.tar.gz kernel-e11bfb99d6ece23b772b57c29fa80448639fd6e5.zip | |
drm/ttm: cleanup BO size handling v3
Based on an idea from Dave, but cleaned up a bit.
We had multiple fields for essentially the same thing.
Now bo->base.size is the original size of the BO in
arbitrary units, usually bytes.
bo->mem.num_pages is the size in number of pages in the
resource domain of bo->mem.mem_type.
v2: use the GEM object size instead of the BO size
v3: fix printks in some places
Signed-off-by: Christian König <[email protected]>
Reviewed-by: Huang Rui <[email protected]> (v1)
Acked-by: Daniel Vetter <[email protected]>
Link: https://patchwork.freedesktop.org/patch/406831/
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_object.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c index c6c9723d3d8a..381ecc4788d5 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c @@ -787,7 +787,7 @@ int amdgpu_bo_kmap(struct amdgpu_bo *bo, void **ptr) if (r < 0) return r; - r = ttm_bo_kmap(&bo->tbo, 0, bo->tbo.num_pages, &bo->kmap); + r = ttm_bo_kmap(&bo->tbo, 0, bo->tbo.mem.num_pages, &bo->kmap); if (r) return r; |
