File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
src/aero_kernel/src/drivers/drm Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -102,6 +102,8 @@ impl ModeObject for Encoder {
102
102
}
103
103
}
104
104
105
+ /// Represents a display connector; transmits the signal to the display, detects
106
+ /// display connection, removal and exposes the display's supported modes.
105
107
#[ derive( Default ) ]
106
108
struct Connector {
107
109
id : u32 ,
@@ -188,6 +190,14 @@ impl Drm {
188
190
crtc. id = crtcs. len ( ) as u32 ;
189
191
crtcs. push ( crtc) ;
190
192
}
193
+
194
+ /// Installs and initializes the connector identifier.
195
+ pub fn install_connector ( & self , mut connector : Connector ) {
196
+ let mut connectors = self . connectors . lock ( ) ;
197
+
198
+ connector. id = connectors. len ( ) as u32 ;
199
+ connectors. push ( connector) ;
200
+ }
191
201
}
192
202
193
203
impl INodeInterface for Drm {
Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ impl DrmDevice for RawFramebuffer {
53
53
54
54
fn init ( ) {
55
55
let crtc = Crtc :: default ( ) ;
56
+ let connector = Connector :: default ( ) ;
56
57
57
58
let dri = devfs:: DEV_FILESYSTEM
58
59
. root_dir ( )
@@ -63,6 +64,7 @@ fn init() {
63
64
let rfb = Drm :: new ( Arc :: new ( RawFramebuffer { } ) ) ;
64
65
65
66
rfb. install_crtc ( crtc) ;
67
+ rfb. install_connector ( connector) ;
66
68
67
69
devfs:: install_device_at ( dri, rfb) . expect ( "ramfs: failed to install DRM device" ) ;
68
70
}
You can’t perform that action at this time.
0 commit comments