Skip to contentSkip to conversation

rust: DmaFence: Initialize for 64-bit seqnos

PATCH New Philipp Stanner 1 participant 1 message Oct 23

Subsystems (4)
lore
Share & tools
lore

Philipp Stanner

author maintainer
#0 lore raw

PATCH 1/1 rust: DmaFence: Initialize for 64-bit seqnos

When dma_buf::DriverFence et al. were added, it was completely overlooked that dma_fence has to be instructed to use the desired 64-bit sequence numbers with a special init function, dma_fence_init64().

Replace the bindings call to dma_fence_init() with one to dma_fence_init64().

Fixes 3282d5916019 ("rust: Add dma_fence abstractions")
---
 rust/kernel/dma_buf/dma_fence.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
rust/kernel/dma_buf/dma_fence.rs +1 -1
index a1d851656562..de0bbaf18c7f 100644
@@ -744,7 +744,7 @@ pub fn new_fence(self) -> DriverFence<'a, T> {
         // SAFETY: `fence_ptr` has been created directly above. It will live
         // at least as long as `Self`. The same applies to `&Self::OPS`.
         unsafe {
-            bindings::dma_fence_init(fence_ptr, self.ops, null_ptr, self.data.fctx.nr, seqno)
+            bindings::dma_fence_init64(fence_ptr, self.ops, null_ptr, self.data.fctx.nr, seqno)
         };
 
         self.data.fctx.nr_of_unsignaled_fences.fetch_add(1, Relaxed);
Signature · 1 line
2.56.0