1
0
Fork 0
forked from wry/wry

metal: handle gpu reset

Unfortunately this doesn't seem to work on amdgpu [1]. I've tested that
it works on i915.

[1] https://gitlab.freedesktop.org/drm/amd/-/issues/1749
This commit is contained in:
Julian Orth 2022-05-06 13:09:29 +02:00
parent 4584dee160
commit d2913449ea
21 changed files with 377 additions and 120 deletions

View file

@ -235,8 +235,16 @@ impl MetalBackend {
}
}
fn handle_drm_change(self: &Rc<Self>, _dev: UdevDevice) -> Option<()> {
// TODO: Handle monitor connections and connector hotplug
fn handle_drm_change(self: &Rc<Self>, dev: UdevDevice) -> Option<()> {
let dev = match self.device_holder.drm_devices.get(&dev.devnum()) {
Some(dev) => dev,
_ => return None,
};
for connector in dev.connectors.values() {
connector.can_present.set(true);
connector.has_damage.set(true);
connector.schedule_present();
}
None
}