summaryrefslogtreecommitdiff
path: root/drivers/gpu/nova-core/sbuffer.rs
diff options
context:
space:
mode:
authorAlistair Popple <apopple@nvidia.com>2025-11-10 22:34:17 +0900
committerAlexandre Courbot <acourbot@nvidia.com>2025-11-14 20:25:57 +0900
commit75f6b1de8133ea337b72901464989dc811d3305d (patch)
treef80a55a19b882998ba08ba977ee715691177c3f7 /drivers/gpu/nova-core/sbuffer.rs
parent88622323dde3d9d6efd6f2efcfaa0bced5af94c3 (diff)
gpu: nova-core: gsp: Add GSP command queue bindings and handling
This commit introduces core infrastructure for handling GSP command and message queues in the nova-core driver. The command queue system enables bidirectional communication between the host driver and GSP firmware through a remote message passing interface. The interface is based on passing serialised data structures over a ring buffer with separate transmit and receive queues. Commands are sent by writing to the CPU transmit queue and waiting for completion via the receive queue. To ensure safety mutable or immutable (depending on whether it is a send or receive operation) references are taken on the command queue when allocating the message to write/read to. This ensures message memory remains valid and the command queue can't be mutated whilst an operation is in progress. Currently this is only used by the probe() routine and therefore can only used by a single thread of execution. Locking to enable safe access from multiple threads will be introduced in a future series when that becomes necessary. Signed-off-by: Alistair Popple <apopple@nvidia.com> Co-developed-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Message-ID: <20251110-gsp_boot-v9-9-8ae4058e3c0e@nvidia.com>
Diffstat (limited to 'drivers/gpu/nova-core/sbuffer.rs')
-rw-r--r--drivers/gpu/nova-core/sbuffer.rs3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/gpu/nova-core/sbuffer.rs b/drivers/gpu/nova-core/sbuffer.rs
index f0cecbcb81be..25e3ad665cac 100644
--- a/drivers/gpu/nova-core/sbuffer.rs
+++ b/drivers/gpu/nova-core/sbuffer.rs
@@ -50,7 +50,6 @@ where
/// let sum: u8 = sbuffer.sum();
/// assert_eq!(sum, 45);
/// ```
- #[expect(unused)]
pub(crate) fn new_reader(slices: impl IntoIterator<IntoIter = I>) -> Self
where
I: Iterator<Item = &'a [u8]>,
@@ -72,7 +71,6 @@ where
/// assert_eq!(buf2, [5, 6, 7, 8, 9]);
///
/// ```
- #[expect(unused)]
pub(crate) fn new_writer(slices: impl IntoIterator<IntoIter = I>) -> Self
where
I: Iterator<Item = &'a mut [u8]>,
@@ -131,7 +129,6 @@ where
}
/// Returns whether this buffer still has data available.
- #[expect(unused)]
pub(crate) fn is_empty(&self) -> bool {
self.cur_slice.is_none()
}