Files
linux/drivers/gpu/drm/tyr/gem.rs
T
Lyude Paul 442ba16a5a rust: gem: Introduce DriverObject::Args
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 <[email protected]>
Reviewed-by: Alice Ryhl <[email protected]>
Reviewed-by: Daniel Almeida <[email protected]>
Reviewed-by: Janne Grunau <[email protected]>
Tested-by: Deborah Brouwer <[email protected]>
Link: https://patch.msgid.link/[email protected]
[ Resolve merge conflicts in Tyr. - Danilo ]
Signed-off-by: Danilo Krummrich <[email protected]>
2026-03-26 02:08:04 +01:00

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 {})
}
}