[mutter] kms: Update device state when resuming
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] kms: Update device state when resuming
- Date: Fri, 22 Jan 2021 17:08:32 +0000 (UTC)
commit f0318d8964c1509dafa0d1cb85449e3fb9a27995
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Tue Dec 15 22:42:55 2020 +0100
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>
src/backends/native/meta-backend-native.c | 1 +
src/backends/native/meta-kms.c | 6 ++++++
src/backends/native/meta-kms.h | 2 ++
src/backends/native/meta-monitor-manager-kms.c | 1 -
4 files changed, 9 insertions(+), 1 deletion(-)
---
diff --git a/src/backends/native/meta-backend-native.c b/src/backends/native/meta-backend-native.c
index 9c222d3501..cfa9ab8101 100644
--- a/src/backends/native/meta-backend-native.c
+++ b/src/backends/native/meta-backend-native.c
@@ -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);
diff --git a/src/backends/native/meta-kms.c b/src/backends/native/meta-kms.c
index 15fc6f2ef2..7b002273e1 100644
--- a/src/backends/native/meta-kms.c
+++ b/src/backends/native/meta-kms.c
@@ -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)
diff --git a/src/backends/native/meta-kms.h b/src/backends/native/meta-kms.h
index 792279e84a..7bbd78e0c5 100644
--- a/src/backends/native/meta-kms.h
+++ b/src/backends/native/meta-kms.h
@@ -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,
diff --git a/src/backends/native/meta-monitor-manager-kms.c b/src/backends/native/meta-monitor-manager-kms.c
index 13fb196a17..5ad8bf591f 100644
--- a/src/backends/native/meta-monitor-manager-kms.c
+++ b/src/backends/native/meta-monitor-manager-kms.c
@@ -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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]