From 4e5eceb07558a5f35460bcc6ac4602c854a79ff3 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Mon, 30 Nov 2015 16:07:19 +0000 Subject: [PATCH] compositor-drm: Use fb->fd consistently MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Everyone else uses fb->fd rather than pulling the FD back out of GBM. Use that in the destroy callback too. Signed-off-by: Daniel Stone Reviewed-by: Armin Krezović Differential Revision: https://phabricator.freedesktop.org/D1406 --- libweston/compositor-drm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c index b7e1db4f..ee152ca3 100644 --- a/libweston/compositor-drm.c +++ b/libweston/compositor-drm.c @@ -243,10 +243,9 @@ static void drm_fb_destroy_callback(struct gbm_bo *bo, void *data) { struct drm_fb *fb = data; - struct gbm_device *gbm = gbm_bo_get_device(bo); if (fb->fb_id) - drmModeRmFB(gbm_device_get_fd(gbm), fb->fb_id); + drmModeRmFB(fb->fd, fb->fb_id); weston_buffer_reference(&fb->buffer_ref, NULL);