diff --git a/repos/gems/run/sculpt.run b/repos/gems/run/sculpt.run
index 94b02024f3..3bd2d03bd0 100644
--- a/repos/gems/run/sculpt.run
+++ b/repos/gems/run/sculpt.run
@@ -151,14 +151,15 @@ proc log_route { } {
##
-# ROM routes that relabel generic NIC driver names to platform-specific binaries
+# ROM routes that relabel generic driver names to platform-specific binaries
#
-proc nic_driver_routes { } {
+proc driver_routes { } {
set result(pc) {
+
}
set result(mnt_reform2) {
@@ -177,27 +178,13 @@ proc nic_driver_routes { } {
- }
-
- if {[info exists result([board])]} {
- return $result([board]); }
-
- return "";
-}
-
-
-##
-# ROM routes that relabel generic USB driver names to board-specific binaries
-#
-proc usb_driver_routes { } {
-
- set result(pc) {
-
- }
-
- set result(pinephone) {
-
-
+
+
+
+
+
+
+
}
if {[info exists result([board])]} {
@@ -454,6 +441,7 @@ install_config {
+
@@ -711,7 +699,7 @@ install_config {
- } [log_route] [nic_driver_routes] [usb_driver_routes] {
+ } [log_route] [driver_routes] {
diff --git a/repos/gems/src/app/phone_manager/main.cc b/repos/gems/src/app/phone_manager/main.cc
index 0104e658f1..f300e2d26b 100644
--- a/repos/gems/src/app/phone_manager/main.cc
+++ b/repos/gems/src/app/phone_manager/main.cc
@@ -38,6 +38,7 @@
#include
#include
#include
+#include
#include
#include
#include
@@ -139,8 +140,6 @@ struct Sculpt::Main : Input_event_handler,
unsigned brightness;
- bool display;
-
static System from_xml(Xml_node const &node)
{
return System {
@@ -148,11 +147,10 @@ struct Sculpt::Main : Input_event_handler,
.state = node.attribute_value("state", State()),
.power_profile = node.attribute_value("power_profile", Power_profile()),
.brightness = node.attribute_value("brightness", 0u),
- .display = node.attribute_value("display", true)
};
}
- void generate(Xml_generator &xml) const
+ void generate(Xml_generator &xml, Screensaver const &screensaver) const
{
if (storage) xml.attribute("storage", "yes");
@@ -160,14 +158,13 @@ struct Sculpt::Main : Input_event_handler,
xml.attribute("state", state);
if (power_profile.length() > 1) {
- if (power_profile == "performance" && !display)
+ if (power_profile == "performance" && !screensaver.display_enabled())
xml.attribute("power_profile", "economic");
else
xml.attribute("power_profile", power_profile);
}
xml.attribute("brightness", brightness);
- xml.attribute("display", display ? "yes" : "no");
}
bool operator != (System const &other) const
@@ -175,8 +172,7 @@ struct Sculpt::Main : Input_event_handler,
return (other.storage != storage)
|| (other.state != state)
|| (other.power_profile != power_profile)
- || (other.brightness != brightness)
- || (other.display != display);
+ || (other.brightness != brightness);
}
} _system { };
@@ -184,8 +180,7 @@ struct Sculpt::Main : Input_event_handler,
void _update_managed_system_config()
{
_system_config.generate([&] (Xml_generator &xml) {
- _system.generate(xml); });
- }
+ _system.generate(xml, _screensaver); }); }
void _handle_system_config(Xml_node node)
{
@@ -212,9 +207,12 @@ struct Sculpt::Main : Input_event_handler,
if (_devices.xml().num_sub_nodes() == 0)
_board_info.wifi_present = true;
- _board_info.usb_present = true;
+ _board_info.usb_present = true;
+ _board_info.soc_fb_present = true;
+ _board_info.soc_touch_present = true;
_fb_driver.update(_child_states, _board_info, _platform.xml());
+ _touch_driver.update(_child_states, _board_info);
_update_usb_drivers();
update_network_dialog();
@@ -239,7 +237,8 @@ struct Sculpt::Main : Input_event_handler,
_update_managed_system_config();
}
- Fb_driver _fb_driver { };
+ Fb_driver _fb_driver { };
+ Touch_driver _touch_driver { };
Signal_handler _gui_mode_handler {
_env.ep(), *this, &Main::_handle_gui_mode };
@@ -279,8 +278,8 @@ struct Sculpt::Main : Input_event_handler,
*/
void screensaver_changed() override
{
- _system.display = _screensaver.display_enabled();
_update_managed_system_config();
+ generate_runtime_config();
}
Attached_rom_dataspace _leitzentrale_rom { _env, "leitzentrale" };
@@ -2459,7 +2458,10 @@ void Sculpt::Main::_generate_runtime_config(Xml_generator &xml) const
xml.attribute("height", _affinity_space.height());
});
- _fb_driver.gen_start_nodes(xml);
+ if (_screensaver.display_enabled()) {
+ _fb_driver .gen_start_nodes(xml);
+ _touch_driver.gen_start_node (xml);
+ }
if (_network._nic_target.type() == Nic_target::Type::MODEM)
_usb_driver.gen_start_nodes(xml);
diff --git a/repos/gems/src/app/sculpt_manager/fb_driver.h b/repos/gems/src/app/sculpt_manager/fb_driver.h
index 6af1a7dbb8..75b408ba92 100644
--- a/repos/gems/src/app/sculpt_manager/fb_driver.h
+++ b/repos/gems/src/app/sculpt_manager/fb_driver.h
@@ -27,7 +27,8 @@ struct Sculpt::Fb_driver : private Noncopyable
Constructible _intel_gpu { },
_intel_fb { },
_vesa_fb { },
- _boot_fb { };
+ _boot_fb { },
+ _soc_fb { };
void gen_start_nodes(Xml_generator &xml) const
{
@@ -101,6 +102,18 @@ struct Sculpt::Fb_driver : private Noncopyable
gen_common_routes(xml);
});
});
+
+ start_node(_soc_fb, "fb_drv", [&] {
+ xml.node("route", [&] {
+ gen_parent_route (xml);
+ gen_parent_route(xml);
+ gen_capture_route(xml);
+ gen_parent_rom_route(xml, "config", "config -> fb_drv");
+ gen_parent_rom_route(xml, "dtb", "fb_drv.dtb");
+ gen_parent_route(xml);
+ gen_common_routes(xml);
+ });
+ });
};
void update(Registry ®istry, Board_info const &board_info,
@@ -118,6 +131,10 @@ struct Sculpt::Fb_driver : private Noncopyable
registry, "vesa_fb", Priority::MULTIMEDIA,
Ram_quota { 8*1024*1024 }, Cap_quota { 110 });
+ _soc_fb.conditional(board_info.soc_fb_present,
+ registry, "fb", Priority::MULTIMEDIA,
+ Ram_quota { 16*1024*1024 }, Cap_quota { 250 });
+
if (board_info.boot_fb_present && !_boot_fb.constructed())
Boot_fb::with_mode(platform, [&] (Boot_fb::Mode mode) {
_boot_fb.construct(registry, "boot_fb", Priority::MULTIMEDIA,
diff --git a/repos/gems/src/app/sculpt_manager/model/board_info.h b/repos/gems/src/app/sculpt_manager/model/board_info.h
index fa86117bcc..f6399c8c89 100644
--- a/repos/gems/src/app/sculpt_manager/model/board_info.h
+++ b/repos/gems/src/app/sculpt_manager/model/board_info.h
@@ -26,10 +26,12 @@ struct Sculpt::Board_info
intel_gfx_present,
boot_fb_present,
vesa_fb_present,
+ soc_fb_present,
nvme_present,
ahci_present,
usb_present,
- ps2_present;
+ ps2_present,
+ soc_touch_present;
static Board_info from_xml(Xml_node const &devices, Xml_node const &platform)
{
diff --git a/repos/gems/src/app/sculpt_manager/touch_driver.h b/repos/gems/src/app/sculpt_manager/touch_driver.h
new file mode 100644
index 0000000000..5d3878fe2c
--- /dev/null
+++ b/repos/gems/src/app/sculpt_manager/touch_driver.h
@@ -0,0 +1,63 @@
+/*
+ * \brief Sculpt touchscreen-driver management
+ * \author Norman Feske
+ * \date 2024-03-25
+ */
+
+/*
+ * Copyright (C) 2024 Genode Labs GmbH
+ *
+ * This file is part of the Genode OS framework, which is distributed
+ * under the terms of the GNU Affero General Public License version 3.
+ */
+
+#ifndef _TOUCH_DRIVER_H_
+#define _TOUCH_DRIVER_H_
+
+/* local includes */
+#include
+#include
+#include
+
+namespace Sculpt { struct Touch_driver; }
+
+
+struct Sculpt::Touch_driver : private Noncopyable
+{
+ Constructible _soc { };
+
+ void gen_start_node(Xml_generator &xml) const
+ {
+ if (!_soc.constructed())
+ return;
+
+ xml.node("start", [&] {
+ _soc->gen_start_node_content(xml);
+ gen_named_node(xml, "binary", "touch_drv");
+ xml.node("config", [&] { });
+ xml.node("route", [&] {
+ gen_parent_rom_route(xml, "dtb", "touch_drv.dtb");
+ gen_parent_route (xml);
+ gen_parent_route(xml);
+ gen_parent_route (xml);
+ gen_parent_route (xml);
+ gen_parent_route (xml);
+ gen_parent_route (xml);
+ gen_parent_route (xml);
+ gen_parent_route (xml);
+ gen_service_node(xml, [&] {
+ xml.node("parent", [&] {
+ xml.attribute("label", "touch"); }); });
+ });
+ });
+ };
+
+ void update(Registry ®istry, Board_info const &board_info)
+ {
+ _soc.conditional(board_info.soc_touch_present,
+ registry, "touch", Priority::MULTIMEDIA,
+ Ram_quota { 10*1024*1024 }, Cap_quota { 250 });
+ }
+};
+
+#endif /* _TOUCH_DRIVER_H_ */