mirror of
https://github.com/brl/mutter.git
synced 2024-12-27 05:12:15 +00:00
kms: Add _in_impl() suffix to some functions
These functions always run in the impl context; make that clearer by adding a _in_impl() suffix as done elsewhere. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2853>
This commit is contained in:
parent
d1506fbb78
commit
5f34d1eae2
@ -102,14 +102,14 @@ uint64_t meta_kms_connector_get_prop_drm_value (MetaKmsConnector *connector,
|
||||
MetaKmsConnectorProp prop,
|
||||
uint64_t value);
|
||||
|
||||
MetaKmsResourceChanges meta_kms_connector_update_state (MetaKmsConnector *connector,
|
||||
drmModeRes *drm_resources,
|
||||
drmModeConnector *drm_connector);
|
||||
MetaKmsResourceChanges meta_kms_connector_update_state_in_impl (MetaKmsConnector *connector,
|
||||
drmModeRes *drm_resources,
|
||||
drmModeConnector *drm_connector);
|
||||
|
||||
void meta_kms_connector_disable (MetaKmsConnector *connector);
|
||||
void meta_kms_connector_disable_in_impl (MetaKmsConnector *connector);
|
||||
|
||||
MetaKmsResourceChanges meta_kms_connector_predict_state (MetaKmsConnector *connector,
|
||||
MetaKmsUpdate *update);
|
||||
MetaKmsResourceChanges meta_kms_connector_predict_state_in_impl (MetaKmsConnector *connector,
|
||||
MetaKmsUpdate *update);
|
||||
|
||||
MetaKmsConnector * meta_kms_connector_new (MetaKmsImplDevice *impl_device,
|
||||
drmModeConnector *drm_connector,
|
||||
|
@ -753,9 +753,9 @@ out:
|
||||
}
|
||||
|
||||
MetaKmsResourceChanges
|
||||
meta_kms_connector_update_state (MetaKmsConnector *connector,
|
||||
drmModeRes *drm_resources,
|
||||
drmModeConnector *drm_connector)
|
||||
meta_kms_connector_update_state_in_impl (MetaKmsConnector *connector,
|
||||
drmModeRes *drm_resources,
|
||||
drmModeConnector *drm_connector)
|
||||
{
|
||||
MetaKmsImplDevice *impl_device;
|
||||
MetaKmsResourceChanges changes;
|
||||
@ -769,7 +769,7 @@ meta_kms_connector_update_state (MetaKmsConnector *connector,
|
||||
}
|
||||
|
||||
void
|
||||
meta_kms_connector_disable (MetaKmsConnector *connector)
|
||||
meta_kms_connector_disable_in_impl (MetaKmsConnector *connector)
|
||||
{
|
||||
MetaKmsConnectorState *current_state;
|
||||
|
||||
@ -781,8 +781,8 @@ meta_kms_connector_disable (MetaKmsConnector *connector)
|
||||
}
|
||||
|
||||
MetaKmsResourceChanges
|
||||
meta_kms_connector_predict_state (MetaKmsConnector *connector,
|
||||
MetaKmsUpdate *update)
|
||||
meta_kms_connector_predict_state_in_impl (MetaKmsConnector *connector,
|
||||
MetaKmsUpdate *update)
|
||||
{
|
||||
MetaKmsImplDevice *impl_device;
|
||||
MetaKmsConnectorState *current_state;
|
||||
|
@ -38,11 +38,11 @@ MetaKmsCrtc * meta_kms_crtc_new (MetaKmsImplDevice *impl_device,
|
||||
int idx,
|
||||
GError **error);
|
||||
|
||||
MetaKmsResourceChanges meta_kms_crtc_update_state (MetaKmsCrtc *crtc);
|
||||
MetaKmsResourceChanges meta_kms_crtc_update_state_in_impl (MetaKmsCrtc *crtc);
|
||||
|
||||
void meta_kms_crtc_disable (MetaKmsCrtc *crtc);
|
||||
void meta_kms_crtc_disable_in_impl (MetaKmsCrtc *crtc);
|
||||
|
||||
void meta_kms_crtc_predict_state (MetaKmsCrtc *crtc,
|
||||
void meta_kms_crtc_predict_state_in_impl (MetaKmsCrtc *crtc,
|
||||
MetaKmsUpdate *update);
|
||||
|
||||
uint32_t meta_kms_crtc_get_prop_id (MetaKmsCrtc *crtc,
|
||||
|
@ -237,7 +237,7 @@ meta_kms_crtc_read_state (MetaKmsCrtc *crtc,
|
||||
}
|
||||
|
||||
MetaKmsResourceChanges
|
||||
meta_kms_crtc_update_state (MetaKmsCrtc *crtc)
|
||||
meta_kms_crtc_update_state_in_impl (MetaKmsCrtc *crtc)
|
||||
{
|
||||
MetaKmsImplDevice *impl_device;
|
||||
MetaKmsResourceChanges changes;
|
||||
@ -270,7 +270,7 @@ out:
|
||||
}
|
||||
|
||||
void
|
||||
meta_kms_crtc_disable (MetaKmsCrtc *crtc)
|
||||
meta_kms_crtc_disable_in_impl (MetaKmsCrtc *crtc)
|
||||
{
|
||||
crtc->current_state.is_active = FALSE;
|
||||
crtc->current_state.rect = (MetaRectangle) { 0 };
|
||||
@ -279,8 +279,8 @@ meta_kms_crtc_disable (MetaKmsCrtc *crtc)
|
||||
}
|
||||
|
||||
void
|
||||
meta_kms_crtc_predict_state (MetaKmsCrtc *crtc,
|
||||
MetaKmsUpdate *update)
|
||||
meta_kms_crtc_predict_state_in_impl (MetaKmsCrtc *crtc,
|
||||
MetaKmsUpdate *update)
|
||||
{
|
||||
GList *mode_sets;
|
||||
GList *crtc_gammas;
|
||||
|
@ -426,9 +426,9 @@ update_connectors (MetaKmsImplDevice *impl_device,
|
||||
if (updated_connector_id == 0 ||
|
||||
meta_kms_connector_get_id (connector) == updated_connector_id)
|
||||
{
|
||||
changes |= meta_kms_connector_update_state (connector,
|
||||
drm_resources,
|
||||
drm_connector);
|
||||
changes |= meta_kms_connector_update_state_in_impl (connector,
|
||||
drm_resources,
|
||||
drm_connector);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -911,7 +911,7 @@ meta_kms_impl_device_update_states (MetaKmsImplDevice *impl_device,
|
||||
meta_kms_crtc_get_id (crtc) != crtc_id)
|
||||
continue;
|
||||
|
||||
changes |= meta_kms_crtc_update_state (crtc);
|
||||
changes |= meta_kms_crtc_update_state_in_impl (crtc);
|
||||
}
|
||||
|
||||
drmModeFreeResources (drm_resources);
|
||||
@ -935,13 +935,15 @@ meta_kms_impl_device_predict_states (MetaKmsImplDevice *impl_device,
|
||||
MetaKmsResourceChanges changes = META_KMS_RESOURCE_CHANGE_NONE;
|
||||
GList *l;
|
||||
|
||||
g_list_foreach (priv->crtcs, (GFunc) meta_kms_crtc_predict_state, update);
|
||||
g_list_foreach (priv->crtcs,
|
||||
(GFunc) meta_kms_crtc_predict_state_in_impl,
|
||||
update);
|
||||
|
||||
for (l = priv->connectors; l; l = l->next)
|
||||
{
|
||||
MetaKmsConnector *connector = l->data;
|
||||
|
||||
changes |= meta_kms_connector_predict_state (connector, update);
|
||||
changes |= meta_kms_connector_predict_state_in_impl (connector, update);
|
||||
}
|
||||
|
||||
return changes;
|
||||
@ -1017,8 +1019,10 @@ meta_kms_impl_device_disable (MetaKmsImplDevice *impl_device)
|
||||
|
||||
meta_kms_impl_device_hold_fd (impl_device);
|
||||
klass->disable (impl_device);
|
||||
g_list_foreach (priv->crtcs, (GFunc) meta_kms_crtc_disable, NULL);
|
||||
g_list_foreach (priv->connectors, (GFunc) meta_kms_connector_disable, NULL);
|
||||
g_list_foreach (priv->crtcs,
|
||||
(GFunc) meta_kms_crtc_disable_in_impl, NULL);
|
||||
g_list_foreach (priv->connectors,
|
||||
(GFunc) meta_kms_connector_disable_in_impl, NULL);
|
||||
meta_kms_impl_device_unhold_fd (impl_device);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user