diff --git a/src/backends/native/meta-kms-crtc-private.h b/src/backends/native/meta-kms-crtc-private.h index 79a5f0fe6..baf5f4099 100644 --- a/src/backends/native/meta-kms-crtc-private.h +++ b/src/backends/native/meta-kms-crtc-private.h @@ -42,8 +42,8 @@ MetaKmsResourceChanges meta_kms_crtc_update_state (MetaKmsCrtc *crtc); void meta_kms_crtc_disable (MetaKmsCrtc *crtc); -MetaKmsResourceChanges meta_kms_crtc_predict_state (MetaKmsCrtc *crtc, - MetaKmsUpdate *update); +void meta_kms_crtc_predict_state (MetaKmsCrtc *crtc, + MetaKmsUpdate *update); uint32_t meta_kms_crtc_get_prop_id (MetaKmsCrtc *crtc, MetaKmsCrtcProp prop); diff --git a/src/backends/native/meta-kms-crtc.c b/src/backends/native/meta-kms-crtc.c index 707dfd4b8..ee9e19d2d 100644 --- a/src/backends/native/meta-kms-crtc.c +++ b/src/backends/native/meta-kms-crtc.c @@ -278,14 +278,13 @@ meta_kms_crtc_disable (MetaKmsCrtc *crtc) crtc->current_state.drm_mode = (drmModeModeInfo) { 0 }; } -MetaKmsResourceChanges +void meta_kms_crtc_predict_state (MetaKmsCrtc *crtc, MetaKmsUpdate *update) { GList *mode_sets; GList *crtc_gammas; GList *l; - MetaKmsResourceChanges changes = META_KMS_RESOURCE_CHANGE_NONE; mode_sets = meta_kms_update_get_mode_sets (update); for (l = mode_sets; l; l = l->next) @@ -338,11 +337,8 @@ meta_kms_crtc_predict_state (MetaKmsCrtc *crtc, crtc->current_state.gamma.blue = g_memdup2 (gamma->blue, gamma->size * sizeof (uint16_t)); - changes |= META_KMS_RESOURCE_CHANGE_GAMMA; break; } - - return changes; } static void diff --git a/src/backends/native/meta-kms-impl-device.c b/src/backends/native/meta-kms-impl-device.c index 653a96f71..dc2ac31ef 100644 --- a/src/backends/native/meta-kms-impl-device.c +++ b/src/backends/native/meta-kms-impl-device.c @@ -923,12 +923,7 @@ meta_kms_impl_device_predict_states (MetaKmsImplDevice *impl_device, MetaKmsResourceChanges changes = META_KMS_RESOURCE_CHANGE_NONE; GList *l; - for (l = priv->crtcs; l; l = l->next) - { - MetaKmsCrtc *crtc = l->data; - - changes |= meta_kms_crtc_predict_state (crtc, update); - } + g_list_foreach (priv->crtcs, (GFunc) meta_kms_crtc_predict_state, update); for (l = priv->connectors; l; l = l->next) {