[igt-dev] [PATCH i-g-t 1/2] tests/kms_draw_crc: replacing drmModeRmFb with igt_remove_fb
Ananya Sharma
ananya.sharma at intel.com
Mon Dec 20 09:41:52 UTC 2021
Signed-off-by: Ananya Sharma <ananya.sharma at intel.com>
---
tests/kms_draw_crc.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tests/kms_draw_crc.c b/tests/kms_draw_crc.c
index 5e3252b7..b40a84a7 100644
--- a/tests/kms_draw_crc.c
+++ b/tests/kms_draw_crc.c
@@ -160,6 +160,10 @@ static bool format_is_supported(uint32_t format, uint64_t modifier)
unsigned int offsets[4] = {};
unsigned int strides[4] = {};
int ret;
+ struct igt_fb fb;
+ igt_create_fb(drm_fd, ms.mode->hdisplay, ms.mode->vdisplay,
+ format, modifier, &fb);
+
gem_handle = igt_create_bo_with_dimensions(drm_fd, 64, 64,
format, modifier,
@@ -167,7 +171,7 @@ static bool format_is_supported(uint32_t format, uint64_t modifier)
ret = __kms_addfb(drm_fd, gem_handle, 64, 64,
format, modifier, strides, offsets, 1,
DRM_MODE_FB_MODIFIERS, &fb_id);
- drmModeRmFB(drm_fd, fb_id);
+ igt_remove_fb(drm_fd, &fb);
gem_close(drm_fd, gem_handle);
return ret == 0;
--
2.25.1
More information about the igt-dev
mailing list