* [PATCH] rust: DmaFence: Implement Deref for FenceContext
@ 2026-10-22 16:21 Philipp Stanner
2026-10-29 14:05 ` Alice Ryhl
0 siblings, 1 reply; 2+ messages in thread
From: Philipp Stanner @ 2026-10-22 16:21 UTC (permalink / raw)
To: Danilo Krummrich, Alice Ryhl, Sumit Semwal, Christian König,
Philipp Stanner, Miguel Ojeda, Boqun Feng, Gary Guo,
Björn Roy Baron, Benno Lossin, Andreas Hindborg,
Trevor Gross, Daniel Almeida, Tamir Duberstein, Alexandre Courbot,
Onur Özkan
Cc: linux-media, dri-devel, rust-for-linux, linux-kernel
A FenceContext carries data, which the user should be able to access.
Implement Deref for FenceContext.
Signed-off-by: Philipp Stanner <phasta@kernel.org>
---
rust/kernel/dma_buf/dma_fence.rs | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/rust/kernel/dma_buf/dma_fence.rs b/rust/kernel/dma_buf/dma_fence.rs
index a1d851656562..5300448882e7 100644
--- a/rust/kernel/dma_buf/dma_fence.rs
+++ b/rust/kernel/dma_buf/dma_fence.rs
@@ -86,6 +86,15 @@ pub struct FenceContext<T: FenceContextOps + Send + Sync> {
data: T,
}
+impl<T: Send + Sync + FenceContextOps> Deref for FenceContext<T> {
+ type Target = T;
+
+ #[inline]
+ fn deref(&self) -> &Self::Target {
+ &self.data
+ }
+}
+
impl<'a, T: Send + Sync + FenceContextOps> FenceContext<T> {
// This can later be extended as a vtable in case other parties need support
// for the more "exotic" callbacks.
base-commit: 3497a403264b094ebd61b8b755165d56e7d9dc37
--
2.56.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] rust: DmaFence: Implement Deref for FenceContext
2026-10-22 16:21 [PATCH] rust: DmaFence: Implement Deref for FenceContext Philipp Stanner
@ 2026-10-29 14:05 ` Alice Ryhl
0 siblings, 0 replies; 2+ messages in thread
From: Alice Ryhl @ 2026-10-29 14:05 UTC (permalink / raw)
To: Philipp Stanner
Cc: Danilo Krummrich, Sumit Semwal, Christian König,
Miguel Ojeda, Boqun Feng, Gary Guo, Björn Roy Baron,
Benno Lossin, Andreas Hindborg, Trevor Gross, Daniel Almeida,
Tamir Duberstein, Alexandre Courbot, Onur Özkan, linux-media,
dri-devel, rust-for-linux, linux-kernel
On Thu, Oct 22, 2026 at 6:21 PM Philipp Stanner <phasta@kernel.org> wrote:
>
> A FenceContext carries data, which the user should be able to access.
>
> Implement Deref for FenceContext.
>
> Signed-off-by: Philipp Stanner <phasta@kernel.org>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-10-29 14:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-22 16:21 [PATCH] rust: DmaFence: Implement Deref for FenceContext Philipp Stanner
2026-10-29 14:05 ` Alice Ryhl
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox