diff options
| author | Eliot Courtney <ecourtney@nvidia.com> | 2026-03-06 16:22:02 +0900 |
|---|---|---|
| committer | Alexandre Courbot <acourbot@nvidia.com> | 2026-03-10 16:07:33 +0900 |
| commit | 1a0d4bc62b5d36a8ae4dca4413c2703b5fdd93f4 (patch) | |
| tree | 9bed1439092db5fc89d759384c62b193d5587cb8 /drivers/gpu/nova-core | |
| parent | 41584c71342e6046fc5af0bd7823e6c0c53ffb0c (diff) | |
| download | linux-next-1a0d4bc62b5d36a8ae4dca4413c2703b5fdd93f4.tar.gz linux-next-1a0d4bc62b5d36a8ae4dca4413c2703b5fdd93f4.zip | |
gpu: nova-core: gsp: clarify invariant on command queue
Clarify why using only the first returned slice from allocate_command
for the message headers is okay.
Tested-by: Zhi Wang <zhiw@nvidia.com>
Signed-off-by: Eliot Courtney <ecourtney@nvidia.com>
Link: https://patch.msgid.link/20260306-cmdq-continuation-v6-5-cc7b629200ee@nvidia.com
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Diffstat (limited to 'drivers/gpu/nova-core')
| -rw-r--r-- | drivers/gpu/nova-core/gsp/cmdq.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/nova-core/gsp/cmdq.rs b/drivers/gpu/nova-core/gsp/cmdq.rs index 8b970523d789..806b1e02715e 100644 --- a/drivers/gpu/nova-core/gsp/cmdq.rs +++ b/drivers/gpu/nova-core/gsp/cmdq.rs @@ -534,7 +534,9 @@ impl Cmdq { .gsp_mem .allocate_command(command_size, Self::ALLOCATE_TIMEOUT)?; - // Extract area for the command itself. + // Extract area for the command itself. The GSP message header and the command header + // together are guaranteed to fit entirely into a single page, so it's ok to only look + // at `dst.contents.0` here. let (cmd, payload_1) = M::Command::from_bytes_mut_prefix(dst.contents.0).ok_or(EIO)?; // Fill the header and command in-place. |
