All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ananya Sharma <ananya.sharma@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t 1/2] tests/kms_draw_crc: replacing drmModeRmFb with igt_remove_fb
Date: Mon, 20 Dec 2021 15:11:52 +0530	[thread overview]
Message-ID: <20211220094153.282527-2-ananya.sharma@intel.com> (raw)
In-Reply-To: <20211220094153.282527-1-ananya.sharma@intel.com>

Signed-off-by: Ananya Sharma <ananya.sharma@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

  reply	other threads:[~2021-12-20  9:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-20  9:41 [igt-dev] [PATCH i-g-t 0/2] Replacing DRM calls in few tests Ananya Sharma
2021-12-20  9:41 ` Ananya Sharma [this message]
2021-12-20  9:41 ` [igt-dev] [PATCH i-g-t 2/2] tests/kms_lease: replacing drmModeAtomicCommit Ananya Sharma
2021-12-20 13:39   ` Petri Latvala
2021-12-20 10:46 ` [igt-dev] ✓ Fi.CI.BAT: success for Replacing DRM calls in few tests Patchwork
2021-12-20 12:20 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211220094153.282527-2-ananya.sharma@intel.com \
    --to=ananya.sharma@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.