From: "Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t v4 2/5] lib/intel_blt: Add visible vram flag if object needs to be mapped
Date: Tue, 24 Oct 2023 19:36:15 +0200 [thread overview]
Message-ID: <20231024173618.127007-3-zbigniew.kempczynski@intel.com> (raw)
In-Reply-To: <20231024173618.127007-1-zbigniew.kempczynski@intel.com>
For objects with blitter helper in vram which needs to be mapped
add visible vram flag to ensure it will be placed in mappable
vram region.
Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Cc: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
---
lib/intel_blt.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/lib/intel_blt.c b/lib/intel_blt.c
index 0f9100b2ad..5b682c2b67 100644
--- a/lib/intel_blt.c
+++ b/lib/intel_blt.c
@@ -1801,8 +1801,13 @@ blt_create_object(const struct blt_copy_data *blt, uint32_t region,
obj->size = size;
if (blt->driver == INTEL_DRIVER_XE) {
+ uint64_t flags = region;
+
+ if (create_mapping && region != system_memory(blt->fd))
+ flags |= XE_GEM_CREATE_FLAG_NEEDS_VISIBLE_VRAM;
+
size = ALIGN(size, xe_get_default_alignment(blt->fd));
- handle = xe_bo_create_flags(blt->fd, 0, size, region);
+ handle = xe_bo_create_flags(blt->fd, 0, size, flags);
} else {
igt_assert(__gem_create_in_memory_regions(blt->fd, &handle,
&size, region) == 0);
--
2.34.1
next prev parent reply other threads:[~2023-10-24 17:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-24 17:36 [igt-dev] [PATCH i-g-t v4 0/5] Add flat-ccs tests Zbigniew Kempczyński
2023-10-24 17:36 ` [igt-dev] [PATCH i-g-t v4 1/5] lib/intel_blt: Release an offset in the allocator on buffer destroy Zbigniew Kempczyński
2023-10-24 17:36 ` Zbigniew Kempczyński [this message]
2023-10-24 17:36 ` [igt-dev] [PATCH i-g-t v4 3/5] lib/igt_sizes: Add common SZ_* header Zbigniew Kempczyński
2023-10-25 16:25 ` Kamil Konieczny
2023-10-24 17:36 ` [igt-dev] [PATCH i-g-t v4 4/5] tests/xe_evict_ccs: Add evict ccs test Zbigniew Kempczyński
2023-10-24 17:36 ` [igt-dev] [PATCH i-g-t v4 5/5] intel-ci/xe-fast-feedback: Add two xe_evict_ccs subtests for Xe run Zbigniew Kempczyński
2023-10-24 18:19 ` [igt-dev] ✓ Fi.CI.BAT: success for Add flat-ccs tests (rev4) Patchwork
2023-10-25 8:57 ` [igt-dev] ✗ Fi.CI.IGT: failure " 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=20231024173618.127007-3-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