kms: Properly predict power saving effect on tracked state
Entering power saving effectively disables CRTCs, and thus the CRTC id a connector is associated with. Make sure that the tracked state reflects this. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2159>
This commit is contained in:
parent
8ea49fe9d9
commit
2478000c73
@ -766,6 +766,9 @@ meta_kms_connector_predict_state (MetaKmsConnector *connector,
|
||||
if (!current_state)
|
||||
return;
|
||||
|
||||
if (meta_kms_update_is_power_save (update))
|
||||
current_state->current_crtc_id = 0;
|
||||
|
||||
mode_sets = meta_kms_update_get_mode_sets (update);
|
||||
for (l = mode_sets; l; l = l->next)
|
||||
{
|
||||
|
@ -285,6 +285,14 @@ meta_kms_crtc_predict_state (MetaKmsCrtc *crtc,
|
||||
GList *crtc_gammas;
|
||||
GList *l;
|
||||
|
||||
if (meta_kms_update_is_power_save (update))
|
||||
{
|
||||
crtc->current_state.is_active = FALSE;
|
||||
crtc->current_state.rect = (MetaRectangle) { 0 };
|
||||
crtc->current_state.is_drm_mode_valid = FALSE;
|
||||
crtc->current_state.drm_mode = (drmModeModeInfo) { 0 };
|
||||
}
|
||||
|
||||
mode_sets = meta_kms_update_get_mode_sets (update);
|
||||
for (l = mode_sets; l; l = l->next)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user