File tree Expand file tree Collapse file tree 1 file changed +15
-13
lines changed Expand file tree Collapse file tree 1 file changed +15
-13
lines changed Original file line number Diff line number Diff line change @@ -156,19 +156,21 @@ pub fn init_backend(
156156 }
157157 }
158158
159- let kms = match & mut state. backend {
160- BackendData :: Kms ( kms) => kms,
161- _ => unreachable ! ( ) ,
162- } ;
163- if let Some ( primary_node) = kms
164- . primary_node
165- . and_then ( |node| node. node_with_type ( NodeType :: Primary ) . and_then ( |x| x. ok ( ) ) )
166- {
167- if let Some ( device) = kms. drm_devices . get ( & primary_node) {
168- let import_device = device. drm . device ( ) . device_fd ( ) . clone ( ) ;
169- if supports_syncobj_eventfd ( & import_device) {
170- let syncobj_state = DrmSyncobjState :: new :: < State > ( & dh, import_device) ;
171- kms. syncobj_state = Some ( syncobj_state) ;
159+ if !crate :: utils:: env:: bool_var ( "COSMIC_DISABLE_SYNCOBJ" ) . unwrap_or ( false ) {
160+ let kms = match & mut state. backend {
161+ BackendData :: Kms ( kms) => kms,
162+ _ => unreachable ! ( ) ,
163+ } ;
164+ if let Some ( primary_node) = kms
165+ . primary_node
166+ . and_then ( |node| node. node_with_type ( NodeType :: Primary ) . and_then ( |x| x. ok ( ) ) )
167+ {
168+ if let Some ( device) = kms. drm_devices . get ( & primary_node) {
169+ let import_device = device. drm . device ( ) . device_fd ( ) . clone ( ) ;
170+ if supports_syncobj_eventfd ( & import_device) {
171+ let syncobj_state = DrmSyncobjState :: new :: < State > ( & dh, import_device) ;
172+ kms. syncobj_state = Some ( syncobj_state) ;
173+ }
172174 }
173175 }
174176 }
You can’t perform that action at this time.
0 commit comments