Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ead282a4 authored by Christian König's avatar Christian König Committed by Alex Deucher
Browse files

drm/amdgpu: always bind pinned BOs



We always need to bind pinned BOs, not just when the caller requested the
address.

Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 5e91fb57
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -688,15 +688,15 @@ int amdgpu_bo_pin_restricted(struct amdgpu_bo *bo, u32 domain,
		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;
	}

	bo->pin_count = 1;
	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) {