summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2018-03-14 14:48:17 -0500
committerAlex Deucher <alexander.deucher@amd.com>2018-03-14 15:08:24 -0500
commiteab3de23a1639ec9419c1f9239ce651d3c82e7d6 (patch)
tree6d0ef8e3e8b892b47a2330d5803b4d35f4319c1d /drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c
parente3364dfc6a76e8d3432f3efd130f3dda6ddd698c (diff)
downloadop-kernel-dev-eab3de23a1639ec9419c1f9239ce651d3c82e7d6.zip
op-kernel-dev-eab3de23a1639ec9419c1f9239ce651d3c82e7d6.tar.gz
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.c7
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 4423016..1c99917 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,
int ret;
ww_mutex_lock(&resv->lock, NULL);
- ret = amdgpu_bo_create(adev, attach->dmabuf->size, PAGE_SIZE, false,
- AMDGPU_GEM_DOMAIN_CPU, 0, sg, resv, &bo);
+ ret = amdgpu_bo_create(adev, attach->dmabuf->size, PAGE_SIZE,
+ AMDGPU_GEM_DOMAIN_CPU, 0, ttm_bo_type_sg,
+ resv, &bo);
if (ret)
goto error;
+ bo->tbo.sg = sg;
+ bo->tbo.ttm->sg = sg;
bo->allowed_domains = AMDGPU_GEM_DOMAIN_GTT;
bo->preferred_domains = AMDGPU_GEM_DOMAIN_GTT;
if (attach->dmabuf->ops != &amdgpu_dmabuf_ops)
OpenPOWER on IntegriCloud