Add a wrapper for the new CLOSEFB IOCTL, to close a framebuffer
without implicitly disabling planes or CRTCs.
See https://lore.kernel.org/dri-devel/
20231020101926.145327-2-contact@emersion.fr/
Signed-off-by: Simon Ser <contact@emersion.fr>
drmModeAtomicMerge
drmModeAtomicSetCursor
drmModeAttachMode
+drmModeCloseFB
drmModeConnectorGetPossibleCrtcs
drmModeConnectorSetProperty
drmModeCreateDumbBuffer
return DRM_IOCTL(fd, DRM_IOCTL_MODE_RMFB, &bufferId);
}
+drm_public int drmModeCloseFB(int fd, uint32_t buffer_id)
+{
+ struct drm_mode_closefb closefb;
+
+ memclear(closefb);
+ closefb.fb_id = buffer_id;
+
+ return DRM_IOCTL(fd, DRM_IOCTL_MODE_CLOSEFB, &closefb);
+}
+
drm_public drmModeFBPtr drmModeGetFB(int fd, uint32_t buf)
{
struct drm_mode_fb_cmd info;
*/
extern int drmModeRmFB(int fd, uint32_t bufferId);
+/**
+ * Close a framebuffer.
+ *
+ * Same as drmModeRmFB(), except it doesn't implicitly disable planes and CRTCs.
+ */
+extern int drmModeCloseFB(int fd, uint32_t buffer_id);
+
/**
* Mark a region of a framebuffer as dirty.
*/