diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-05-02 17:32:50 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-05-02 17:32:50 +0300 |
commit | a2c9c3581a75382ba468ba865c9d31c60cc884b3 (patch) | |
tree | 058ddabba23d052f9d4fad4256de7e113767c3b7 /include/drm | |
parent | ba5daf9b30e7a60335ba59f85a0d611008aea025 (diff) | |
parent | 5697d159afef8c475f13a0b7b85f09bd4578106c (diff) | |
download | linux-a2c9c3581a75382ba468ba865c9d31c60cc884b3.tar.xz |
Merge v6.6.30
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/drm')
-rw-r--r-- | include/drm/drm_gem.h | 13 | ||||
-rw-r--r-- | include/drm/ttm/ttm_pool.h | 2 |
2 files changed, 14 insertions, 1 deletions
diff --git a/include/drm/drm_gem.h b/include/drm/drm_gem.h index bc9f6aa2f3fe..7c2ec139c464 100644 --- a/include/drm/drm_gem.h +++ b/include/drm/drm_gem.h @@ -544,6 +544,19 @@ unsigned long drm_gem_lru_scan(struct drm_gem_lru *lru, int drm_gem_evict(struct drm_gem_object *obj); +/** + * drm_gem_object_is_shared_for_memory_stats - helper for shared memory stats + * + * This helper should only be used for fdinfo shared memory stats to determine + * if a GEM object is shared. + * + * @obj: obj in question + */ +static inline bool drm_gem_object_is_shared_for_memory_stats(struct drm_gem_object *obj) +{ + return (obj->handle_count > 1) || obj->dma_buf; +} + #ifdef CONFIG_LOCKDEP /** * drm_gem_gpuva_set_lock() - Set the lock protecting accesses to the gpuva list. diff --git a/include/drm/ttm/ttm_pool.h b/include/drm/ttm/ttm_pool.h index 30a347e5aa11..4490d43c63e3 100644 --- a/include/drm/ttm/ttm_pool.h +++ b/include/drm/ttm/ttm_pool.h @@ -74,7 +74,7 @@ struct ttm_pool { bool use_dma32; struct { - struct ttm_pool_type orders[MAX_ORDER + 1]; + struct ttm_pool_type orders[NR_PAGE_ORDERS]; } caching[TTM_NUM_CACHING_TYPES]; }; |