mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-20 17:52:52 +00:00
intel_fb: add apply_on_hotplug attribute
Make it configurable, whether on a hotplug event the current valid Genode config for the driver will be re-evaluated. By default it will be re-evaluated. Issue #4531
This commit is contained in:
parent
80981dbefb
commit
f1af654502
@ -4,14 +4,17 @@ Default behaviour
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
When no configuration is provided to the driver, it will switch on all devices
|
||||
connected to the graphics card. It will use the best resolution as
|
||||
connected to the graphics card. It will use the highest resolution as
|
||||
provided by the BIOS or EDID information from the display devices for each
|
||||
connector. The virtual resolution delivered to the client is the maximum in
|
||||
width and height of the different connectors. The framebuffer memory is
|
||||
directly exported to the client of the driver. When newly connected devices are
|
||||
detected by the hardware, the new connectors are enabled, probed, and again the
|
||||
'best' resolution will be chosen for the device. Nevertheless, it won't have an
|
||||
effect on the virtual resolution.
|
||||
width and height of the active connectors.
|
||||
|
||||
When newly connected devices are detected by the hardware, the new connectors
|
||||
are enabled, probed, and again the highest resolution across all active
|
||||
connectors will be chosen. By default, the current config of the driver will
|
||||
be re-read and re-applied. This behaviour can be disabled by
|
||||
|
||||
! <config apply_on_hotplug="no"/>
|
||||
|
||||
Configuration
|
||||
~~~~~~~~~~~~~
|
||||
|
@ -123,6 +123,18 @@ struct Framebuffer::Driver
|
||||
timer.sigh(timer_handler);
|
||||
timer.trigger_periodic(20*1000);
|
||||
}
|
||||
|
||||
void report_updated()
|
||||
{
|
||||
bool apply_config = true;
|
||||
|
||||
if (config.valid())
|
||||
apply_config = config.xml().attribute_value("apply_on_hotplug", apply_config);
|
||||
|
||||
/* trigger re-read config on connector change */
|
||||
if (apply_config)
|
||||
Genode::Signal_transmitter(config_handler).submit();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -270,8 +282,7 @@ void lx_emul_i915_report_connector(void * lx_data, void * genode_xml,
|
||||
lx_emul_i915_iterate_modes(lx_data, &xml);
|
||||
});
|
||||
|
||||
/* re-read config on connector change */
|
||||
Genode::Signal_transmitter(driver(Lx_kit::env().env).config_handler).submit();
|
||||
driver(Lx_kit::env().env).report_updated();
|
||||
}
|
||||
|
||||
|
||||
|
@ -103,7 +103,7 @@ void Framebuffer_controller::_update_fb_config(Xml_node const &report)
|
||||
static char buf[4096];
|
||||
|
||||
Xml_generator xml(buf, sizeof(buf), "config", [&] {
|
||||
// xml.attribute("poll", "5000");
|
||||
xml.attribute("apply_on_hotplug", "no");
|
||||
xml.node("report", [&] {
|
||||
xml.attribute("connectors", "yes");
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user