mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joel Fernandes <joelagnelf@nvidia.com>
To: linux-kernel@vger.kernel.org, "Miguel Ojeda" <ojeda@kernel.org>,
	"Boqun Feng" <boqun@kernel.org>, "Gary Guo" <gary@garyguo.net>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Benno Lossin" <lossin@kernel.org>,
	"Andreas Hindborg" <a.hindborg@kernel.org>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Trevor Gross" <tmgross@umich.edu>,
	"Danilo Krummrich" <dakr@kernel.org>
Cc: Dave Airlie <airlied@redhat.com>,
	Daniel Almeida <daniel.almeida@collabora.com>,
	Koen Koning <koen.koning@linux.intel.com>,
	dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org,
	rust-for-linux@vger.kernel.org,
	Joel Fernandes <joelagnelf@nvidia.com>,
	Nikola Djukic <ndjukic@nvidia.com>
Subject: [PATCH v10 0/8] Preparatory patches for nova-core memory management
Date: Wed, 18 Feb 2026 15:54:58 -0500	[thread overview]
Message-ID: <20260218205507.689429-1-joelagnelf@nvidia.com> (raw)

These are initial preparatory patches needed for nova-core memory management
support. The series moves the DRM buddy allocator one level up so it can be
shared across GPU subsystems, adds Rust FFI and clist bindings, and creates
Rust GPU buddy allocator bindings.

The clist/ffi patches are ready, reviewed by Gary and Danilo. Miguel, can you
pull those via the rust tree?

The non-Rust DRM buddy related patches are already being pulled into upstream
by Dave Airlie but I have included them here as they are needed for the rest of
the patches (thanks to Dave for reworking them so they applied).

I will post the nova-core memory management patches as a separate follow-up
series just after this one.

The git tree with all these patches can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/jfern/linux.git (tag: nova/mm)

Joel Fernandes (7):
  gpu: Move DRM buddy allocator one level up (part one)
  gpu: Move DRM buddy allocator one level up (part two)
  rust: ffi: Convert pub use to pub mod and create ffi module
  rust: clist: Add support to interface with C linked lists
  rust: gpu: Add GPU buddy allocator bindings
  nova-core: mm: Select GPU_BUDDY for VRAM allocation
  nova-core: Kconfig: Sort select statements alphabetically

Koen Koning (1):
  gpu: Fix uninitialized buddy for built-in drivers

 Documentation/gpu/drm-mm.rst                  |   10 +-
 MAINTAINERS                                   |   15 +-
 drivers/gpu/Kconfig                           |   13 +
 drivers/gpu/Makefile                          |    3 +-
 drivers/gpu/buddy.c                           | 1322 +++++++++++++++++
 drivers/gpu/drm/Kconfig                       |    5 +-
 drivers/gpu/drm/Kconfig.debug                 |    1 -
 drivers/gpu/drm/Makefile                      |    1 -
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c       |    2 +-
 .../gpu/drm/amd/amdgpu/amdgpu_res_cursor.h    |   12 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c  |   79 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.h  |   20 +-
 drivers/gpu/drm/drm_buddy.c                   | 1277 +---------------
 drivers/gpu/drm/i915/gem/i915_gem_ttm.c       |    2 +-
 drivers/gpu/drm/i915/i915_scatterlist.c       |   10 +-
 drivers/gpu/drm/i915/i915_ttm_buddy_manager.c |   55 +-
 drivers/gpu/drm/i915/i915_ttm_buddy_manager.h |    4 +-
 .../drm/i915/selftests/intel_memory_region.c  |   20 +-
 drivers/gpu/drm/tests/Makefile                |    1 -
 drivers/gpu/drm/tests/drm_exec_test.c         |    2 -
 drivers/gpu/drm/tests/drm_mm_test.c           |    2 -
 .../gpu/drm/ttm/tests/ttm_bo_validate_test.c  |    4 +-
 drivers/gpu/drm/ttm/tests/ttm_mock_manager.c  |   18 +-
 drivers/gpu/drm/ttm/tests/ttm_mock_manager.h  |    4 +-
 drivers/gpu/drm/xe/xe_res_cursor.h            |   34 +-
 drivers/gpu/drm/xe/xe_svm.c                   |   12 +-
 drivers/gpu/drm/xe/xe_ttm_vram_mgr.c          |   71 +-
 drivers/gpu/drm/xe/xe_ttm_vram_mgr_types.h    |    4 +-
 drivers/gpu/nova-core/Kconfig                 |    3 +-
 drivers/gpu/tests/Makefile                    |    4 +
 .../gpu_buddy_test.c}                         |  416 +++---
 .../lib/drm_random.c => tests/gpu_random.c}   |   18 +-
 .../lib/drm_random.h => tests/gpu_random.h}   |   18 +-
 drivers/video/Kconfig                         |    1 +
 include/drm/drm_buddy.h                       |  163 +-
 include/linux/gpu_buddy.h                     |  177 +++
 rust/bindings/bindings_helper.h               |   11 +
 rust/helpers/gpu.c                            |   23 +
 rust/helpers/helpers.c                        |    2 +
 rust/helpers/list.c                           |   17 +
 rust/kernel/ffi/clist.rs                      |  327 ++++
 rust/kernel/ffi/mod.rs                        |    9 +
 rust/kernel/gpu/buddy.rs                      |  537 +++++++
 rust/kernel/gpu/mod.rs                        |    5 +
 rust/kernel/lib.rs                            |    5 +-
 45 files changed, 2893 insertions(+), 1846 deletions(-)
 create mode 100644 drivers/gpu/Kconfig
 create mode 100644 drivers/gpu/buddy.c
 create mode 100644 drivers/gpu/tests/Makefile
 rename drivers/gpu/{drm/tests/drm_buddy_test.c => tests/gpu_buddy_test.c} (67%)
 rename drivers/gpu/{drm/lib/drm_random.c => tests/gpu_random.c} (59%)
 rename drivers/gpu/{drm/lib/drm_random.h => tests/gpu_random.h} (53%)
 create mode 100644 include/linux/gpu_buddy.h
 create mode 100644 rust/helpers/gpu.c
 create mode 100644 rust/helpers/list.c
 create mode 100644 rust/kernel/ffi/clist.rs
 create mode 100644 rust/kernel/ffi/mod.rs
 create mode 100644 rust/kernel/gpu/buddy.rs
 create mode 100644 rust/kernel/gpu/mod.rs

Cc: Nikola Djukic <ndjukic@nvidia.com>
base-commit: 2961f841b025fb234860bac26dfb7fa7cb0fb122
-- 
2.34.1


             reply	other threads:[~2026-02-18 20:55 UTC|newest]

Thread overview: 74+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-18 20:54 Joel Fernandes [this message]
2026-02-18 20:54 ` [PATCH v10 1/8] gpu: Move DRM buddy allocator one level up (part one) Joel Fernandes
2026-02-18 20:55 ` [PATCH v10 2/8] gpu: Move DRM buddy allocator one level up (part two) Joel Fernandes
2026-02-19  3:18   ` Alexandre Courbot
2026-02-19 15:31     ` Joel Fernandes
2026-02-18 20:55 ` [PATCH v10 3/8] gpu: Fix uninitialized buddy for built-in drivers Joel Fernandes
2026-02-19 10:09   ` Danilo Krummrich
2026-02-19 15:31     ` Joel Fernandes
2026-02-19 16:24       ` Joel Fernandes
2026-02-18 20:55 ` [PATCH v10 4/8] rust: ffi: Convert pub use to pub mod and create ffi module Joel Fernandes
2026-02-19  3:18   ` Alexandre Courbot
2026-02-18 20:55 ` [PATCH v10 5/8] rust: clist: Add support to interface with C linked lists Joel Fernandes
2026-02-19  4:26   ` Alexandre Courbot
2026-02-19 15:27     ` Joel Fernandes
2026-02-19  9:58   ` Danilo Krummrich
2026-02-19 15:28     ` Joel Fernandes
2026-02-19 11:21   ` Danilo Krummrich
2026-02-19 14:37     ` Gary Guo
2026-02-19 15:27     ` Joel Fernandes
2026-02-19 15:44       ` Joel Fernandes
2026-02-19 16:24         ` Danilo Krummrich
2026-02-19 18:07           ` Joel Fernandes
2026-02-19 18:38             ` Miguel Ojeda
2026-02-19 19:28               ` Joel Fernandes
2026-02-19 22:55                 ` Miguel Ojeda
2026-02-20  4:00                   ` Joel Fernandes
2026-02-20  1:56             ` Alexandre Courbot
2026-02-20  1:09           ` Gary Guo
2026-02-20  1:19             ` Miguel Ojeda
2026-02-20 16:48             ` Danilo Krummrich
2026-02-23  0:54               ` Joel Fernandes
2026-02-24 16:15                 ` Miguel Ojeda
2026-02-25 19:48               ` Boqun Feng
2026-02-25 20:20                 ` Joel Fernandes
2026-02-26  0:32                   ` Joel Fernandes
2026-02-20  8:16   ` Eliot Courtney
2026-02-23  1:13     ` Joel Fernandes
2026-02-24  2:08       ` Eliot Courtney
2026-02-24  7:28       ` Alice Ryhl
2026-02-24 16:00         ` Joel Fernandes
2026-02-24 16:11           ` Miguel Ojeda
2026-02-21  8:59   ` Alice Ryhl
2026-02-23  0:41     ` Joel Fernandes
2026-02-23  9:38       ` Alice Ryhl
2026-02-24  0:32         ` Joel Fernandes
2026-02-18 20:55 ` [PATCH v10 6/8] rust: gpu: Add GPU buddy allocator bindings Joel Fernandes
2026-02-19  5:13   ` Alexandre Courbot
2026-02-19  8:54     ` Miguel Ojeda
2026-02-19 15:31       ` Joel Fernandes
2026-03-01 13:23         ` Gary Guo
2026-03-01 17:53           ` Miguel Ojeda
2026-02-19 15:31     ` Joel Fernandes
2026-02-20  1:56       ` Alexandre Courbot
2026-02-23  1:02         ` Joel Fernandes
2026-02-19 13:18   ` Danilo Krummrich
2026-02-19 15:31     ` Joel Fernandes
2026-02-20  8:22   ` Eliot Courtney
2026-02-20 14:54     ` Joel Fernandes
2026-02-20 15:50       ` Joel Fernandes
2026-02-20 15:53       ` Danilo Krummrich
2026-02-20 21:20         ` Joel Fernandes
2026-02-20 23:43           ` Danilo Krummrich
2026-02-23  0:34             ` Joel Fernandes
2026-02-18 20:55 ` [PATCH v10 7/8] nova-core: mm: Select GPU_BUDDY for VRAM allocation Joel Fernandes
2026-02-19  0:44   ` Alexandre Courbot
2026-02-19  1:14     ` John Hubbard
2026-02-19 15:31       ` Joel Fernandes
2026-02-19  2:06     ` Joel Fernandes
2026-02-19 15:31     ` Joel Fernandes
2026-02-18 20:55 ` [PATCH v10 8/8] nova-core: Kconfig: Sort select statements alphabetically Joel Fernandes
2026-02-18 20:59 ` [PATCH v10 0/8] Preparatory patches for nova-core memory management Joel Fernandes
2026-02-18 22:24 ` Danilo Krummrich
2026-02-18 23:46   ` Joel Fernandes
2026-02-18 23:59     ` Joel Fernandes

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=20260218205507.689429-1-joelagnelf@nvidia.com \
    --to=joelagnelf@nvidia.com \
    --cc=a.hindborg@kernel.org \
    --cc=airlied@redhat.com \
    --cc=aliceryhl@google.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun@kernel.org \
    --cc=dakr@kernel.org \
    --cc=daniel.almeida@collabora.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gary@garyguo.net \
    --cc=koen.koning@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lossin@kernel.org \
    --cc=ndjukic@nvidia.com \
    --cc=nouveau@lists.freedesktop.org \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=tmgross@umich.edu \
    /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

all inboxes | Powered by JetHome®