diff options
author | Christian König <christian.koenig@amd.com> | 2018-03-14 15:48:17 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-03-14 16:08:24 -0400 |
commit | eab3de23a1639ec9419c1f9239ce651d3c82e7d6 (patch) | |
tree | 6d0ef8e3e8b892b47a2330d5803b4d35f4319c1d /drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c | |
parent | e3364dfc6a76e8d3432f3efd130f3dda6ddd698c (diff) |
drm/amdgpu: explicit give BO type to amdgpu_bo_create
Drop the "kernel" and sg parameter and give the BO type to create
explicit to amdgpu_bo_create instead of figuring it out from the
parameters.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Roger He <Hongbo.He@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c index 44230165e181..1c9991738477 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c | |||
@@ -105,11 +105,14 @@ amdgpu_gem_prime_import_sg_table(struct drm_device *dev, | |||
105 | int ret; | 105 | int ret; |
106 | 106 | ||
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, |
109 | AMDGPU_GEM_DOMAIN_CPU, 0, sg, resv, &bo); | 109 | AMDGPU_GEM_DOMAIN_CPU, 0, ttm_bo_type_sg, |
110 | resv, &bo); | ||
110 | if (ret) | 111 | if (ret) |
111 | goto error; | 112 | goto error; |
112 | 113 | ||
114 | bo->tbo.sg = sg; | ||
115 | bo->tbo.ttm->sg = sg; | ||
113 | bo->allowed_domains = AMDGPU_GEM_DOMAIN_GTT; | 116 | bo->allowed_domains = AMDGPU_GEM_DOMAIN_GTT; |
114 | bo->preferred_domains = AMDGPU_GEM_DOMAIN_GTT; | 117 | bo->preferred_domains = AMDGPU_GEM_DOMAIN_GTT; |
115 | if (attach->dmabuf->ops != &amdgpu_dmabuf_ops) | 118 | if (attach->dmabuf->ops != &amdgpu_dmabuf_ops) |