sculpt: restore heartbeat watchdog for intel_fb

The automatic restart of intel_fb got lost during the transition from
the driver manager. This commit restores the heartbeat monitoring of
this driver.

Issue #5174
This commit is contained in:
Norman Feske 2024-04-17 17:25:07 +02:00 committed by Christian Helmuth
parent f34bf0d19e
commit 4a6ab846e5
2 changed files with 7 additions and 0 deletions

View File

@ -59,6 +59,7 @@ struct Sculpt::Fb_driver : private Noncopyable
});
start_node(_intel_fb, "pc_intel_fb_drv", [&] {
xml.node("heartbeat", [&] { });
xml.node("route", [&] {
gen_service_node<Platform::Session>(xml, [&] {
gen_named_node(xml, "child", "intel_gpu"); });

View File

@ -138,6 +138,12 @@ struct Sculpt::Child_state : Noncopyable
if (child.has_sub_node("caps") && child.sub_node("caps").has_attribute("requested"))
upgrade("caps", _cap_quota, _attr.max.caps, _warned_once.caps);
bool const responsive = (child.attribute_value("skipped_heartbeats", 0U) <= 4);
if (!responsive) {
trigger_restart();
result = true;
}
return result;
}