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:
parent
2c85eb7254
commit
9abce2fca7
@ -364,18 +364,7 @@ meta_gpu_kms_read_current (MetaGpu *gpu,
|
|||||||
gboolean
|
gboolean
|
||||||
meta_gpu_kms_can_have_outputs (MetaGpuKms *gpu_kms)
|
meta_gpu_kms_can_have_outputs (MetaGpuKms *gpu_kms)
|
||||||
{
|
{
|
||||||
GList *l;
|
return !!meta_kms_device_get_connectors (gpu_kms->kms_device);
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MetaGpuKms *
|
MetaGpuKms *
|
||||||
|
Loading…
Reference in New Issue
Block a user