aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
diff options
context:
space:
mode:
authorThomas Zimmermann <[email protected]>2025-07-07 13:11:55 +0000
committerThomas Zimmermann <[email protected]>2025-07-09 12:03:28 +0000
commitf6bfc9afc7510cb5e6fbe0a17c507917b0120280 (patch)
treecde53e2a4c5bb7a976205c2b3e4b93f22b307f67 /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
parentagp/amd64: Check AGP Capability before binding to unsupported devices (diff)
downloadkernel-f6bfc9afc7510cb5e6fbe0a17c507917b0120280.tar.gz
kernel-f6bfc9afc7510cb5e6fbe0a17c507917b0120280.zip
drm/framebuffer: Acquire internal references on GEM handles
Acquire GEM handles in drm_framebuffer_init() and release them in the corresponding drm_framebuffer_cleanup(). Ties the handle's lifetime to the framebuffer. Not all GEM buffer objects have GEM handles. If not set, no refcounting takes place. This is the case for some fbdev emulation. This is not a problem as these GEM objects do not use dma-bufs and drivers will not release them while fbdev emulation is running. Framebuffer flags keep a bit per color plane of which the framebuffer holds a GEM handle reference. As all drivers use drm_framebuffer_init(), they will now all hold dma-buf references as fixed in commit 5307dce878d4 ("drm/gem: Acquire references on GEM handles for framebuffers"). In the GEM framebuffer helpers, restore the original ref counting on buffer objects. As the helpers for handle refcounting are now no longer called from outside the DRM core, unexport the symbols. v3: - don't mix internal flags with mode flags (Christian) v2: - track framebuffer handle refs by flag - drop gma500 cleanup (Christian) Signed-off-by: Thomas Zimmermann <[email protected]> Fixes: 5307dce878d4 ("drm/gem: Acquire references on GEM handles for framebuffers") Reported-by: Bert Karwatzki <[email protected]> Closes: https://lore.kernel.org/dri-devel/[email protected]/ Tested-by: Bert Karwatzki <[email protected]> Tested-by: Mario Limonciello <[email protected]> Tested-by: Borislav Petkov (AMD) <[email protected]> Cc: Thomas Zimmermann <[email protected]> Cc: Anusha Srivatsa <[email protected]> Cc: Christian König <[email protected]> Cc: Maarten Lankhorst <[email protected]> Cc: Maxime Ripard <[email protected]> Cc: Sumit Semwal <[email protected]> Cc: "Christian König" <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: <[email protected]> Reviewed-by: Christian König <[email protected]> Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_device.c')
0 files changed, 0 insertions, 0 deletions