Skip to content
Commit a4ae24cd authored by Alex Deucher's avatar Alex Deucher Committed by Greg Kroah-Hartman
Browse files

drm: add drm_gem_object_is_shared_for_memory_stats() helper

[ Upstream commit b31f5eba

 ]

Add a helper so that drm drivers can consistently report
shared status via the fdinfo shared memory stats interface.

In addition to handle count, show buffers as shared if they
are shared via dma-buf as well (e.g., shared with v4l or some
other subsystem).

v2: switch to inline function

Link: https://lore.kernel.org/all/20231207180225.439482-1-alexander.deucher@amd.com/
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> (v1)
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Reviewed-by: default avatarChristian König <christian.keonig@amd.com>
Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Stable-dep-of: a6ff969f

 ("drm/amdgpu: fix visible VRAM handling during faults")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 9e898211
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment