Skip to content

Commit d6c3a6b

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 53c5276 commit d6c3a6b

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
@@ -31,6 +31,7 @@ pub(crate) struct AsahiData {
3131

3232
pub(crate) struct AsahiDriver {
3333
_reg: drm::drv::Registration<Self>,
34+
pub(crate) data: Arc<AsahiData>,
3435
}
3536

3637
/// Convenience type alias for the DRM device type for this driver.
@@ -202,6 +203,6 @@ impl platform::Driver for AsahiDriver {
202203

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

205-
Ok(KBox::new(Self { _reg: reg }, GFP_KERNEL)?.into())
206+
Ok(KBox::new(Self { _reg: reg, data }, GFP_KERNEL)?.into())
206207
}
207208
}

0 commit comments

Comments
 (0)