On Mon, May 12, 2025 at 2:09 PM Danilo Krummrich wrote:
>
> Lyude's series [1] should address this and the other one you pointed out.
Great, thanks!
Cheers,
Miguel
On Mon, May 12, 2025 at 01:41:13PM +0200, Miguel Ojeda wrote:
> On Fri, Apr 11, 2025 at 1:56 AM Danilo Krummrich wrote:
> >
> > +fn from_gem_obj(obj: *mut bindings::drm_gem_object) -> *mut Self {
> > +// SAFETY: All of our objects are Object.
> > +unsafe { crate::container_of!(
On Mon, May 12, 2025 at 1:41 PM Miguel Ojeda
wrote:
>
> Doing something unrelated, I got a Clippy warning about this public
By the way, this call (and another one here) to `container_of!` goes
through `Opaque`, so it will not pass the future `assert_same_type`
test we want to have:
error[E0308]:
On Fri, Apr 11, 2025 at 1:56 AM Danilo Krummrich wrote:
>
> +fn from_gem_obj(obj: *mut bindings::drm_gem_object) -> *mut Self {
> +// SAFETY: All of our objects are Object.
> +unsafe { crate::container_of!(obj, Object, obj).cast_mut() }
> +}
Doing something unrelated, I go
On Thu, Apr 17, 2025 at 02:42:24PM -0400, Lyude Paul wrote:
> On Fri, 2025-04-11 at 01:55 +0200, Danilo Krummrich wrote:
> > +/// A base GEM object.
> > +///
> > +/// Invariants
> > +///
> > +/// `self.dev` is always a valid pointer to a `struct drm_device`.
> > +#[repr(C)]
> > +#[pin_data]
> > +pu
On Thu, Apr 17, 2025 at 06:33:24PM -0400, Lyude Paul wrote:
> On Thu, 2025-04-17 at 22:31 +0200, Danilo Krummrich wrote:
> > On Thu, Apr 17, 2025 at 02:42:24PM -0400, Lyude Paul wrote:
> > > On Fri, 2025-04-11 at 01:55 +0200, Danilo Krummrich wrote:
> > > > +/// A base GEM object.
> > > > +///
> >
On Thu, 2025-04-17 at 22:31 +0200, Danilo Krummrich wrote:
> On Thu, Apr 17, 2025 at 02:42:24PM -0400, Lyude Paul wrote:
> > On Fri, 2025-04-11 at 01:55 +0200, Danilo Krummrich wrote:
> > > +/// A base GEM object.
> > > +///
> > > +/// Invariants
> > > +///
> > > +/// `self.dev` is always a valid p
Some comments down below:
On Fri, 2025-04-11 at 01:55 +0200, Danilo Krummrich wrote:
> From: Asahi Lina
>
> DRM GEM is the DRM memory management subsystem used by most modern
> drivers; add a Rust abstraction for DRM GEM.
>
> This includes the BaseObject trait, which contains operations shared
To the best of my ability, this is
Reviewed-by: Alyssa Rosenzweig
although this is rather above my current Rust abilities.
> +match T::open(unsafe { &*obj }, file) {
> +Err(e) => e.to_errno(),
> +Ok(()) => 0,
> +}
incidentally this would be another candidate for the
From: Asahi Lina
DRM GEM is the DRM memory management subsystem used by most modern
drivers; add a Rust abstraction for DRM GEM.
This includes the BaseObject trait, which contains operations shared by
all GEM object classes.
Signed-off-by: Asahi Lina
[ Rework of GEM object abstractions
* s
From: Asahi Lina
The DRM GEM subsystem is the DRM memory management subsystem used by
most modern drivers. Add a Rust abstraction to allow Rust DRM driver
implementations to use it.
Signed-off-by: Asahi Lina
Co-developed-by: Danilo Krummrich
Signed-off-by: Danilo Krummrich
---
rust/bindings/
11 matches
Mail list logo