summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRui Matos <tiagomatos@gmail.com>2015-04-28 16:43:15 +0200
committerRui Matos <tiagomatos@gmail.com>2015-04-28 18:00:44 +0200
commit9060190555dcf1aa84715bab496cdfe4f6d79f1b (patch)
tree9d909014b03615023538df91bef3a1eaa53ab869
parent0de386965684bd66db6ba50e87d4285652f1b8d1 (diff)
monitor-manager-kms: Read crtc props after determining the crtc ID
Otherwise we can't read the properties.
-rw-r--r--src/backends/native/meta-monitor-manager-kms.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/backends/native/meta-monitor-manager-kms.c b/src/backends/native/meta-monitor-manager-kms.c
index 999a8980..3e1cef3a 100644
--- a/src/backends/native/meta-monitor-manager-kms.c
+++ b/src/backends/native/meta-monitor-manager-kms.c
@@ -454,10 +454,6 @@ meta_monitor_manager_kms_read_current (MetaMonitorManager *manager)
meta_crtc = &manager->crtcs[i];
- meta_crtc->driver_private = g_new (MetaCRTCKms, 1);
- meta_crtc->driver_notify = (GDestroyNotify) meta_crtc_destroy_notify;
- find_crtc_properties (manager_kms, meta_crtc);
-
meta_crtc->crtc_id = crtc->crtc_id;
meta_crtc->rect.x = crtc->x;
meta_crtc->rect.y = crtc->y;
@@ -483,6 +479,10 @@ meta_monitor_manager_kms_read_current (MetaMonitorManager *manager)
height = MAX (height, meta_crtc->rect.y + meta_crtc->rect.height);
}
+ meta_crtc->driver_private = g_new (MetaCRTCKms, 1);
+ meta_crtc->driver_notify = (GDestroyNotify) meta_crtc_destroy_notify;
+ find_crtc_properties (manager_kms, meta_crtc);
+
drmModeFreeCrtc (crtc);
}