We should remove the framebuffer before destroying the buffer.
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
[Emil Velikov: Tweak the commit message. fb_id = 0 is unused]
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
dev->mode.width = 0;
dev->mode.height = 0;
+ dev->mode.fb_id = 0;
for (i = 0; i < count; i++) {
struct pipe_arg *pipe = &pipes[i];
static void clear_mode(struct device *dev)
{
+ if (dev->mode.fb_id)
+ drmModeRmFB(dev->fd, dev->mode.fb_id);
if (dev->mode.bo)
bo_destroy(dev->mode.bo);
}
drmHandleEvent(dev->fd, &evctx);
}
+ drmModeRmFB(dev->fd, other_fb_id);
bo_destroy(other_bo);
}