From 4a6ab846e5a8f90b280f5203dd1415890ad8940c Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Wed, 17 Apr 2024 17:25:07 +0200 Subject: [PATCH] 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 --- repos/gems/src/app/sculpt_manager/driver/fb.h | 1 + repos/gems/src/app/sculpt_manager/model/child_state.h | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/repos/gems/src/app/sculpt_manager/driver/fb.h b/repos/gems/src/app/sculpt_manager/driver/fb.h index 02454c2ae7..279489df1e 100644 --- a/repos/gems/src/app/sculpt_manager/driver/fb.h +++ b/repos/gems/src/app/sculpt_manager/driver/fb.h @@ -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(xml, [&] { gen_named_node(xml, "child", "intel_gpu"); }); diff --git a/repos/gems/src/app/sculpt_manager/model/child_state.h b/repos/gems/src/app/sculpt_manager/model/child_state.h index abad939971..1628a8c553 100644 --- a/repos/gems/src/app/sculpt_manager/model/child_state.h +++ b/repos/gems/src/app/sculpt_manager/model/child_state.h @@ -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; }