From: Matthew Auld <matthew.auld@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
intel-gfx@lists.freedesktop.org,
"Nirmoy Das" <nirmoy.das@linux.intel.com>
Subject: [igt-dev] [PATCH i-g-t 1/4] test/gem_lmem_swapping: account for object rounding
Date: Thu, 24 Mar 2022 14:26:18 +0000 [thread overview]
Message-ID: <20220324142621.347452-2-matthew.auld@intel.com> (raw)
In-Reply-To: <20220324142621.347452-1-matthew.auld@intel.com>
On DG2 the object size might be rounded when allocating lmem. Make sure
we account for any rounding up.
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Cc: Nirmoy Das <nirmoy.das@linux.intel.com>
---
tests/i915/gem_lmem_swapping.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/tests/i915/gem_lmem_swapping.c b/tests/i915/gem_lmem_swapping.c
index 582111dd..193ff370 100644
--- a/tests/i915/gem_lmem_swapping.c
+++ b/tests/i915/gem_lmem_swapping.c
@@ -72,7 +72,7 @@ struct object {
};
static uint32_t create_bo(int i915,
- uint64_t size,
+ uint64_t *size,
struct drm_i915_gem_memory_class_instance *region,
bool do_oom_test)
{
@@ -80,7 +80,7 @@ static uint32_t create_bo(int i915,
int ret;
retry:
- ret = __gem_create_in_memory_region_list(i915, &handle, &size, region, 1);
+ ret = __gem_create_in_memory_region_list(i915, &handle, size, region, 1);
if (do_oom_test && ret == -ENOMEM)
goto retry;
igt_assert_eq(ret, 0);
@@ -172,7 +172,7 @@ static void __do_evict(int i915,
__gem_context_set_persistence(i915, 0, false);
size = 4096;
- batch = create_bo(i915, size, region, params->oom_test);
+ batch = create_bo(i915, &size, region, params->oom_test);
gem_write(i915, batch, 0, &bbe, sizeof(bbe));
@@ -199,7 +199,7 @@ static void __do_evict(int i915,
params->count = i;
break;
}
- obj->handle = create_bo(i915, obj->size, region, params->oom_test);
+ obj->handle = create_bo(i915, &obj->size, region, params->oom_test);
move_to_lmem(i915, objects + i, 1, batch, engine,
params->oom_test);
@@ -270,7 +270,7 @@ static void fill_params(int i915, struct params *params,
if (flags & TEST_RANDOM) {
params->size.min = 4096;
- handle = create_bo(i915, params->size.min, ®ion->region,
+ handle = create_bo(i915, ¶ms->size.min, ®ion->region,
do_oom_test);
gem_close(i915, handle);
params->size.max = 2 * size + params->size.min;
--
2.34.1
WARNING: multiple messages have this Message-ID (diff)
From: Matthew Auld <matthew.auld@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
intel-gfx@lists.freedesktop.org
Subject: [Intel-gfx] [PATCH i-g-t 1/4] test/gem_lmem_swapping: account for object rounding
Date: Thu, 24 Mar 2022 14:26:18 +0000 [thread overview]
Message-ID: <20220324142621.347452-2-matthew.auld@intel.com> (raw)
In-Reply-To: <20220324142621.347452-1-matthew.auld@intel.com>
On DG2 the object size might be rounded when allocating lmem. Make sure
we account for any rounding up.
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Cc: Nirmoy Das <nirmoy.das@linux.intel.com>
---
tests/i915/gem_lmem_swapping.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/tests/i915/gem_lmem_swapping.c b/tests/i915/gem_lmem_swapping.c
index 582111dd..193ff370 100644
--- a/tests/i915/gem_lmem_swapping.c
+++ b/tests/i915/gem_lmem_swapping.c
@@ -72,7 +72,7 @@ struct object {
};
static uint32_t create_bo(int i915,
- uint64_t size,
+ uint64_t *size,
struct drm_i915_gem_memory_class_instance *region,
bool do_oom_test)
{
@@ -80,7 +80,7 @@ static uint32_t create_bo(int i915,
int ret;
retry:
- ret = __gem_create_in_memory_region_list(i915, &handle, &size, region, 1);
+ ret = __gem_create_in_memory_region_list(i915, &handle, size, region, 1);
if (do_oom_test && ret == -ENOMEM)
goto retry;
igt_assert_eq(ret, 0);
@@ -172,7 +172,7 @@ static void __do_evict(int i915,
__gem_context_set_persistence(i915, 0, false);
size = 4096;
- batch = create_bo(i915, size, region, params->oom_test);
+ batch = create_bo(i915, &size, region, params->oom_test);
gem_write(i915, batch, 0, &bbe, sizeof(bbe));
@@ -199,7 +199,7 @@ static void __do_evict(int i915,
params->count = i;
break;
}
- obj->handle = create_bo(i915, obj->size, region, params->oom_test);
+ obj->handle = create_bo(i915, &obj->size, region, params->oom_test);
move_to_lmem(i915, objects + i, 1, batch, engine,
params->oom_test);
@@ -270,7 +270,7 @@ static void fill_params(int i915, struct params *params,
if (flags & TEST_RANDOM) {
params->size.min = 4096;
- handle = create_bo(i915, params->size.min, ®ion->region,
+ handle = create_bo(i915, ¶ms->size.min, ®ion->region,
do_oom_test);
gem_close(i915, handle);
params->size.max = 2 * size + params->size.min;
--
2.34.1
next prev parent reply other threads:[~2022-03-24 14:26 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-24 14:26 [igt-dev] [PATCH i-g-t 0/4] Some gem_lmem_swapping tweaks Matthew Auld
2022-03-24 14:26 ` [Intel-gfx] " Matthew Auld
2022-03-24 14:26 ` Matthew Auld [this message]
2022-03-24 14:26 ` [Intel-gfx] [PATCH i-g-t 1/4] test/gem_lmem_swapping: account for object rounding Matthew Auld
2022-03-24 17:25 ` [igt-dev] " Dixit, Ashutosh
2022-03-24 17:25 ` Dixit, Ashutosh
2022-03-25 8:05 ` [igt-dev] " Thomas Hellström
2022-03-25 8:05 ` [Intel-gfx] " Thomas Hellström
2022-03-24 14:26 ` [igt-dev] [PATCH i-g-t 2/4] test/gem_lmem_swapping: fix physical engine usage Matthew Auld
2022-03-24 14:26 ` [Intel-gfx] " Matthew Auld
2022-03-24 14:46 ` [igt-dev] " Tvrtko Ursulin
2022-03-24 14:46 ` Tvrtko Ursulin
2022-03-24 17:39 ` [igt-dev] " Dixit, Ashutosh
2022-03-24 17:39 ` [Intel-gfx] " Dixit, Ashutosh
2022-03-24 14:26 ` [igt-dev] [PATCH i-g-t 3/4] tests/gem_lmem_swapping: limit lmem to 4G Matthew Auld
2022-03-24 14:26 ` [Intel-gfx] " Matthew Auld
2022-03-24 14:33 ` [igt-dev] " Thomas Hellström
2022-03-24 14:33 ` [Intel-gfx] " Thomas Hellström
2022-03-24 17:47 ` [igt-dev] " Dixit, Ashutosh
2022-03-24 17:47 ` [Intel-gfx] " Dixit, Ashutosh
2022-03-25 8:40 ` Matthew Auld
2022-03-25 8:40 ` [Intel-gfx] " Matthew Auld
2022-03-25 10:02 ` Petri Latvala
2022-03-25 10:02 ` [Intel-gfx] " Petri Latvala
2022-03-25 10:13 ` Das, Nirmoy
2022-03-25 10:13 ` [Intel-gfx] " Das, Nirmoy
2022-03-25 10:18 ` [igt-dev] " Petri Latvala
2022-03-25 10:18 ` [Intel-gfx] " Petri Latvala
2022-03-25 10:20 ` Matthew Auld
2022-03-25 10:20 ` [Intel-gfx] " Matthew Auld
2022-03-24 14:26 ` [igt-dev] [PATCH i-g-t 4/4] tests/gem_lmem_swapping: reduce the timeout Matthew Auld
2022-03-24 14:26 ` [Intel-gfx] " Matthew Auld
2022-03-25 7:21 ` [igt-dev] " Thomas Hellström
2022-03-25 7:21 ` [Intel-gfx] " Thomas Hellström
2022-03-24 15:36 ` [igt-dev] ✓ Fi.CI.BAT: success for Some gem_lmem_swapping tweaks Patchwork
2022-03-24 19:34 ` [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=20220324142621.347452-2-matthew.auld@intel.com \
--to=matthew.auld@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=nirmoy.das@linux.intel.com \
--cc=thomas.hellstrom@linux.intel.com \
/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.