diff options
author | Jani Nikula <jani.nikula@intel.com> | 2022-09-12 11:11:02 +0300 |
---|---|---|
committer | Jani Nikula <jani.nikula@intel.com> | 2022-09-12 11:14:20 +0300 |
commit | 6f3562b3bca078b40aa198db8fdc68439b7b0399 (patch) | |
tree | bca5b69f6318824e66f9f6aa9a7f1eea0f216be3 /include/drm/ttm/ttm_resource.h | |
parent | 3fecf93c86087d1e1a9db28d3423db276639e776 (diff) | |
parent | 89b03aeaef16f8ab48c10c399f97c836bdbae838 (diff) | |
download | linux-6f3562b3bca078b40aa198db8fdc68439b7b0399.tar.xz |
Merge drm/drm-next into drm-intel-next
Backmerge to sync the DP MST atomic changes to drm-intel-next.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Diffstat (limited to 'include/drm/ttm/ttm_resource.h')
-rw-r--r-- | include/drm/ttm/ttm_resource.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/include/drm/ttm/ttm_resource.h b/include/drm/ttm/ttm_resource.h index ca89a48c2460..5afc6d664fde 100644 --- a/include/drm/ttm/ttm_resource.h +++ b/include/drm/ttm/ttm_resource.h @@ -89,6 +89,38 @@ struct ttm_resource_manager_func { struct ttm_resource *res); /** + * struct ttm_resource_manager_func member intersects + * + * @man: Pointer to a memory type manager. + * @res: Pointer to a struct ttm_resource to be checked. + * @place: Placement to check against. + * @size: Size of the check. + * + * Test if @res intersects with @place + @size. Used to judge if + * evictions are valueable or not. + */ + bool (*intersects)(struct ttm_resource_manager *man, + struct ttm_resource *res, + const struct ttm_place *place, + size_t size); + + /** + * struct ttm_resource_manager_func member compatible + * + * @man: Pointer to a memory type manager. + * @res: Pointer to a struct ttm_resource to be checked. + * @place: Placement to check against. + * @size: Size of the check. + * + * Test if @res compatible with @place + @size. Used to check of + * the need to move the backing store or not. + */ + bool (*compatible)(struct ttm_resource_manager *man, + struct ttm_resource *res, + const struct ttm_place *place, + size_t size); + + /** * struct ttm_resource_manager_func member debug * * @man: Pointer to a memory type manager. @@ -329,6 +361,14 @@ int ttm_resource_alloc(struct ttm_buffer_object *bo, const struct ttm_place *place, struct ttm_resource **res); void ttm_resource_free(struct ttm_buffer_object *bo, struct ttm_resource **res); +bool ttm_resource_intersects(struct ttm_device *bdev, + struct ttm_resource *res, + const struct ttm_place *place, + size_t size); +bool ttm_resource_compatible(struct ttm_device *bdev, + struct ttm_resource *res, + const struct ttm_place *place, + size_t size); bool ttm_resource_compat(struct ttm_resource *res, struct ttm_placement *placement); void ttm_resource_set_bo(struct ttm_resource *res, |