dev->mode.fb_id = fb_id;
}
+static void clear_mode(struct device *dev)
+{
+ if (dev->mode.bo)
+ bo_destroy(dev->mode.bo);
+}
+
static void set_planes(struct device *dev, struct plane_arg *p, unsigned int count)
{
unsigned int i;
if (test_cursor)
clear_cursors(&dev);
- bo_destroy(dev.mode.bo);
+ if (count)
+ clear_mode(&dev);
}
free_resources(dev.resources);