diff options
| author | Sinclair Yeh <syeh@vmware.com> | 2016-06-29 12:58:49 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-07-27 08:42:19 -0700 |
| commit | 70124a05e699c951f59a670bdca4872d6e75d701 (patch) | |
| tree | 1b4c64e94cb1153fc47a16cc0ac85a58e292ec83 /include | |
| parent | 21b8579a4269abca96090544db8fb3499a5a24a7 (diff) | |
| download | lwn-70124a05e699c951f59a670bdca4872d6e75d701.tar.gz lwn-70124a05e699c951f59a670bdca4872d6e75d701.zip | |
drm/ttm: Make ttm_bo_mem_compat available
commit 94477bff390aa4612d2332c8abafaae0a13d6923 upstream.
There are cases where it is desired to see if a proposed placement
is compatible with a buffer object before calling ttm_bo_validate().
Signed-off-by: Sinclair Yeh <syeh@vmware.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/drm/ttm/ttm_bo_api.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/drm/ttm/ttm_bo_api.h b/include/drm/ttm/ttm_bo_api.h index 055a08ddac02..a74c49d7c0fc 100644 --- a/include/drm/ttm/ttm_bo_api.h +++ b/include/drm/ttm/ttm_bo_api.h @@ -316,6 +316,20 @@ ttm_bo_reference(struct ttm_buffer_object *bo) */ extern int ttm_bo_wait(struct ttm_buffer_object *bo, bool lazy, bool interruptible, bool no_wait); + +/** + * ttm_bo_mem_compat - Check if proposed placement is compatible with a bo + * + * @placement: Return immediately if buffer is busy. + * @mem: The struct ttm_mem_reg indicating the region where the bo resides + * @new_flags: Describes compatible placement found + * + * Returns true if the placement is compatible + */ +extern bool ttm_bo_mem_compat(struct ttm_placement *placement, + struct ttm_mem_reg *mem, + uint32_t *new_flags); + /** * ttm_bo_validate * |
