mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-18 21:27:56 +00:00
intel/display: report connectors w/o modes as off
in the XML report
This commit is contained in:
parent
f3b94a3b21
commit
77471cc10e
@ -41,6 +41,7 @@ void lx_emul_i915_hotplug_connector(void);
|
||||
|
||||
void lx_emul_i915_report_connector(void * lx_data, void * genode_xml,
|
||||
char const *name, char connected,
|
||||
char modes,
|
||||
unsigned brightness,
|
||||
unsigned width_mm, unsigned height_mm);
|
||||
void lx_emul_i915_iterate_modes(void *lx_data, void * genode_data);
|
||||
|
@ -984,6 +984,8 @@ static void _report_connectors(void * genode_data, bool const discrete)
|
||||
|
||||
struct drm_device const *dev = dev_client->dev;
|
||||
struct drm_connector *connector = NULL;
|
||||
struct drm_display_mode *mode = NULL;
|
||||
bool has_modes = false;
|
||||
|
||||
drm_connector_list_iter_begin(dev, &conn_iter);
|
||||
drm_client_for_each_connector_iter(connector, &conn_iter) {
|
||||
@ -1003,9 +1005,18 @@ static void _report_connectors(void * genode_data, bool const discrete)
|
||||
if ((discrete && mirror) || (!discrete && !mirror))
|
||||
continue;
|
||||
|
||||
list_for_each_entry(mode, &connector->modes, head) {
|
||||
|
||||
if (!mode)
|
||||
continue;
|
||||
|
||||
has_modes = true;
|
||||
}
|
||||
|
||||
lx_emul_i915_report_connector(connector, genode_data,
|
||||
connector->name,
|
||||
connector->status != connector_status_disconnected,
|
||||
has_modes,
|
||||
get_brightness(connector, INVALID_BRIGHTNESS),
|
||||
connector->display_info.width_mm,
|
||||
connector->display_info.height_mm);
|
||||
|
@ -528,6 +528,7 @@ void lx_emul_i915_hotplug_connector()
|
||||
|
||||
void lx_emul_i915_report_connector(void * lx_data, void * genode_xml,
|
||||
char const *name, char const connected,
|
||||
char const modes_available,
|
||||
unsigned brightness, unsigned width_mm,
|
||||
unsigned height_mm)
|
||||
{
|
||||
@ -535,7 +536,7 @@ void lx_emul_i915_report_connector(void * lx_data, void * genode_xml,
|
||||
|
||||
xml.node("connector", [&] ()
|
||||
{
|
||||
xml.attribute("connected", !!connected);
|
||||
xml.attribute("connected", connected && modes_available);
|
||||
xml.attribute("name", name);
|
||||
if (width_mm)
|
||||
xml.attribute("width_mm" , width_mm);
|
||||
|
Loading…
Reference in New Issue
Block a user