Userspace compute drivers report a handful of static GPU properties to
applications. For example the CUDA deviceQuery sample prints the number
of streaming multiprocessors (SMs), the memory bus width, the L2 cache
size and the maximum graphics and memory clock rates.

GSP will soon report these properties as keys of the GMCAPI static
config, which it returns in reply to GSP_INIT. The first patch adds the
keys to the GSP_INIT response schema and to GspStaticInfo. The new keys
are all optional and decode as None if firmware does not provide them.

The second patch appends the properties to struct drm_nova_info_gpu. A
property which GSP does not provide is reported to userspace as zero.
Existing userspace is unaffected, as the kernel truncates what it writes
to the size userspace passes.

This series depends on the r000 series as it relies on GSP_INIT, so it
is based on drm-rust-next with the remainder of the r000 series applied.
Tested against a new firmware using drm-test to ensure values are
reported correctly.

A merge request will be raised there for testing.

Signed-off-by: Alistair Popple <[email protected]>
---
Alistair Popple (2):
      gpu: nova-core: gsp: Add compute properties to GspStaticInfo
      drm: nova: Report compute properties in GPU info

 drivers/gpu/drm/nova/file.rs              |  6 +++++
 drivers/gpu/drm/nova/nova_drm_unstable.h  | 27 ++++++++++++++++++++
 drivers/gpu/nova-core/gsp/commands.rs     | 14 +++++++++++
 drivers/gpu/nova-core/gsp/commands/gmc.rs |  5 ++++
 drivers/gpu/nova-core/gsp/fw/commands.rs  | 42 +++++++++++++++++++++++++++++++
 5 files changed, 94 insertions(+)
---
base-commit: 594391a32cd30bc9ec863db1b310bcbcf370bfac
change-id: 20261204-nova_gpu_static_info_v2-e353310cf405

Best regards,
--  
Alistair Popple <[email protected]>

Reply via email to