diff options
author | Christian König <christian.koenig@amd.com> | 2017-10-20 13:12:12 +0200 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-12-04 16:33:15 -0500 |
commit | ead282a4f55ae6476cf2d193d9b501a59810f689 (patch) | |
tree | 0c8cecfceafff559f5f6d164d7bbfe0030060c98 /drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | |
parent | 5e91fb57eb6ac027dcdaec6ced32658ca2dcd3f0 (diff) | |
download | talos-obmc-linux-ead282a4f55ae6476cf2d193d9b501a59810f689.tar.gz talos-obmc-linux-ead282a4f55ae6476cf2d193d9b501a59810f689.zip |
drm/amdgpu: always bind pinned BOs
We always need to bind pinned BOs, not just when the caller requested the
address.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_object.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c index 8a103303da3e..6f876deaafc6 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c @@ -688,15 +688,15 @@ int amdgpu_bo_pin_restricted(struct amdgpu_bo *bo, u32 domain, goto error; } + r = amdgpu_ttm_bind(&bo->tbo, &bo->tbo.mem); + if (unlikely(r)) { + dev_err(adev->dev, "%p bind failed\n", bo); + goto error; + } + bo->pin_count = 1; - if (gpu_addr != NULL) { - r = amdgpu_ttm_bind(&bo->tbo, &bo->tbo.mem); - if (unlikely(r)) { - dev_err(adev->dev, "%p bind failed\n", bo); - goto error; - } + if (gpu_addr != NULL) *gpu_addr = amdgpu_bo_gpu_offset(bo); - } domain = amdgpu_mem_type_to_domain(bo->tbo.mem.mem_type); if (domain == AMDGPU_GEM_DOMAIN_VRAM) { |