diff options
author | Dave Airlie <airlied@redhat.com> | 2017-02-23 17:35:23 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2017-02-23 17:35:23 -0500 |
commit | 1e8ad3d8da4763b238d09244d4d1177aa640c0d3 (patch) | |
tree | 726ad9e44d1ae8bd550c983b58b7697ef1c67c66 /drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | |
parent | 894ebc414d4688da732a185954ca23c5d11900d0 (diff) | |
parent | 187368a5c7ad6c41159b85025a87d6d136eb8d4b (diff) |
Merge branch 'drm-next-4.11' of git://people.freedesktop.org/~agd5f/linux into drm-next
Some ttm/amd fixes.
* 'drm-next-4.11' of git://people.freedesktop.org/~agd5f/linux:
drm/amd/powerplay: fix PSI feature on Polars12.
drm/amdgpu: refuse to reserve io mem for split VRAM buffers
drm/ttm: fix use-after-free races in vm fault handling
drm/amd/amdgpu: post card if there is real hw resetting performed
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index 1154b0a8881d..4c6094eefc51 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | |||
@@ -529,6 +529,9 @@ static int amdgpu_ttm_io_mem_reserve(struct ttm_bo_device *bdev, struct ttm_mem_ | |||
529 | case TTM_PL_TT: | 529 | case TTM_PL_TT: |
530 | break; | 530 | break; |
531 | case TTM_PL_VRAM: | 531 | case TTM_PL_VRAM: |
532 | if (mem->start == AMDGPU_BO_INVALID_OFFSET) | ||
533 | return -EINVAL; | ||
534 | |||
532 | mem->bus.offset = mem->start << PAGE_SHIFT; | 535 | mem->bus.offset = mem->start << PAGE_SHIFT; |
533 | /* check if it's visible */ | 536 | /* check if it's visible */ |
534 | if ((mem->bus.offset + mem->bus.size) > adev->mc.visible_vram_size) | 537 | if ((mem->bus.offset + mem->bus.size) > adev->mc.visible_vram_size) |