Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Auld <matthew.auld@intel.com>
To: intel-xe@lists.freedesktop.org
Subject: [Intel-xe] [PATCH v2 0/6] PAT and cache coherency support
Date: Thu, 14 Sep 2023 16:31:13 +0100	[thread overview]
Message-ID: <20230914153112.455547-8-matthew.auld@intel.com> (raw)

Branch available here (lightly tested):
https://gitlab.freedesktop.org/mwa/kernel/-/tree/xe-pat-index?ref_type=heads

Series still needs some more testing. Also note that the series directly depends
on the WIP patch here: https://patchwork.freedesktop.org/series/122708/

Goal here is to allow userspace to directly control the pat_index when mapping
memory via the ppGTT, in addtion to the CPU caching mode for system memory. This
is very much needed on newer igpu platforms which allow incoherent GT access,
where the choice over the cache level and expected coherency is best left to
userspace depending on their usecase.  In the future there may also be other
stuff encoded in the pat_index, so giving userspace direct control will also be
needed there.

To support this we added new gem_create uAPI for selecting the CPU cache
mode to use for system memory, including the expected GPU coherency mode. There
are various restrictions here for the selected coherency mode and compatible CPU
cache modes.  With that in place the actual pat_index can now be provided as
part of vm_bind. The only restriction is that the coherency mode of the
pat_index must be at least as coherent as the gem_create coherency mode. There
are also some special cases like with userptr and dma-buf.

v2:
  - Loads of improvements/tweaks. Main changes are to now allow
    gem_create.coh_mode <= coh_mode(pat_index), rather than it needing to match
    exactly. This simplifies the dma-buf policy from userspace pov. Also we now
    only consider COH_NONE and COH_AT_LEAST_1WAY.

-- 
2.41.0


             reply	other threads:[~2023-09-14 15:37 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-14 15:31 Matthew Auld [this message]
2023-09-14 15:31 ` [Intel-xe] [PATCH v2 1/6] drm/xe/uapi: Add support for cache and coherency mode Matthew Auld
2023-09-14 23:47   ` Matt Roper
2023-09-15  7:37     ` Matthew Auld
2023-09-21 20:07   ` Souza, Jose
2023-09-25  8:06     ` Matthew Auld
2023-09-25 18:26       ` Souza, Jose
2023-09-26  8:07         ` Matthew Auld
2023-09-26 15:59           ` Souza, Jose
2023-09-14 15:31 ` [Intel-xe] [PATCH v2 2/6] drm/xe: move pat_table into device info Matthew Auld
2023-09-14 23:53   ` Matt Roper
2023-09-14 15:31 ` [Intel-xe] [PATCH v2 3/6] drm/xe/pat: trim the tgl PAT table Matthew Auld
2023-09-14 18:07   ` Matt Roper
2023-09-14 15:31 ` [Intel-xe] [PATCH v2 4/6] drm/xe/pat: annotate pat_index with coherency mode Matthew Auld
2023-09-15  0:08   ` Matt Roper
2023-09-14 15:31 ` [Intel-xe] [PATCH v2 5/6] drm/xe/migrate: rather use pte_encode helpers Matthew Auld
2023-09-15 22:19   ` Matt Roper
2023-09-14 15:31 ` [Intel-xe] [PATCH v2 6/6] drm/xe/uapi: support pat_index selection with vm_bind Matthew Auld
2023-09-15 22:24   ` Matt Roper
2023-09-25  8:07     ` Matthew Auld
2023-09-25 21:56   ` Rodrigo Vivi
2023-09-26  8:17     ` Matthew Auld
2023-09-27 19:30       ` Rodrigo Vivi
2023-09-14 18:16 ` [Intel-xe] ✗ CI.Patch_applied: failure for PAT and cache coherency support (rev2) Patchwork
2023-09-18 15:51 ` [Intel-xe] [PATCH v2 0/6] PAT and cache coherency support Souza, Jose
2023-09-21 17:19   ` Souza, Jose
2023-09-25 13:12     ` Matthew Auld
2023-09-21 20:10 ` [Intel-xe] ✗ CI.Patch_applied: failure for PAT and cache coherency support (rev3) 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=20230914153112.455547-8-matthew.auld@intel.com \
    --to=matthew.auld@intel.com \
    --cc=intel-xe@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