Contributors: 4
| Author |
Tokens |
Token Proportion |
Commits |
Commit Proportion |
| Daniel Almeida |
67 |
47.18% |
1 |
12.50% |
| Deborah Brouwer |
52 |
36.62% |
4 |
50.00% |
| Stephen Chandler Paul |
21 |
14.79% |
2 |
25.00% |
| Boris Brezillon |
2 |
1.41% |
1 |
12.50% |
| Total |
142 |
|
8 |
|
// SPDX-License-Identifier: GPL-2.0 or MIT
//! GEM buffer object management for the Tyr driver.
//!
//! This module provides buffer object (BO) management functionality using
//! DRM's GEM subsystem with shmem backing.
use kernel::{
drm::{
gem,
DeviceContext, //
},
prelude::*, //
};
use crate::driver::{
TyrDrmDevice,
TyrDrmDriver, //
};
/// Tyr's DriverObject type for GEM objects.
#[pin_data]
pub(crate) struct BoData {
flags: u32,
}
/// Provides a way to pass arguments when creating BoData
/// as required by the gem::DriverObject trait.
pub(crate) struct BoCreateArgs {
flags: u32,
}
impl gem::DriverObject for BoData {
type Driver = TyrDrmDriver;
type Args = BoCreateArgs;
fn new<Ctx: DeviceContext>(
_dev: &TyrDrmDevice<Ctx>,
_size: usize,
args: BoCreateArgs,
) -> impl PinInit<Self, Error> {
try_pin_init!(Self { flags: args.flags })
}
}