mirror of
https://github.com/torvalds/linux.git
synced 2026-11-30 18:42:21 +00: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 <[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]>
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 {})
|
|
}
|
|
}
|