public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t v4 09/11] lib/ioctl_wrappers: Remove gem_handle_to_libdrm_bo
Date: Tue,  6 Dec 2022 08:47:06 +0100	[thread overview]
Message-ID: <20221206074708.30690-10-zbigniew.kempczynski@intel.com> (raw)
In-Reply-To: <20221206074708.30690-1-zbigniew.kempczynski@intel.com>

Function is not used anymore in IGT so lets remove it, especially it
keeps libdrm dependency.

Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Cc: Petri Latvala <petri.latvala@intel.com>
---
 lib/ioctl_wrappers.c | 31 -------------------------------
 lib/ioctl_wrappers.h |  5 -----
 2 files changed, 36 deletions(-)

diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c
index 09eb3ce7b5..1ab41ab6d6 100644
--- a/lib/ioctl_wrappers.c
+++ b/lib/ioctl_wrappers.c
@@ -92,37 +92,6 @@
 int (*igt_ioctl)(int fd, unsigned long request, void *arg) = drmIoctl;
 
 
-/**
- * gem_handle_to_libdrm_bo:
- * @bufmgr: libdrm buffer manager instance
- * @fd: open i915 drm file descriptor
- * @name: buffer name in libdrm
- * @handle: gem buffer object handle
- *
- * This helper function imports a raw gem buffer handle into the libdrm buffer
- * manager.
- *
- * Returns: The imported libdrm buffer manager object.
- */
-drm_intel_bo *
-gem_handle_to_libdrm_bo(drm_intel_bufmgr *bufmgr, int fd, const char *name, uint32_t handle)
-{
-	struct drm_gem_flink flink;
-	int ret;
-	drm_intel_bo *bo;
-
-	memset(&flink, 0, sizeof(handle));
-	flink.handle = handle;
-	ret = ioctl(fd, DRM_IOCTL_GEM_FLINK, &flink);
-	igt_assert(ret == 0);
-	errno = 0;
-
-	bo = drm_intel_bo_gem_create_from_name(bufmgr, name, flink.name);
-	igt_assert(bo);
-
-	return bo;
-}
-
 static int
 __gem_get_tiling(int fd, struct drm_i915_gem_get_tiling *arg)
 {
diff --git a/lib/ioctl_wrappers.h b/lib/ioctl_wrappers.h
index 9a897fec23..cf228c2651 100644
--- a/lib/ioctl_wrappers.h
+++ b/lib/ioctl_wrappers.h
@@ -33,7 +33,6 @@
 #include <stdint.h>
 #include <stdbool.h>
 #include <sys/mman.h>
-#include <intel_bufmgr.h>
 #include <i915_drm.h>
 
 #include "i915/gem_context.h"
@@ -51,10 +50,6 @@
  */
 extern int (*igt_ioctl)(int fd, unsigned long request, void *arg);
 
-/* libdrm interfacing */
-drm_intel_bo * gem_handle_to_libdrm_bo(drm_intel_bufmgr *bufmgr, int fd,
-				       const char *name, uint32_t handle);
-
 /* ioctl_wrappers.c:
  *
  * ioctl wrappers and similar stuff for bare metal testing */
-- 
2.34.1

  parent reply	other threads:[~2022-12-06  7:47 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-06  7:46 [igt-dev] [PATCH i-g-t v4 00/11] Remove libdrm remnants in i915 code Zbigniew Kempczyński
2022-12-06  7:46 ` [igt-dev] [PATCH i-g-t v4 01/11] tests/i915_pipe_stress: Remove unused bufmgr field Zbigniew Kempczyński
2022-12-06  7:46 ` [igt-dev] [PATCH i-g-t v4 02/11] tests/prime_udl: Remove intel-libdrm dependency Zbigniew Kempczyński
2022-12-06  7:47 ` [igt-dev] [PATCH i-g-t v4 03/11] tests/prime_nv: Remove intel-libdrm calls Zbigniew Kempczyński
2022-12-06  7:47 ` [igt-dev] [PATCH i-g-t v4 04/11] tests/drm_import_export: Remove the test Zbigniew Kempczyński
2022-12-06  7:47 ` [igt-dev] [PATCH i-g-t v4 05/11] benchmarks/intel_upload_blit_*: Remove libdrm in upload blits Zbigniew Kempczyński
2022-12-06  7:47 ` [igt-dev] [PATCH i-g-t v4 06/11] lib/intel_batchbuffer: Get rid of libdrm batchbuffer Zbigniew Kempczyński
2022-12-06  7:47 ` [igt-dev] [PATCH i-g-t v4 07/11] lib/intel_decode: Get drm decode code and adopt to use in igt Zbigniew Kempczyński
2022-12-06  7:47 ` [igt-dev] [PATCH i-g-t v4 08/11] tools/intel_dump|error_decode: Use local igt decode code Zbigniew Kempczyński
2022-12-06  7:47 ` Zbigniew Kempczyński [this message]
2022-12-06  7:47 ` [igt-dev] [PATCH i-g-t v4 10/11] tools/meson: Move tools out of libdrm scope Zbigniew Kempczyński
2022-12-06  7:47 ` [igt-dev] [PATCH i-g-t v4 11/11] lib/meson: Remove libdrm configuration and intel_bufmgr stubs Zbigniew Kempczyński
2022-12-06  9:07 ` [igt-dev] ✓ Fi.CI.BAT: success for Remove libdrm remnants in i915 code (rev4) Patchwork
2022-12-06 10:35 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2022-12-14  8:21   ` Petri Latvala
2022-12-14 12:18     ` Zbigniew Kempczyński
2022-12-14 14:01       ` Petri Latvala
2022-12-14 16:39         ` Zbigniew Kempczyński

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=20221206074708.30690-10-zbigniew.kempczynski@intel.com \
    --to=zbigniew.kempczynski@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox