From: "Alexandre Courbot" <acourbot@nvidia.com>
To: "Zhi Wang" <zhiw@nvidia.com>, "Danilo Krummrich" <dakr@kernel.org>
Cc: <airlied@gmail.com>, <simona@ffwll.ch>, <corbet@lwn.net>,
<maarten.lankhorst@linux.intel.com>, <mripard@kernel.org>,
<tzimmermann@suse.de>, <ajanulgu@redhat.com>, <lyude@redhat.com>,
<pstanner@redhat.com>, <cjia@nvidia.com>, <jhubbard@nvidia.com>,
<bskeggs@nvidia.com>, <acurrid@nvidia.com>, <ojeda@kernel.org>,
<alex.gaynor@gmail.com>, <boqun.feng@gmail.com>,
<gary@garyguo.net>, <bjorn3_gh@protonmail.com>,
<benno.lossin@proton.me>, <a.hindborg@kernel.org>,
<aliceryhl@google.com>, <tmgross@umich.edu>,
<dri-devel@lists.freedesktop.org>, <linux-doc@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <nouveau@lists.freedesktop.org>,
<rust-for-linux@vger.kernel.org>,
"Nouveau" <nouveau-bounces@lists.freedesktop.org>
Subject: Re: [PATCH v2 2/2] gpu: nova-core: add initial documentation
Date: Fri, 07 Feb 2025 17:23:37 +0900 [thread overview]
Message-ID: <D7M2HTWHNGEZ.10FM642ZMX1PX@nvidia.com> (raw)
In-Reply-To: <20250205155646.00003c2f@nvidia.com>
On Wed Feb 5, 2025 at 10:56 PM JST, Zhi Wang wrote:
> On Tue, 4 Feb 2025 20:03:12 +0100
> Danilo Krummrich <dakr@kernel.org> wrote:
>
>> Add the initial documentation of the Nova project.
>>
>> The initial project documentation consists out of a brief introduction
>> of the project, as well as project guidelines both general and nova-core
>> specific and a task list for nova-core specifically.
>>
>> The task list is divided into tasks for general Rust infrastructure
>> required by the project, tasks regarding GSP enablement and firmware
>> abstraction, general GPU driver tasks as well as tasks related to
>> external API design and test infrastructure.
>>
>> Signed-off-by: Danilo Krummrich <dakr@kernel.org>
>> ---
>> - Add task "Generic register abstraction".
>> - Change complexity of "Debugfs abstractions".
>> ---
>> Documentation/gpu/drivers.rst | 1 +
>> Documentation/gpu/nova/core/guidelines.rst | 24 ++
>> Documentation/gpu/nova/core/todo.rst | 445 +++++++++++++++++++++
>> Documentation/gpu/nova/guidelines.rst | 73 ++++
>> Documentation/gpu/nova/index.rst | 30 ++
>> MAINTAINERS | 1 +
>> 6 files changed, 574 insertions(+)
>> create mode 100644 Documentation/gpu/nova/core/guidelines.rst
>> create mode 100644 Documentation/gpu/nova/core/todo.rst
>> create mode 100644 Documentation/gpu/nova/guidelines.rst
>> create mode 100644 Documentation/gpu/nova/index.rst
>>
>> diff --git a/Documentation/gpu/drivers.rst b/Documentation/gpu/drivers.rst
>> index 1f17ad0790d7..7c2c5dcb5fd4 100644
>> --- a/Documentation/gpu/drivers.rst
>> +++ b/Documentation/gpu/drivers.rst
>> @@ -24,6 +24,7 @@ GPU Driver Documentation
>> panfrost
>> panthor
>> zynqmp
>> + nova/index
>>
>> .. only:: subproject and html
>>
>> diff --git a/Documentation/gpu/nova/core/guidelines.rst b/Documentation/gpu/nova/core/guidelines.rst
>> new file mode 100644
>> index 000000000000..a389d65d7982
>> --- /dev/null
>> +++ b/Documentation/gpu/nova/core/guidelines.rst
>> @@ -0,0 +1,24 @@
>> +.. SPDX-License-Identifier: (GPL-2.0+ OR MIT)
>> +
>> +==========
>> +Guidelines
>> +==========
>> +
>> +This documents contains the guidelines for nova-core. Additionally, all common
>> +guidelines of the Nova project do apply.
>> +
>> +Driver API
>> +==========
>> +
>> +One main purpose of nova-core is to implement the abstraction around the
>> +firmware interface of GSP and provide a firmware (version) independent API for
>> +2nd level drivers, such as nova-drm or the vGPU manager VFIO driver.
>> +
>> +Therefore, it is not permitted to leak firmware (version) specifics, through the
>> +driver API, to 2nd level drivers.
>> +
>> +Acceptance Criteria
>> +===================
>> +
>> +- To the extend possible, patches submitted to nova-core must be tested for
>> + regressions with all 2nd level drivers.
>> diff --git a/Documentation/gpu/nova/core/todo.rst b/Documentation/gpu/nova/core/todo.rst
>> new file mode 100644
>> index 000000000000..5e66ec35c5e3
>> --- /dev/null
>> +++ b/Documentation/gpu/nova/core/todo.rst
>> @@ -0,0 +1,445 @@
>> +.. SPDX-License-Identifier: (GPL-2.0+ OR MIT)
>> +
>> +=========
>> +Task List
>> +=========
>> +
>
> ...
>
>> +
>> +Generic register abstraction
>> +----------------------------
>> +
>> +Work out how register constants and structures can be automatically generated
>> +through generalized macros.
>> +
>> +Example:
>> +
>> +.. code-block:: rust
>> +
>> + register!(BOOT0, 0x0, u32, pci::Bar<SIZE>, Fields [
>> + MINOR_REVISION(3:0, RO),
>> + MAJOR_REVISION(7:4, RO),
>> + REVISION(7:0, RO), // Virtual register combining major and minor rev.
>> + ])
>> +
>
> I think it is better not to tie this to pci::Bar and its operations. It
> would be better to have a intermediate container as the macro param. The
> container holds the register region vaddr pointer, size, read/write traits.
> The macro expands it from there, thus, we can also use this on firmware
> memory structures, e.g. GSP WPR2 info.
Another reason for not tying this to a particular bus is that Tegra
doesn't use PCI to reach the registers of its integrated GPU. Maybe we
can remove that parameter from the register!() macro and have read()
take a generic argument for its `bar` parameter instead, so that method
gets automatically specialized for every type of bus we need to use?
next prev parent reply other threads:[~2025-02-07 8:23 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-04 19:03 [PATCH v2 1/2] gpu: nova-core: add initial driver stub Danilo Krummrich
2025-02-04 19:03 ` [PATCH v2 2/2] gpu: nova-core: add initial documentation Danilo Krummrich
2025-02-05 13:56 ` Zhi Wang
2025-02-05 14:13 ` Miguel Ojeda
2025-02-05 14:56 ` Zhi Wang
2025-02-05 16:20 ` Danilo Krummrich
2025-02-05 16:10 ` Danilo Krummrich
2025-02-05 19:44 ` Zhi Wang
2025-02-09 15:36 ` Danilo Krummrich
2025-02-07 8:23 ` Alexandre Courbot [this message]
2025-02-09 15:25 ` Danilo Krummrich
2025-02-06 14:05 ` [PATCH v2 1/2] gpu: nova-core: add initial driver stub Alexandre Courbot
2025-02-06 14:49 ` Danilo Krummrich
2025-02-07 1:41 ` Alexandre Courbot
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=D7M2HTWHNGEZ.10FM642ZMX1PX@nvidia.com \
--to=acourbot@nvidia.com \
--cc=a.hindborg@kernel.org \
--cc=acurrid@nvidia.com \
--cc=airlied@gmail.com \
--cc=ajanulgu@redhat.com \
--cc=alex.gaynor@gmail.com \
--cc=aliceryhl@google.com \
--cc=benno.lossin@proton.me \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=bskeggs@nvidia.com \
--cc=cjia@nvidia.com \
--cc=corbet@lwn.net \
--cc=dakr@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=gary@garyguo.net \
--cc=jhubbard@nvidia.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lyude@redhat.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=nouveau-bounces@lists.freedesktop.org \
--cc=nouveau@lists.freedesktop.org \
--cc=ojeda@kernel.org \
--cc=pstanner@redhat.com \
--cc=rust-for-linux@vger.kernel.org \
--cc=simona@ffwll.ch \
--cc=tmgross@umich.edu \
--cc=tzimmermann@suse.de \
--cc=zhiw@nvidia.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.