From: "Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t 06/12] lib/intel_allocator: Add field to distinct underlying driver
Date: Tue, 4 Jul 2023 11:00:58 +0200 [thread overview]
Message-ID: <20230704090104.120219-7-zbigniew.kempczynski@intel.com> (raw)
In-Reply-To: <20230704090104.120219-1-zbigniew.kempczynski@intel.com>
Cache what driver is using on drm fd to avoid calling same code
in allocator functions.
Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
---
lib/intel_allocator.c | 1 +
lib/intel_allocator.h | 3 +++
2 files changed, 4 insertions(+)
diff --git a/lib/intel_allocator.c b/lib/intel_allocator.c
index 8161221dbf..c98c410b3b 100644
--- a/lib/intel_allocator.c
+++ b/lib/intel_allocator.c
@@ -318,6 +318,7 @@ static struct intel_allocator *intel_allocator_create(int fd,
igt_assert(ial);
+ ial->driver = get_intel_driver(fd);
ial->type = allocator_type;
ial->strategy = allocator_strategy;
ial->default_alignment = default_alignment;
diff --git a/lib/intel_allocator.h b/lib/intel_allocator.h
index a6bf573e9d..ed3a78485d 100644
--- a/lib/intel_allocator.h
+++ b/lib/intel_allocator.h
@@ -141,6 +141,9 @@ struct intel_allocator {
/* allocator's private structure */
void *priv;
+ /* driver - i915 or Xe */
+ enum intel_driver driver;
+
void (*get_address_range)(struct intel_allocator *ial,
uint64_t *startp, uint64_t *endp);
uint64_t (*alloc)(struct intel_allocator *ial, uint32_t handle,
--
2.34.1
next prev parent reply other threads:[~2023-07-04 9:01 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-04 9:00 [igt-dev] [PATCH i-g-t 00/12] Extend intel_blt to work on Xe Zbigniew Kempczyński
2023-07-04 9:00 ` [igt-dev] [PATCH i-g-t 01/12] lib/xe_query: Use vramN when returning string region name Zbigniew Kempczyński
2023-07-05 10:58 ` Karolina Stolarek
2023-07-05 11:34 ` Karolina Stolarek
2023-07-04 9:00 ` [igt-dev] [PATCH i-g-t 02/12] lib/xe_query: Add xe_region_class() helper Zbigniew Kempczyński
2023-07-05 11:48 ` Karolina Stolarek
2023-07-04 9:00 ` [igt-dev] [PATCH i-g-t 03/12] lib/drmtest: Add get_intel_driver() helper Zbigniew Kempczyński
2023-07-05 12:09 ` Karolina Stolarek
2023-07-04 9:00 ` [igt-dev] [PATCH i-g-t 04/12] lib/xe_util: Return dynamic subtest name for Xe Zbigniew Kempczyński
2023-07-05 12:54 ` Karolina Stolarek
2023-07-06 5:17 ` Zbigniew Kempczyński
2023-07-06 7:42 ` Karolina Stolarek
2023-07-04 9:00 ` [igt-dev] [PATCH i-g-t 05/12] lib/xe_util: Add vm bind/unbind helper " Zbigniew Kempczyński
2023-07-05 15:12 ` Karolina Stolarek
2023-07-06 5:34 ` Zbigniew Kempczyński
2023-07-06 10:16 ` Karolina Stolarek
2023-07-04 9:00 ` Zbigniew Kempczyński [this message]
2023-07-04 9:00 ` [igt-dev] [PATCH i-g-t 07/12] lib/intel_allocator: Add intel_allocator_bind() Zbigniew Kempczyński
2023-07-04 9:01 ` [igt-dev] [PATCH i-g-t 08/12] lib/intel_ctx: Add xe context information Zbigniew Kempczyński
2023-07-04 9:01 ` [igt-dev] [PATCH i-g-t 09/12] lib/intel_blt: Introduce blt_copy_init() helper to cache driver Zbigniew Kempczyński
2023-07-04 9:01 ` [igt-dev] [PATCH i-g-t 10/12] lib/intel_blt: Extend blitter library to support xe driver Zbigniew Kempczyński
2023-07-04 9:01 ` [igt-dev] [PATCH i-g-t 11/12] tests/xe_ccs: Check if flatccs is working with block-copy for Xe Zbigniew Kempczyński
2023-07-04 9:01 ` [igt-dev] [PATCH i-g-t 12/12] tests/xe_exercise_blt: Check blitter library fast-copy " Zbigniew Kempczyński
2023-07-04 10:02 ` [igt-dev] ✗ Fi.CI.BAT: failure for Extend intel_blt to work on Xe 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=20230704090104.120219-7-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