mirror of
https://github.com/brl/mutter.git
synced 2024-12-25 12:32:05 +00:00
kms/crtc: Don't report predicted gamma changes
We started to report resource changes using prediction when an update
had been successfully committed. While at it, gamma changes were
reported too, but this was problematic, as gsd-color will listen for the
MonitorsChanged D-Bus signal and naively set the gamma again, even if it
didn't change. There aren't currently any actual use cases for being
told when gamma changes from a prediction, so just ignore it and just
report privacy screen changes.
This avoids a feedback loop between mutter and gsd-color.
Fixes: 81b28a1d97
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2531>
This commit is contained in:
parent
d928b6baa6
commit
d985069542
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user