@@ -1055,6 +1055,7 @@ static void set_mode(struct device *dev, struct pipe_arg *pipes, unsigned int co
dev->mode.width = 0;
dev->mode.height = 0;
+ dev->mode.fb_id = -1;
for (i = 0; i < count; i++) {
struct pipe_arg *pipe = &pipes[i];
@@ -1115,6 +1116,8 @@ static void set_mode(struct device *dev, struct pipe_arg *pipes, unsigned int co
static void clear_mode(struct device *dev)
{
+ if (dev->mode.fb_id != -1)
+ drmModeRmFB(dev->fd, dev->mode.fb_id);
if (dev->mode.bo)
bo_destroy(dev->mode.bo);
}
@@ -1255,6 +1258,7 @@ static void test_page_flip(struct device *dev, struct pipe_arg *pipes, unsigned
drmHandleEvent(dev->fd, &evctx);
}
+ drmModeRmFB(dev->fd, other_fb_id);
bo_destroy(other_bo);
}
It's proper to remove added framebuffer before destroy buffer. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> --- tests/modetest/modetest.c | 4 ++++ 1 file changed, 4 insertions(+)