Skip to content

Commit

Permalink
drm/atomic: Update connector prop mapping in reset_state()
Browse files Browse the repository at this point in the history
On some cards, connectors may have been added dynamically since the
mapping was first created.

Fixes #1374.
  • Loading branch information
ids1024 committed Sep 18, 2024
1 parent 24652b2 commit 3c08aac
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/backend/drm/device/atomic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,11 @@ impl AtomicDrmDevice {
})
})?;

let prop_mapping = self.prop_mapping.read().unwrap();
let mut prop_mapping = self.prop_mapping.write().unwrap();

// Make sure the mapping is up to date
prop_mapping.connectors.clear();
map_props(&self.fd, res_handles.connectors(), &mut prop_mapping.connectors)?;

// Disable all connectors (otherwise we might run into conflicting commits when restarting the rendering loop)
let mut req = AtomicModeReq::new();
Expand Down

0 comments on commit 3c08aac

Please sign in to comment.