File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ use crate::driver::{NovaDevice, NovaDriver};
44use crate :: gem:: NovaObject ;
55use kernel:: {
66 alloc:: flags:: * ,
7+ bindings,
78 drm:: { self , gem:: BaseObject } ,
89 pci,
910 prelude:: * ,
@@ -18,6 +19,8 @@ impl drm::file::DriverFile for File {
1819 fn open ( _dev : & NovaDevice ) -> Result < Pin < KBox < Self > > > {
1920 Ok ( KBox :: new ( Self , GFP_KERNEL ) ?. into ( ) )
2021 }
22+
23+ fn as_raw ( & self ) -> * mut bindings:: drm_file { todo ! ( ) }
2124}
2225
2326impl File {
Original file line number Diff line number Diff line change 11// SPDX-License-Identifier: GPL-2.0 or MIT
22
3+ use kernel:: bindings;
34use kernel:: drm;
45use kernel:: prelude:: * ;
56use kernel:: uaccess:: UserSlice ;
@@ -20,6 +21,8 @@ impl drm::file::DriverFile for File {
2021 fn open ( _dev : & drm:: Device < Self :: Driver > ) -> Result < Pin < KBox < Self > > > {
2122 KBox :: try_pin_init ( try_pin_init ! ( Self { } ) , GFP_KERNEL )
2223 }
24+
25+ fn as_raw ( & self ) -> * mut bindings:: drm_file { todo ! ( ) }
2326}
2427
2528impl File {
Original file line number Diff line number Diff line change @@ -15,6 +15,9 @@ pub trait DriverFile {
1515
1616 /// Open a new file (called when a client opens the DRM device).
1717 fn open ( device : & drm:: Device < Self :: Driver > ) -> Result < Pin < KBox < Self > > > ;
18+
19+ /// Get raw drm_file pointer
20+ fn as_raw ( & self ) -> * mut bindings:: drm_file ;
1821}
1922
2023/// An open DRM File.
You can’t perform that action at this time.
0 commit comments