examples/anvil: add disable_connectors for device creation

This commit is contained in:
Victor Brekenfeld 2020-04-26 13:52:31 +02:00
parent 77875f71c6
commit a4203bd216
3 changed files with 3 additions and 3 deletions

View File

@ -389,7 +389,7 @@ impl<S: SessionNotifier, Data: 'static> UdevHandler for UdevHandlerImpl<S, Data>
) )
.ok() .ok()
.and_then( .and_then(
|fd| match FallbackDevice::new(SessionFd(fd), self.logger.clone()) { |fd| match FallbackDevice::new(SessionFd(fd), true, self.logger.clone()) {
Ok(drm) => Some(drm), Ok(drm) => Some(drm),
Err(err) => { Err(err) => {
error!(self.logger, "Skipping drm device, because of error: {}", err); error!(self.logger, "Skipping drm device, because of error: {}", err);

View File

@ -56,7 +56,7 @@ fn main() {
let mut options = OpenOptions::new(); let mut options = OpenOptions::new();
options.read(true); options.read(true);
options.write(true); options.write(true);
let mut device = AtomicDrmDevice::new(options.open("/dev/dri/card0").unwrap(), log.clone()).unwrap(); let mut device = AtomicDrmDevice::new(options.open("/dev/dri/card0").unwrap(), true, log.clone()).unwrap();
// Get a set of all modesetting resource handles (excluding planes): // Get a set of all modesetting resource handles (excluding planes):
let res_handles = Device::resource_handles(&device).unwrap(); let res_handles = Device::resource_handles(&device).unwrap();

View File

@ -40,7 +40,7 @@ fn main() {
let mut options = OpenOptions::new(); let mut options = OpenOptions::new();
options.read(true); options.read(true);
options.write(true); options.write(true);
let mut device = LegacyDrmDevice::new(options.open("/dev/dri/card0").unwrap(), log.clone()).unwrap(); let mut device = LegacyDrmDevice::new(options.open("/dev/dri/card0").unwrap(), true, log.clone()).unwrap();
// Get a set of all modesetting resource handles (excluding planes): // Get a set of all modesetting resource handles (excluding planes):
let res_handles = Device::resource_handles(&device).unwrap(); let res_handles = Device::resource_handles(&device).unwrap();