summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVasiliy Ulyanov <v.ulyanov@samsung.com>2015-11-05 17:43:49 +0300
committerJinhyung Jo <jinhyung.jo@samsung.com>2017-05-10 17:48:05 +0900
commit9c722b3e7d443e15654638c90a2687529bb4dc92 (patch)
tree0aff62a8db3a28821612ed836071cc8318011dfb
parentb07dd0103027d0ff8c5680dc947f76c074879e8c (diff)
downloademulator-kernel-9c722b3e7d443e15654638c90a2687529bb4dc92.tar.gz
emulator-kernel-9c722b3e7d443e15654638c90a2687529bb4dc92.tar.bz2
emulator-kernel-9c722b3e7d443e15654638c90a2687529bb4dc92.zip
VIGS: unbind ttm bo before swapout
TTM BUGs if ttm_tt appears bound while being swaped out. Certain precautions are now taken in swap_notify ttm_bo_driver callback. Change-Id: I0c461e6d179af4b424125c1615f95738ac429d47 Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com> (cherry picked from commit c1d6b3e728436abaf4833abc66be8bf0f299506f)
-rw-r--r--drivers/gpu/drm/vigs/vigs_mman.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/vigs/vigs_mman.c b/drivers/gpu/drm/vigs/vigs_mman.c
index fa22fdd18edf..9440d44c40fb 100644
--- a/drivers/gpu/drm/vigs/vigs_mman.c
+++ b/drivers/gpu/drm/vigs/vigs_mman.c
@@ -309,6 +309,11 @@ static int vigs_ttm_fault_reserve_notify(struct ttm_buffer_object *bo)
return 0;
}
+void vigs_ttm_swap_notify(struct ttm_buffer_object *bo)
+{
+ ttm_tt_unbind(bo->ttm);
+}
+
static int vigs_ttm_io_mem_reserve(struct ttm_bo_device *bo_dev,
struct ttm_mem_reg *mem)
{
@@ -362,6 +367,7 @@ static struct ttm_bo_driver vigs_ttm_bo_driver =
.move = &vigs_ttm_move,
.verify_access = &vigs_ttm_verify_access,
.fault_reserve_notify = &vigs_ttm_fault_reserve_notify,
+ .swap_notify = &vigs_ttm_swap_notify,
.io_mem_reserve = &vigs_ttm_io_mem_reserve,
.io_mem_free = &vigs_ttm_io_mem_free,
};