]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
gpu: nova-core: gsp: fix improper handling of empty slot in cmdq
authorEliot Courtney <ecourtney@nvidia.com>
Thu, 29 Jan 2026 07:45:02 +0000 (16:45 +0900)
committerAlexandre Courbot <acourbot@nvidia.com>
Tue, 24 Feb 2026 23:16:55 +0000 (08:16 +0900)
commitf64caf673cb5add9ac2065609a52049e2317c498
tree7921d825db0ccd8d6a466d22b077ed820d7c4908
parentf6f072d8ef06ff5d29a6bb1bade3da29a1aafeec
gpu: nova-core: gsp: fix improper handling of empty slot in cmdq

The current code hands out buffers that go all the way up to and
including `rx - 1`, but we need to maintain an empty slot to prevent the
ring buffer from wrapping around into having 'tx == rx', which means
empty.

Also add more rigorous no-panic proofs.

Fixes: 75f6b1de8133 ("gpu: nova-core: gsp: Add GSP command queue bindings and handling")
Signed-off-by: Eliot Courtney <ecourtney@nvidia.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Link: https://patch.msgid.link/20260129-nova-core-cmdq1-v3-4-2ede85493a27@nvidia.com
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
drivers/gpu/nova-core/gsp/cmdq.rs