Skip to content

Commit

Permalink
drm/amdgpu: further mitigate workaround for i915
Browse files Browse the repository at this point in the history
Disable the workaround on imported BOs as well.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexdeucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
Christian König authored and Alex Deucher committed Mar 7, 2018
1 parent d9a1376 commit 59dd477
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,18 @@ amdgpu_gem_prime_import_sg_table(struct drm_device *dev,
ww_mutex_lock(&resv->lock, NULL);
ret = amdgpu_bo_create(adev, attach->dmabuf->size, PAGE_SIZE, false,
AMDGPU_GEM_DOMAIN_GTT, 0, sg, resv, &bo);
ww_mutex_unlock(&resv->lock);
if (ret)
return ERR_PTR(ret);
goto error;

if (attach->dmabuf->ops != &amdgpu_dmabuf_ops)
bo->prime_shared_count = 1;

bo->prime_shared_count = 1;
ww_mutex_unlock(&resv->lock);
return &bo->gem_base;

error:
ww_mutex_unlock(&resv->lock);
return ERR_PTR(ret);
}

static int amdgpu_gem_map_attach(struct dma_buf *dma_buf,
Expand Down

0 comments on commit 59dd477

Please sign in to comment.