aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/ttm/ttm_bo.c3
-rw-r--r--include/drm/ttm/ttm_bo_driver.h5
2 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index 2920f9a279e1..e10a04e7c4e9 100644
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -1844,6 +1844,9 @@ static int ttm_bo_swapout(struct ttm_mem_shrink *shrink)
1844 * anyone tries to access a ttm page. 1844 * anyone tries to access a ttm page.
1845 */ 1845 */
1846 1846
1847 if (bo->bdev->driver->swap_notify)
1848 bo->bdev->driver->swap_notify(bo);
1849
1847 ret = ttm_tt_swapout(bo->ttm, bo->persistant_swap_storage); 1850 ret = ttm_tt_swapout(bo->ttm, bo->persistant_swap_storage);
1848out: 1851out:
1849 1852
diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h
index ff7664e0c3cd..4c4e0f8375b3 100644
--- a/include/drm/ttm/ttm_bo_driver.h
+++ b/include/drm/ttm/ttm_bo_driver.h
@@ -353,6 +353,11 @@ struct ttm_bo_driver {
353 /* notify the driver we are taking a fault on this BO 353 /* notify the driver we are taking a fault on this BO
354 * and have reserved it */ 354 * and have reserved it */
355 void (*fault_reserve_notify)(struct ttm_buffer_object *bo); 355 void (*fault_reserve_notify)(struct ttm_buffer_object *bo);
356
357 /**
358 * notify the driver that we're about to swap out this bo
359 */
360 void (*swap_notify) (struct ttm_buffer_object *bo);
356}; 361};
357 362
358/** 363/**