kms: Update device state when resuming
Suspending might have changed the CRTC configuration, turning some off, some on, etc. We need to update our internal representation of this state, so that we know how to reconfigure upon resuming, e.g. what CRTCs to turn off again. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1488>
This commit is contained in:
parent
214850143d
commit
f0318d8964
@ -652,6 +652,7 @@ void meta_backend_native_resume (MetaBackendNative *native)
|
||||
"Backend (resume)");
|
||||
|
||||
meta_monitor_manager_kms_resume (monitor_manager_kms);
|
||||
meta_kms_resume (native->kms);
|
||||
|
||||
connect_udev_device_added_handler (native);
|
||||
|
||||
|
@ -573,6 +573,12 @@ handle_hotplug_event (MetaKms *kms)
|
||||
g_signal_emit (kms, signals[RESOURCES_CHANGED], 0);
|
||||
}
|
||||
|
||||
void
|
||||
meta_kms_resume (MetaKms *kms)
|
||||
{
|
||||
handle_hotplug_event (kms);
|
||||
}
|
||||
|
||||
static void
|
||||
on_udev_hotplug (MetaUdev *udev,
|
||||
MetaKms *kms)
|
||||
|
@ -50,6 +50,8 @@ MetaBackend * meta_kms_get_backend (MetaKms *kms);
|
||||
|
||||
GList * meta_kms_get_devices (MetaKms *kms);
|
||||
|
||||
void meta_kms_resume (MetaKms *kms);
|
||||
|
||||
MetaKmsDevice * meta_kms_create_device (MetaKms *kms,
|
||||
const char *path,
|
||||
MetaKmsDeviceFlag flags,
|
||||
|
@ -516,7 +516,6 @@ void
|
||||
meta_monitor_manager_kms_resume (MetaMonitorManagerKms *manager_kms)
|
||||
{
|
||||
meta_monitor_manager_kms_connect_hotplug_handler (manager_kms);
|
||||
handle_hotplug_event (META_MONITOR_MANAGER (manager_kms));
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
Loading…
Reference in New Issue
Block a user