summaryrefslogtreecommitdiff
path: root/src/libsystemd-terminal/grdev-drm.c
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2014-10-02 18:47:01 +0200
committerDavid Herrmann <dh.herrmann@gmail.com>2014-10-03 15:57:00 +0200
commit66695cc343647dcbf654fbb4b3f38bd1ee092a0d (patch)
tree49e1bc8014b99e0a7ad7aba32a6e1ff243d8d2ec /src/libsystemd-terminal/grdev-drm.c
parent51cff8bdedbc283b2403ab4a688903d8b1f2fab5 (diff)
terminal/grdev: allow arbitrary fb-age contexts
Instead of limiting fb-aging to 64bit integers, allow any arbitrary context together with a release function to free it once the FB is destroyed.
Diffstat (limited to 'src/libsystemd-terminal/grdev-drm.c')
-rw-r--r--src/libsystemd-terminal/grdev-drm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libsystemd-terminal/grdev-drm.c b/src/libsystemd-terminal/grdev-drm.c
index 57b930bc0f..f01df1dae2 100644
--- a/src/libsystemd-terminal/grdev-drm.c
+++ b/src/libsystemd-terminal/grdev-drm.c
@@ -1442,6 +1442,9 @@ grdrm_fb *grdrm_fb_free(grdrm_fb *fb) {
assert(fb->card);
+ if (fb->base.free_fn)
+ fb->base.free_fn(fb->base.data.ptr);
+
if (fb->id > 0 && fb->card->fd >= 0) {
r = ioctl(fb->card->fd, DRM_IOCTL_MODE_RMFB, fb->id);
if (r < 0)