mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
This is an associated type that may be used in order to specify a data-type to pass to gem objects when constructing them, allowing for drivers to more easily initialize their private-data for gem objects. Signed-off-by: Lyude Paul <lyude@redhat.com> Reviewed-by: Alice Ryhl <aliceryhl@google.com> Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com> Reviewed-by: Janne Grunau <j@jananu.net> Tested-by: Deborah Brouwer <deborah.brouwer@collabora.com> Link: https://patch.msgid.link/20260316211646.650074-5-lyude@redhat.com [ Resolve merge conflicts in Tyr. - Danilo ] Signed-off-by: Danilo Krummrich <dakr@kernel.org>
25 lines
460 B
Rust
25 lines
460 B
Rust
// SPDX-License-Identifier: GPL-2.0 or MIT
|
|
|
|
use kernel::{
|
|
drm::gem,
|
|
prelude::*, //
|
|
};
|
|
|
|
use crate::driver::{
|
|
TyrDrmDevice,
|
|
TyrDrmDriver, //
|
|
};
|
|
|
|
/// GEM Object inner driver data
|
|
#[pin_data]
|
|
pub(crate) struct TyrObject {}
|
|
|
|
impl gem::DriverObject for TyrObject {
|
|
type Driver = TyrDrmDriver;
|
|
type Args = ();
|
|
|
|
fn new(_dev: &TyrDrmDevice, _size: usize, _args: ()) -> impl PinInit<Self, Error> {
|
|
try_pin_init!(TyrObject {})
|
|
}
|
|
}
|