From: Robert Beckett <bob.beckett@collabora.com>
To: "Thomas Hellström (Intel)" <thomas_os@shipmail.org>,
"Jani Nikula" <jani.nikula@linux.intel.com>,
"Joonas Lahtinen" <joonas.lahtinen@linux.intel.com>,
"Rodrigo Vivi" <rodrigo.vivi@intel.com>,
"Tvrtko Ursulin" <tvrtko.ursulin@linux.intel.com>,
"David Airlie" <airlied@linux.ie>,
"Daniel Vetter" <daniel@ffwll.ch>
Cc: intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org,
dri-devel@lists.freedesktop.org,
Matthew Auld <matthew.auld@intel.com>
Subject: Re: [Intel-gfx] [PATCH v5 2/5] drm/i915: enforce min GTT alignment for discrete cards
Date: Wed, 26 Jan 2022 17:21:51 +0000 [thread overview]
Message-ID: <b49d0645-9df0-55d7-3fdb-630befec7656@collabora.com> (raw)
In-Reply-To: <9f011e69-2d6d-d6a1-db78-d4a061b4ef2c@shipmail.org>
On 26/01/2022 15:45, Thomas Hellström (Intel) wrote:
>
> On 1/25/22 20:35, Robert Beckett wrote:
>> From: Matthew Auld <matthew.auld@intel.com>
>>
>> For local-memory objects we need to align the GTT addresses
>> to 64K, both for the ppgtt and ggtt.
>>
>> We need to support vm->min_alignment > 4K, depending
>> on the vm itself and the type of object we are inserting.
>> With this in mind update the GTT selftests to take this
>> into account.
>>
>> For compact-pt we further align and pad lmem object GTT addresses
>> to 2MB to ensure PDEs contain consistent page sizes as
>> required by the HW.
>>
>> v3:
>> * use needs_compact_pt flag to discriminate between
>> 64K and 64K with compact-pt
>> * add i915_vm_obj_min_alignment
>> * use i915_vm_obj_min_alignment to round up vma reservation
>> if compact-pt instead of hard coding
>> v5:
>> * fix i915_vm_obj_min_alignment for internal objects which
>> have no memory region
>>
>> Signed-off-by: Matthew Auld <matthew.auld@intel.com>
>> Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
>> Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
>> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
>> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
>> ---
>> .../i915/gem/selftests/i915_gem_client_blt.c | 23 +++--
>> drivers/gpu/drm/i915/gt/intel_gtt.c | 12 +++
>> drivers/gpu/drm/i915/gt/intel_gtt.h | 18 ++++
>> drivers/gpu/drm/i915/i915_vma.c | 9 ++
>> drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 96 ++++++++++++-------
>> 5 files changed, 117 insertions(+), 41 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/gem/selftests/i915_gem_client_blt.c
>> b/drivers/gpu/drm/i915/gem/selftests/i915_gem_client_blt.c
>> index c8ff8bf0986d..f0bfce53258f 100644
>> --- a/drivers/gpu/drm/i915/gem/selftests/i915_gem_client_blt.c
>> +++ b/drivers/gpu/drm/i915/gem/selftests/i915_gem_client_blt.c
>> @@ -39,6 +39,7 @@ struct tiled_blits {
>> struct blit_buffer scratch;
>> struct i915_vma *batch;
>> u64 hole;
>> + u64 align;
>> u32 width;
>> u32 height;
>> };
>> @@ -410,14 +411,21 @@ tiled_blits_create(struct intel_engine_cs
>> *engine, struct rnd_state *prng)
>> goto err_free;
>> }
>> - hole_size = 2 * PAGE_ALIGN(WIDTH * HEIGHT * 4);
>> + t->align = I915_GTT_PAGE_SIZE_2M; /* XXX worst case, derive from
>> vm! */
>> + t->align = max(t->align,
>> + i915_vm_min_alignment(t->ce->vm, INTEL_MEMORY_LOCAL));
>> + t->align = max(t->align,
>> + i915_vm_min_alignment(t->ce->vm, INTEL_MEMORY_SYSTEM));
>
> Don't we always end up with 2M here, regardless of the vm restrictions?
agreed. I will drop the 2M worst case.
>
>
next prev parent reply other threads:[~2022-01-26 17:22 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20220125193530.3272386-1-bob.beckett@collabora.com>
2022-01-25 19:35 ` [PATCH v5 1/5] drm/i915: add needs_compact_pt flag Robert Beckett
2022-01-26 13:49 ` [Intel-gfx] " Thomas Hellström (Intel)
2022-01-26 17:11 ` Robert Beckett
2022-01-27 9:37 ` Thomas Hellström (Intel)
2022-01-31 14:19 ` Robert Beckett
2022-01-31 14:58 ` Thomas Hellström
2022-01-25 19:35 ` [PATCH v5 2/5] drm/i915: enforce min GTT alignment for discrete cards Robert Beckett
2022-01-26 15:45 ` [Intel-gfx] " Thomas Hellström (Intel)
2022-01-26 17:21 ` Robert Beckett [this message]
2022-01-25 19:35 ` [PATCH v5 3/5] drm/i915: support 64K GTT pages " Robert Beckett
2022-01-31 11:19 ` [Intel-gfx] " Thomas Hellström
2022-01-25 19:35 ` [PATCH v5 4/5] drm/i915: add gtt misalignment test Robert Beckett
2022-01-26 14:05 ` [Intel-gfx] " Thomas Hellström (Intel)
2022-01-26 17:22 ` Robert Beckett
2022-01-25 19:35 ` [PATCH v5 5/5] drm/i915/uapi: document behaviour for DG2 64K support Robert Beckett
2022-01-26 14:11 ` [Intel-gfx] " Thomas Hellström (Intel)
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=b49d0645-9df0-55d7-3fdb-630befec7656@collabora.com \
--to=bob.beckett@collabora.com \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=joonas.lahtinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=matthew.auld@intel.com \
--cc=rodrigo.vivi@intel.com \
--cc=thomas_os@shipmail.org \
--cc=tvrtko.ursulin@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome