[PATCH v4 0/7] gpu: nova: Export parameters from nova-core to nova-drm

Alistair Popple <[email protected]>
Newsgroups dev.linux.lists.nova-gpu,org.freedesktop.lists.dri-devel,org.kernel.vger.linux-kernel,org.kernel.vger.rust-for-linux
Message-ID <[email protected]>
This patch series adds some basic GPU properties via a new GPU info ioctl. It
builds on top of the "drm: Higher-Ranked Lifetime private data" series[1] to
correctly manage lifetimes of registration data shared between DRM, auxbus and
nova-core. It's also based on top of "ForLt/CovariantForLt split, auxiliary
closure API and DevresLt"[2] although the functionality of that series isn't
actually required.

A tree with this series applied on top of all pre-requisites is available at
[3].

Properties are exported via a new NovaCoreApi type which implements methods to
read data from the GPU. This has been implemented in a separate module to make
the public API implementations obvious and to keep them in one place. Auxiliary
bus drivers can obtain a handle to this type using NovaCoreApi::of().

This handle can then be stored as part of the DRM registration data and used to
interact with the GPU via the nova-core driver.

Changes since v3:

 - Use an ioctl to return all parameters rather than multiple key/value queries

Changes since v2:

 - Addressed review Danilo and Alex
 - Minor renames to better align with HW based on internal feedback

Changes since v1:

 - Address review comments from Danilo
 - Add an API call to read VRAM PCI BAR size using nova-core
 
[1] - https://lore.kernel.org/rust-for-linux/[email protected]/
[2] - https://lore.kernel.org/driver-core/[email protected]/
[3] - https://github.com/apopple-nvidia/linux/tree/nova-drm

Cc: Danilo Krummrich <[email protected]>
Cc: Alice Ryhl <[email protected]>
Cc: David Airlie <[email protected]>
Cc: Alexandre Courbot <[email protected]>
Cc: Benno Lossin <[email protected]>
Cc: Gary Guo <[email protected]>
Cc: Eliot Courtney <[email protected]>
Cc: John Hubbard <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]

Alistair Popple (7):
  gpu: nova-core: Add public driver API to nova-core
  drm: nova: Add DRM registration data
  drm: nova: Add chipid enum to nova-drm UAPI
  drm: nova: Add a GPU info ioctl
  drm: nova: Add usable VRAM size to GPU info ioctl
  drm: nova: Use nova-core to read VRAM_BAR_SIZE parameter
  drm: nova: Expose a render node

 drivers/gpu/drm/nova/driver.rs        | 18 ++++++-
 drivers/gpu/drm/nova/file.rs          | 40 +++++++++-----
 drivers/gpu/nova-core/api.rs          | 49 +++++++++++++++++
 drivers/gpu/nova-core/driver.rs       | 44 +++++++++++----
 drivers/gpu/nova-core/gpu.rs          | 78 ++++++++++++++-------------
 drivers/gpu/nova-core/gsp/commands.rs |  8 +++
 drivers/gpu/nova-core/gsp/hal.rs      |  2 +-
 drivers/gpu/nova-core/nova_core.rs    |  1 +
 include/uapi/drm/nova_drm.h           | 71 ++++++++++++++++++++++++
 9 files changed, 247 insertions(+), 64 deletions(-)
 create mode 100644 drivers/gpu/nova-core/api.rs

-- 
2.54.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.