All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t 01/12] lib/igt_fb: Make igt_remove_fb more robust
@ 2018-02-06 10:14 Maarten Lankhorst
  2018-02-06 10:14 ` [igt-dev] [PATCH i-g-t 02/12] tests: Always call igt_remove_fb without checking Maarten Lankhorst
                   ` (18 more replies)
  0 siblings, 19 replies; 39+ messages in thread
From: Maarten Lankhorst @ 2018-02-06 10:14 UTC (permalink / raw)
  To: igt-dev

This will make it easier for tests to unconditionally call
igt_remove_fb, without first checking whether the FB is allocated.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
 lib/igt_fb.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index 6fecdd6699a5..35a928b9281d 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -1623,9 +1623,13 @@ void igt_put_cairo_ctx(int fd, struct igt_fb *fb, cairo_t *cr)
  */
 void igt_remove_fb(int fd, struct igt_fb *fb)
 {
+	if (!fb || !fb->fb_id)
+		return;
+
 	cairo_surface_destroy(fb->cairo_surface);
 	do_or_die(drmModeRmFB(fd, fb->fb_id));
 	gem_close(fd, fb->gem_handle);
+	fb->fb_id = 0;
 }
 
 /**
-- 
2.16.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 39+ messages in thread

end of thread, other threads:[~2018-02-12 14:20 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-06 10:14 [igt-dev] [PATCH i-g-t 01/12] lib/igt_fb: Make igt_remove_fb more robust Maarten Lankhorst
2018-02-06 10:14 ` [igt-dev] [PATCH i-g-t 02/12] tests: Always call igt_remove_fb without checking Maarten Lankhorst
2018-02-07 13:42   ` Mika Kahola
2018-02-06 10:14 ` [igt-dev] [PATCH i-g-t 03/12] lib/igt_fb: Add igt_fb_supported_format() Maarten Lankhorst
2018-02-08  8:08   ` Mika Kahola
2018-02-06 10:14 ` [igt-dev] [PATCH i-g-t 04/12] lib/igt_fb: Remove igt_get_all_cairo_formats() Maarten Lankhorst
2018-02-08  8:15   ` Mika Kahola
2018-02-06 10:14 ` [igt-dev] [PATCH i-g-t 05/12] lib/igt_debugfs: Add igt_pipe_crc_get_single and igt_pipe_crc_drain Maarten Lankhorst
2018-02-06 16:11   ` Ville Syrjälä
2018-02-06 16:30     ` Maarten Lankhorst
2018-02-07 11:47     ` [igt-dev] [PATCH i-g-t] lib/igt_debugfs: Add igt_pipe_crc_get_single and igt_pipe_crc_drain, v2 Maarten Lankhorst
2018-02-08 11:15       ` Mika Kahola
2018-02-08 12:31         ` [PATCH i-g-t] lib/igt_debugfs: Add igt_pipe_crc_get_single and igt_pipe_crc_drain, v3 Maarten Lankhorst
2018-02-09 10:01           ` [igt-dev] [PATCH i-g-t] lib/igt_debugfs: Add igt_pipe_crc_get_single and igt_pipe_crc_drain, v4 Maarten Lankhorst
2018-02-06 10:14 ` [igt-dev] [PATCH i-g-t 06/12] tests/kms_rotation_crc: Fix bad-tiling testcase Maarten Lankhorst
2018-02-08 12:08   ` Mika Kahola
2018-02-08 12:12     ` Maarten Lankhorst
2018-02-08 12:19   ` Mika Kahola
2018-02-06 10:14 ` [igt-dev] [PATCH i-g-t 07/12] tests/kms_rotation_crc: Move bad_format parameter to test_plane_rotation Maarten Lankhorst
2018-02-08 13:07   ` Mika Kahola
2018-02-06 10:14 ` [igt-dev] [PATCH i-g-t 08/12] tests/kms_rotation_crc: Always run the flip tests when available Maarten Lankhorst
2018-02-06 10:14 ` [igt-dev] [PATCH i-g-t 09/12] tests/kms_rotation_crc: Remove primary-rotation-90-Y-tiled Maarten Lankhorst
2018-02-09  8:25   ` Kahola, Mika
2018-02-06 10:14 ` [igt-dev] [PATCH i-g-t 10/12] tests/kms_rotation_crc: Perform lazy cleanup and require atomic Maarten Lankhorst
2018-02-09  9:39   ` Kahola, Mika
2018-02-06 10:14 ` [igt-dev] [PATCH i-g-t 11/12] tests/kms_rotation_crc: Clean up exhaust-fences subtest Maarten Lankhorst
2018-02-12 11:20   ` Mika Kahola
2018-02-06 10:14 ` [igt-dev] [PATCH i-g-t 12/12] tests/kms_rotation_crc: Test all pixel formats on all planes Maarten Lankhorst
2018-02-08  3:33   ` Srinivas, Vidya
2018-02-12 13:09   ` Mika Kahola
2018-02-12 14:20     ` Maarten Lankhorst
2018-02-06 11:25 ` [igt-dev] ✗ Fi.CI.BAT: warning for series starting with [i-g-t,01/12] lib/igt_fb: Make igt_remove_fb more robust Patchwork
2018-02-07 13:30 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,01/12] lib/igt_fb: Make igt_remove_fb more robust (rev2) Patchwork
2018-02-07 13:39 ` [igt-dev] [PATCH i-g-t 01/12] lib/igt_fb: Make igt_remove_fb more robust Mika Kahola
2018-02-07 16:36 ` [igt-dev] ✗ Fi.CI.IGT: failure for series starting with [i-g-t,01/12] lib/igt_fb: Make igt_remove_fb more robust (rev2) Patchwork
2018-02-08 19:06 ` ✓ Fi.CI.BAT: success for lib/igt_debugfs: Add igt_pipe_crc_get_single and igt_pipe_crc_drain, v3 Patchwork
2018-02-09  4:48 ` ✗ Fi.CI.IGT: failure " Patchwork
2018-02-09 16:33 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,01/12] lib/igt_fb: Make igt_remove_fb more robust (rev3) Patchwork
2018-02-09 18:21 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.