From: "Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t 2/3] lib/igt_dummyload: Don't assume dependency object size
Date: Wed, 11 Jan 2023 19:12:04 +0100 [thread overview]
Message-ID: <20230111181205.55997-3-zbigniew.kempczynski@intel.com> (raw)
In-Reply-To: <20230111181205.55997-1-zbigniew.kempczynski@intel.com>
Most of the tests use page size for dependency object so spinner
had this value hardcoded as a default. But there're exceptions
where dependency object is bigger and for softpin path we need to
allow pass this size to properly acquire offsets from the allocator.
Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
---
lib/igt_dummyload.c | 4 +++-
lib/igt_dummyload.h | 1 +
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/lib/igt_dummyload.c b/lib/igt_dummyload.c
index 17ae21f567..5f3c6b10c7 100644
--- a/lib/igt_dummyload.c
+++ b/lib/igt_dummyload.c
@@ -186,10 +186,12 @@ emit_recursive_batch(igt_spin_t *spin,
addr += BATCH_SIZE;
if (opts->dependency) {
+ uint64_t dep_size = opts->dependency_size ?: BATCH_SIZE;
+
igt_assert(!(opts->flags & IGT_SPIN_POLL_RUN));
if (ahnd)
addr_scratch = intel_allocator_alloc_with_strategy(ahnd, opts->dependency,
- BATCH_SIZE, 0,
+ dep_size, 0,
ALLOC_STRATEGY_LOW_TO_HIGH);
else
addr_scratch = addr;
diff --git a/lib/igt_dummyload.h b/lib/igt_dummyload.h
index b33507971b..b247ab02b2 100644
--- a/lib/igt_dummyload.h
+++ b/lib/igt_dummyload.h
@@ -49,6 +49,7 @@ typedef struct igt_spin_factory {
uint32_t ctx_id;
const intel_ctx_t *ctx;
uint32_t dependency;
+ uint64_t dependency_size;
unsigned int engine;
unsigned int flags;
int fence;
--
2.34.1
next prev parent reply other threads:[~2023-01-11 18:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-11 18:12 [igt-dev] [PATCH i-g-t 0/3] Fix kms_cursor_legacy ENOSPC issue Zbigniew Kempczyński
2023-01-11 18:12 ` [igt-dev] [PATCH i-g-t 1/3] lib/intel_allocator: Fix alignment variable used in debug path Zbigniew Kempczyński
2023-01-12 12:17 ` Kamil Konieczny
2023-01-11 18:12 ` Zbigniew Kempczyński [this message]
2023-01-12 12:18 ` [igt-dev] [PATCH i-g-t 2/3] lib/igt_dummyload: Don't assume dependency object size Kamil Konieczny
2023-01-11 18:12 ` [igt-dev] [PATCH i-g-t 3/3] tests/kms_cursor_legacy: Add dependency size for spinner creation Zbigniew Kempczyński
2023-01-12 13:07 ` Kamil Konieczny
2023-01-12 13:23 ` Kamil Konieczny
2023-01-11 19:06 ` [igt-dev] ✓ Fi.CI.BAT: success for Fix kms_cursor_legacy ENOSPC issue Patchwork
2023-01-12 2:07 ` [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=20230111181205.55997-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