diff options
author | Sinclair Yeh <syeh@vmware.com> | 2016-06-29 22:58:49 +0300 |
---|---|---|
committer | Sasha Levin <alexander.levin@verizon.com> | 2016-08-08 04:44:43 +0300 |
commit | 69fb704cac4d3eb59b407f8cc8fa366c44e71318 (patch) | |
tree | 8300b1907cac7d8808ce9c9ec96eb3a1e08cea9c /include/drm | |
parent | 3837836cb5e729b7ee2b80957f82141d6ee30436 (diff) | |
download | linux-69fb704cac4d3eb59b407f8cc8fa366c44e71318.tar.xz |
drm/ttm: Make ttm_bo_mem_compat available
[ Upstream commit 94477bff390aa4612d2332c8abafaae0a13d6923 ]
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>
Cc: <stable@vger.kernel.org>
---
This is the first of a 3-patch series to fix a black screen
issue observed on Ubuntu 16.04 server.
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Diffstat (limited to 'include/drm')
-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 0ccf7f267ff9..3f3367c42896 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 * |