diff options
author | Christian König <christian.koenig@amd.com> | 2018-02-20 13:51:02 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-03-07 16:10:12 -0500 |
commit | 59dd47728625e6f8e77f888d00596c9fb7057540 (patch) | |
tree | e411fb0dc4c2fee28e08a71bff183c00c61eaaff | |
parent | d9a1376623ef8cc7447da654a76b6b7127f9dd7b (diff) |
drm/amdgpu: further mitigate workaround for i915
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>
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c index 8ce74a1d9966..fb66b45548d3 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c | |||
@@ -107,12 +107,18 @@ amdgpu_gem_prime_import_sg_table(struct drm_device *dev, | |||
107 | ww_mutex_lock(&resv->lock, NULL); | 107 | ww_mutex_lock(&resv->lock, NULL); |
108 | ret = amdgpu_bo_create(adev, attach->dmabuf->size, PAGE_SIZE, false, | 108 | ret = amdgpu_bo_create(adev, attach->dmabuf->size, PAGE_SIZE, false, |
109 | AMDGPU_GEM_DOMAIN_GTT, 0, sg, resv, &bo); | 109 | AMDGPU_GEM_DOMAIN_GTT, 0, sg, resv, &bo); |
110 | ww_mutex_unlock(&resv->lock); | ||
111 | if (ret) | 110 | if (ret) |
112 | return ERR_PTR(ret); | 111 | goto error; |
112 | |||
113 | if (attach->dmabuf->ops != &amdgpu_dmabuf_ops) | ||
114 | bo->prime_shared_count = 1; | ||
113 | 115 | ||
114 | bo->prime_shared_count = 1; | 116 | ww_mutex_unlock(&resv->lock); |
115 | return &bo->gem_base; | 117 | return &bo->gem_base; |
118 | |||
119 | error: | ||
120 | ww_mutex_unlock(&resv->lock); | ||
121 | return ERR_PTR(ret); | ||
116 | } | 122 | } |
117 | 123 | ||
118 | static int amdgpu_gem_map_attach(struct dma_buf *dma_buf, | 124 | static int amdgpu_gem_map_attach(struct dma_buf *dma_buf, |