Skip to content

Commit 05097ca

Browse files
committed
drm/asahi: Add AsahiData to the platform device drvdata
The newest DRM rust bindings make the device data unavailable via drm::device::Device<T> to decouple DRM device creation from the device data as this is required planned driver like Tyr. On the surface it is required for asahi as well but it should be possible to avoid this. Signed-off-by: Janne Grunau <j@jannau.net>
1 parent 5428da4 commit 05097ca

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

drivers/gpu/drm/asahi/driver.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ pub(crate) struct AsahiData {
3232

3333
pub(crate) struct AsahiDriver {
3434
_reg: drm::drv::Registration<Self>,
35+
pub(crate) data: Arc<AsahiData>,
3536
}
3637

3738
/// Convenience type alias for the DRM device type for this driver.
@@ -206,6 +207,6 @@ impl platform::Driver for AsahiDriver {
206207

207208
let reg = drm::drv::Registration::new(drm, data.clone(), 0)?;
208209

209-
Ok(KBox::new(Self { _reg: reg }, GFP_KERNEL)?.into())
210+
Ok(KBox::new(Self { _reg: reg, data }, GFP_KERNEL)?.into())
210211
}
211212
}

0 commit comments

Comments
 (0)