diff options
| author | Christian König <[email protected]> | 2017-03-29 09:16:05 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2017-04-06 17:26:45 +0000 |
| commit | 9bbdcc0fbc392e1fa6b4d1497f9d9454df70466f (patch) | |
| tree | 811bd9a195b384e934005607094158d66c130978 /drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | |
| parent | drm/amdgpu: use TTM_PL_FLAG_CONTIGUOUS v2 (diff) | |
| download | kernel-9bbdcc0fbc392e1fa6b4d1497f9d9454df70466f.tar.gz kernel-9bbdcc0fbc392e1fa6b4d1497f9d9454df70466f.zip | |
drm/amdgpu: handle CPU access for split VRAM buffers (v2)
This avoids merging them together on page fault.
v2: squash in 64-bit division fix
Signed-off-by: Christian König <[email protected]>
Acked-by: Michel Dänzer <[email protected]>
Reviewed-by: Nicolai Hähnle <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_object.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c index 4dddeafabd09..758d8cf8fd17 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c @@ -927,8 +927,7 @@ int amdgpu_bo_fault_reserve_notify(struct ttm_buffer_object *bo) size = bo->mem.num_pages << PAGE_SHIFT; offset = bo->mem.start << PAGE_SHIFT; /* TODO: figure out how to map scattered VRAM to the CPU */ - if ((offset + size) <= adev->mc.visible_vram_size && - (abo->flags & AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS)) + if ((offset + size) <= adev->mc.visible_vram_size) return 0; /* Can't move a pinned BO to visible VRAM */ @@ -936,7 +935,6 @@ int amdgpu_bo_fault_reserve_notify(struct ttm_buffer_object *bo) return -EINVAL; /* hurrah the memory is not visible ! */ - abo->flags |= AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS; amdgpu_ttm_placement_from_domain(abo, AMDGPU_GEM_DOMAIN_VRAM); lpfn = adev->mc.visible_vram_size >> PAGE_SHIFT; for (i = 0; i < abo->placement.num_placement; i++) { |
