1
0
Fork 0

gpu/kms: Report that we can have outputs if we have connectors

As part of https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/525
(introduction of transactional KMS API), the logic determining whether a
GPU can have outputs was changed from whether any connectors existed to
whether any connected connectors existed. That effectively meant that we
wouldn't attempt to start at all if there were no monitors connected
while starting up.

This was unintentional, so lets revert back the expected behavior.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2821>
This commit is contained in:
Jonas Ådahl 2023-02-01 10:07:53 +01:00 committed by Marge Bot
parent 2c85eb7254
commit 9abce2fca7

View file

@ -364,18 +364,7 @@ meta_gpu_kms_read_current (MetaGpu *gpu,
gboolean
meta_gpu_kms_can_have_outputs (MetaGpuKms *gpu_kms)
{
GList *l;
int n_connected_connectors = 0;
for (l = meta_kms_device_get_connectors (gpu_kms->kms_device); l; l = l->next)
{
MetaKmsConnector *kms_connector = l->data;
if (meta_kms_connector_get_current_state (kms_connector))
n_connected_connectors++;
}
return n_connected_connectors > 0;
return !!meta_kms_device_get_connectors (gpu_kms->kms_device);
}
MetaGpuKms *