diff options
author | 2025-02-06 13:47:32 +0100 | |
---|---|---|
committer | 2025-02-06 13:47:32 +0100 | |
commit | 93c7dd1b39444ebd5a6a98e56a363d7a4e646775 (patch) | |
tree | 6e186e041d4253059a0e6471cb444ea35da5db09 /include/drm/ttm/ttm_resource.h | |
parent | drm/rockchip: vop2: Improve display modes handling on RK3588 HDMI0 (diff) | |
parent | Linux 6.14-rc1 (diff) | |
download | wireguard-linux-93c7dd1b39444ebd5a6a98e56a363d7a4e646775.tar.xz wireguard-linux-93c7dd1b39444ebd5a6a98e56a363d7a4e646775.zip |
Merge drm/drm-next into drm-misc-next
Bring rc1 to start the new release dev.
Signed-off-by: Maxime Ripard <mripard@kernel.org>
Diffstat (limited to 'include/drm/ttm/ttm_resource.h')
-rw-r--r-- | include/drm/ttm/ttm_resource.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/include/drm/ttm/ttm_resource.h b/include/drm/ttm/ttm_resource.h index e1f3b95d73b6..e52bba15012f 100644 --- a/include/drm/ttm/ttm_resource.h +++ b/include/drm/ttm/ttm_resource.h @@ -38,6 +38,7 @@ #define TTM_MAX_BO_PRIORITY 4U #define TTM_NUM_MEM_TYPES 8 +struct dmem_cgroup_device; struct ttm_device; struct ttm_resource_manager; struct ttm_resource; @@ -211,6 +212,11 @@ struct ttm_resource_manager { * bdev->lru_lock. */ uint64_t usage; + + /** + * @cg: &dmem_cgroup_region used for memory accounting, if not NULL. + */ + struct dmem_cgroup_region *cg; }; /** @@ -239,6 +245,7 @@ struct ttm_bus_placement { * @placement: Placement flags. * @bus: Placement on io bus accessible to the CPU * @bo: weak reference to the BO, protected by ttm_device::lru_lock + * @css: cgroup state this resource is charged to * * Structure indicating the placement and space resources used by a * buffer object. @@ -251,6 +258,8 @@ struct ttm_resource { struct ttm_bus_placement bus; struct ttm_buffer_object *bo; + struct dmem_cgroup_pool_state *css; + /** * @lru: Least recently used list, see &ttm_resource_manager.lru */ @@ -435,7 +444,8 @@ void ttm_resource_fini(struct ttm_resource_manager *man, int ttm_resource_alloc(struct ttm_buffer_object *bo, const struct ttm_place *place, - struct ttm_resource **res); + struct ttm_resource **res, + struct dmem_cgroup_pool_state **ret_limit_pool); 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, |