aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c
diff options
context:
space:
mode:
authorChristian König <[email protected]>2020-09-21 13:55:39 +0000
committerChristian König <[email protected]>2020-09-24 14:16:50 +0000
commit4671078eb8e390bd44c458e2f482fbb61f5bc612 (patch)
tree1de180ec8005bb8c8b26159eea3387e5a7ec09d1 /drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c
parentdrm/radeon: switch over to the new pin interface (diff)
downloadkernel-4671078eb8e390bd44c458e2f482fbb61f5bc612.tar.gz
kernel-4671078eb8e390bd44c458e2f482fbb61f5bc612.zip
drm/amdgpu: switch over to the new pin interface
Stop using TTM_PL_FLAG_NO_EVICT. Signed-off-by: Christian König <[email protected]> Tested-by: Nirmoy Das <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Huang Rui <[email protected]> Link: https://patchwork.freedesktop.org/patch/391617/?series=81973&rev=1
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c
index 957934926b24..5b465ab774d1 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c
@@ -281,7 +281,7 @@ static struct sg_table *amdgpu_dma_buf_map(struct dma_buf_attachment *attach,
struct sg_table *sgt;
long r;
- if (!bo->pin_count) {
+ if (!bo->tbo.pin_count) {
/* move buffer into GTT or VRAM */
struct ttm_operation_ctx ctx = { false, false };
unsigned domains = AMDGPU_GEM_DOMAIN_GTT;
@@ -390,7 +390,8 @@ static int amdgpu_dma_buf_begin_cpu_access(struct dma_buf *dma_buf,
if (unlikely(ret != 0))
return ret;
- if (!bo->pin_count && (bo->allowed_domains & AMDGPU_GEM_DOMAIN_GTT)) {
+ if (!bo->tbo.pin_count &&
+ (bo->allowed_domains & AMDGPU_GEM_DOMAIN_GTT)) {
amdgpu_bo_placement_from_domain(bo, AMDGPU_GEM_DOMAIN_GTT);
ret = ttm_bo_validate(&bo->tbo, &bo->placement, &ctx);
}