Commits on Source (36)
-
Lyude Paul authored
* Implement try_from_opaque() and from_opaque() using a macro
-
Lyude Paul authored
* Implement try_from_opaque() and from_opaque() using a macro
-
Lyude Paul authored
* Implement try_from_opaque() and from_opaque() using a macro
-
Lyude Paul authored
* Implement try_from_opaque() and from_opaque() using a macro
-
Lyude Paul authored
* Add comments to __drm_atomic_helper_duplicate_state()
-
Lyude Paul authored
* Improve safety comments in atomic_duplicate_state_callback
-
Lyude Paul authored
* Update safety comments in atomic_duplicate_state_callback
-
Lyude Paul authored
* Switch `PlaneType` to camel casing
-
Lyude Paul authored
* Improve safety comment in `Plane::<T>::new()` * Fix parameter types for `formats` and `format_modifiers`, as pointed out by Louis Chauvet DRM will copy all of these into its own storage.
-
Lyude Paul authored
-
Lyude Paul authored
* Improve safety comments in Connector::new() * Switch to requiring a UnregisteredKmsDevice instead of a Device This is in preparation for the static/dynamic connector split, which we may as well prepare for since we don't have any use for dynamic connectors yet.
-
Lyude Paul authored
* Drop FormatList and ModifierList These aren't actually needed as pointed out by Louis Chauvet * Add a constant for FORMAT_MOD_INVALID I realized that we actually need this because the format list isn't terminated with a 0 like I thought, and we can't pick this up automatically through bindgen
-
Lyude Paul authored
* Drop redundant Connector associated type in AsRawConnector trait
-
Lyude Paul authored
* Drop the TODO about printing a kernel error in BorrowedConnectorState I thought this was something we'd want early on in designing this, but since then I'm pretty sure we just want to return None - there are valid cases where we'd get None while doing connector iteration through an atomic state
-
Lyude Paul authored
* Improve safety comments in BorrowedConnectorState::new()
-
Lyude Paul authored
-
Lyude Paul authored
* Improve safety comments in FromRawPlaneState
-
Lyude Paul authored
* Improve safety comments in FromRawConnectorState
-
Lyude Paul authored
-
Lyude Paul authored
-
Lyude Paul authored
* Rename generics in Crtc::new to PrimaryData and CursorData
-
Lyude Paul authored
* Add missing safety comment in Crtc::new()
-
Lyude Paul authored
-
Lyude Paul authored
-
Lyude Paul authored
* Improve safety comments in AsRawCrtc
-
Lyude Paul authored
* Break up the conversion from Pin<Box<Crtc>> to &Crtc a bit
-
Lyude Paul authored
* Document why there's an UnsafeCell in CrtcState, because even I forgot the reason for this :).
-
Lyude Paul authored
> * Allocate a new atomic state > * Duplicate the atomic state of each mode object we want to mutate, and add > the duplicated state to the new atomic state > * Check (possibly more then once) the atomic state, possibly modifying it nit: typo here s/then/than > The next part of this is allowing users to modify the atomic states of all > of the objects contained within an atomic state. Since it's an extremely > common usecase for objects to mutate the atomic state of multiple objects > at once in an unpredictable order, we need a mechanism that will allow us > to hand out &mut references to each state while ensuring at runtime that we > do not break rust's data aliasing rules (which disallow us from ever having > more then one &mut reference to the same piece of data). nit: same typo here > > We do this by introducing the concept of a "borrowed" state. This is a very > similar concept to RefCell, where it is ensured during runtime that when a > &mut reference is taken out another one cannot be created until the > corresponding Ref object has been dropped. Our equivalent Ref types are > BorrowedConnectorState, BorrowedCrtcState, and BorrowedPlaneState. Are these `composers` as well? > > Each one of these types can be used in the same manner as a Ref - no You mean core::cell::Ref, right? Maybe worth spelling out the full type. > additional borrows for an atomic state may be taken until the existing one > has been dropped. Subsequently, all of these types implement their > respective AsRaw* and FromRaw* counter-parts - and allow dereferencing to > each driver-private data structure for fully qualified borrows (like > BorrowedCrtcState<'a, CrtcState<T>>. This allows a pretty clean way of > mutating multiple states at once without ever breaking rust's mutability > rules. > > We'll use all of these types over the next few commits to begin introducing > various atomic modeset callbacks to each mode object type. > > Signed-off-by:
Lyude Paul <lyude@redhat.com> > > --- > > TODO: > * Finish adding state iterators > We only have one iterator for planes right now, but the plan is to have > iterators for all types and have two different kind of iterators: I assume you mean iterators for Connectors and Crtcs, right?
-
Lyude Paul authored
-
Lyude Paul authored
* Limit unsafe scope in RawPlane::index() * Improve safety comments
-
Lyude Paul authored
-
Lyude Paul authored
-
Lyude Paul authored
* Rename Borrowed*State to *StateMutator I think this makes things a lot clearer, as well - cleanup the documentation regarding this.
-
Lyude Paul authored
-
Lyude Paul authored
-
Lyude Paul authored
Showing
- drivers/gpu/drm/rvkms/rvkms.rs 0 additions, 3 deletionsdrivers/gpu/drm/rvkms/rvkms.rs
- rust/kernel/drm/fourcc.rs 5 additions, 69 deletionsrust/kernel/drm/fourcc.rs
- rust/kernel/drm/kms.rs 51 additions, 0 deletionsrust/kernel/drm/kms.rs
- rust/kernel/drm/kms/atomic.rs 16 additions, 16 deletionsrust/kernel/drm/kms/atomic.rs
- rust/kernel/drm/kms/connector.rs 52 additions, 38 deletionsrust/kernel/drm/kms/connector.rs
- rust/kernel/drm/kms/crtc.rs 49 additions, 55 deletionsrust/kernel/drm/kms/crtc.rs
- rust/kernel/drm/kms/encoder.rs 2 additions, 2 deletionsrust/kernel/drm/kms/encoder.rs
- rust/kernel/drm/kms/plane.rs 96 additions, 76 deletionsrust/kernel/drm/kms/plane.rs