Re: [RFC v3 07/33] rust: drm/kms: Add drm_encoder bindings

2025-03-21 Thread Lyude Paul
On Fri, 2025-03-14 at 12:48 +0100, Maxime Ripard wrote: > On Wed, Mar 05, 2025 at 05:59:23PM -0500, Lyude Paul wrote: > > +unsafe extern "C" fn encoder_destroy_callback( > > +encoder: *mut bindings::drm_encoder, > > +) { > > +// SAFETY: DRM guarantees that `encoder` points to a valid initia

Re: [RFC v3 07/33] rust: drm/kms: Add drm_encoder bindings

2025-03-14 Thread Maxime Ripard
On Wed, Mar 05, 2025 at 05:59:23PM -0500, Lyude Paul wrote: > +unsafe extern "C" fn encoder_destroy_callback( > +encoder: *mut bindings::drm_encoder, > +) { > +// SAFETY: DRM guarantees that `encoder` points to a valid initialized > `drm_encoder`. > +unsafe { bindings::drm_encoder_clea

[RFC v3 07/33] rust: drm/kms: Add drm_encoder bindings

2025-03-05 Thread Lyude Paul
The last thing we need to be able to register a KMS driver is the ability to create DRM encoders, so let's add bindings for that. Again, these bindings follow the same general pattern as CRTCs, planes, and connector with one difference: encoders don't have an atomic state. Note that not having an