We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 024996d commit 543e93aCopy full SHA for 543e93a
include/drm/drm_gem.h
@@ -552,6 +552,19 @@ unsigned long drm_gem_lru_scan(struct drm_gem_lru *lru,
552
553
int drm_gem_evict(struct drm_gem_object *obj);
554
555
+/**
556
+ * drm_gem_object_is_shared_for_memory_stats - helper for shared memory stats
557
+ *
558
+ * This helper should only be used for fdinfo shared memory stats to determine
559
+ * if a GEM object is shared.
560
561
+ * @obj: obj in question
562
+ */
563
+static inline bool drm_gem_object_is_shared_for_memory_stats(struct drm_gem_object *obj)
564
+{
565
+ return (obj->handle_count > 1) || obj->dma_buf;
566
+}
567
+
568
#ifdef CONFIG_LOCKDEP
569
/**
570
* drm_gem_gpuva_set_lock() - Set the lock protecting accesses to the gpuva list.
0 commit comments