summaryrefslogtreecommitdiffstats
path: root/include/drm/ttm
diff options
context:
space:
mode:
authorFelix Kuehling <Felix.Kuehling@amd.com>2019-07-10 01:09:42 +0200
committerAlex Deucher <alexander.deucher@amd.com>2019-08-02 17:18:04 +0200
commit274840e544225657fbca4f12efa1ee55474bb800 (patch)
treea1a64a945e2c45aa2890f2dd63bf4843eb661ed4 /include/drm/ttm
parentdrm/amd/display: Use switch table for dc_to_smu_clock_type (diff)
downloadlinux-274840e544225657fbca4f12efa1ee55474bb800.tar.xz
linux-274840e544225657fbca4f12efa1ee55474bb800.zip
drm/ttm: Add release_notify callback to ttm_bo_driver
This notifies the driver that a BO is about to be released. Releasing a BO also invokes the move_notify callback from ttm_bo_cleanup_memtype_use, but that happens too late for anything that would add fences to the BO and require a delayed delete. Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'include/drm/ttm')
-rw-r--r--include/drm/ttm/ttm_bo_driver.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h
index a2d810a2504d..81077e5b4b7e 100644
--- a/include/drm/ttm/ttm_bo_driver.h
+++ b/include/drm/ttm/ttm_bo_driver.h
@@ -390,6 +390,16 @@ struct ttm_bo_driver {
* notify driver that a BO was deleted from LRU.
*/
void (*del_from_lru_notify)(struct ttm_buffer_object *bo);
+
+ /**
+ * Notify the driver that we're about to release a BO
+ *
+ * @bo: BO that is about to be released
+ *
+ * Gives the driver a chance to do any cleanup, including
+ * adding fences that may force a delayed delete
+ */
+ void (*release_notify)(struct ttm_buffer_object *bo);
};
/**