diff mbox

[01/22] drmtest: add function to remove an DRM FB

Message ID 1350398096-3649-2-git-send-email-imre.deak@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Imre Deak Oct. 16, 2012, 2:34 p.m. UTC
Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 lib/drmtest.c |    5 +++++
 lib/drmtest.h |    1 +
 2 files changed, 6 insertions(+)
diff mbox

Patch

diff --git a/lib/drmtest.c b/lib/drmtest.c
index 125bfe9..c309851 100644
--- a/lib/drmtest.c
+++ b/lib/drmtest.c
@@ -829,6 +829,11 @@  unsigned int kmstest_create_fb(int fd, int width, int height, int bpp,
 	return fb_id;
 }
 
+void kmstest_remove_fb(int fd, int fb_id)
+{
+	do_or_die(drmModeRmFB(fd, fb_id));
+}
+
 void kmstest_dump_mode(drmModeModeInfo *mode)
 {
 	printf("  %s %d %d %d %d %d %d %d %d %d 0x%x 0x%x %d\n",
diff --git a/lib/drmtest.h b/lib/drmtest.h
index 738d1a2..fcb10bb 100644
--- a/lib/drmtest.h
+++ b/lib/drmtest.h
@@ -105,6 +105,7 @@  unsigned int kmstest_create_fb(int fd, int width, int height, int bpp,
 			       struct kmstest_fb *fb_info,
 			       kmstest_paint_func paint_func,
 			       void *func_arg);
+void kmstest_remove_fb(int fd, int fb_id);
 void kmstest_dump_mode(drmModeModeInfo *mode);
 
 inline static void _do_or_die(const char *function, int line, int ret)