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:
Jonas Ådahl 2022-03-17 10:45:53 +01:00 committed by Marge Bot
parent d1506fbb78
commit 5f34d1eae2
5 changed files with 31 additions and 27 deletions

View File

@ -102,14 +102,14 @@ uint64_t meta_kms_connector_get_prop_drm_value (MetaKmsConnector *connector,
MetaKmsConnectorProp prop, MetaKmsConnectorProp prop,
uint64_t value); uint64_t value);
MetaKmsResourceChanges meta_kms_connector_update_state (MetaKmsConnector *connector, MetaKmsResourceChanges meta_kms_connector_update_state_in_impl (MetaKmsConnector *connector,
drmModeRes *drm_resources, drmModeRes *drm_resources,
drmModeConnector *drm_connector); 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, MetaKmsResourceChanges meta_kms_connector_predict_state_in_impl (MetaKmsConnector *connector,
MetaKmsUpdate *update); MetaKmsUpdate *update);
MetaKmsConnector * meta_kms_connector_new (MetaKmsImplDevice *impl_device, MetaKmsConnector * meta_kms_connector_new (MetaKmsImplDevice *impl_device,
drmModeConnector *drm_connector, drmModeConnector *drm_connector,

View File

@ -753,9 +753,9 @@ out:
} }
MetaKmsResourceChanges MetaKmsResourceChanges
meta_kms_connector_update_state (MetaKmsConnector *connector, meta_kms_connector_update_state_in_impl (MetaKmsConnector *connector,
drmModeRes *drm_resources, drmModeRes *drm_resources,
drmModeConnector *drm_connector) drmModeConnector *drm_connector)
{ {
MetaKmsImplDevice *impl_device; MetaKmsImplDevice *impl_device;
MetaKmsResourceChanges changes; MetaKmsResourceChanges changes;
@ -769,7 +769,7 @@ meta_kms_connector_update_state (MetaKmsConnector *connector,
} }
void void
meta_kms_connector_disable (MetaKmsConnector *connector) meta_kms_connector_disable_in_impl (MetaKmsConnector *connector)
{ {
MetaKmsConnectorState *current_state; MetaKmsConnectorState *current_state;
@ -781,8 +781,8 @@ meta_kms_connector_disable (MetaKmsConnector *connector)
} }
MetaKmsResourceChanges MetaKmsResourceChanges
meta_kms_connector_predict_state (MetaKmsConnector *connector, meta_kms_connector_predict_state_in_impl (MetaKmsConnector *connector,
MetaKmsUpdate *update) MetaKmsUpdate *update)
{ {
MetaKmsImplDevice *impl_device; MetaKmsImplDevice *impl_device;
MetaKmsConnectorState *current_state; MetaKmsConnectorState *current_state;

View File

@ -38,11 +38,11 @@ MetaKmsCrtc * meta_kms_crtc_new (MetaKmsImplDevice *impl_device,
int idx, int idx,
GError **error); 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); MetaKmsUpdate *update);
uint32_t meta_kms_crtc_get_prop_id (MetaKmsCrtc *crtc, uint32_t meta_kms_crtc_get_prop_id (MetaKmsCrtc *crtc,

View File

@ -237,7 +237,7 @@ meta_kms_crtc_read_state (MetaKmsCrtc *crtc,
} }
MetaKmsResourceChanges MetaKmsResourceChanges
meta_kms_crtc_update_state (MetaKmsCrtc *crtc) meta_kms_crtc_update_state_in_impl (MetaKmsCrtc *crtc)
{ {
MetaKmsImplDevice *impl_device; MetaKmsImplDevice *impl_device;
MetaKmsResourceChanges changes; MetaKmsResourceChanges changes;
@ -270,7 +270,7 @@ out:
} }
void void
meta_kms_crtc_disable (MetaKmsCrtc *crtc) meta_kms_crtc_disable_in_impl (MetaKmsCrtc *crtc)
{ {
crtc->current_state.is_active = FALSE; crtc->current_state.is_active = FALSE;
crtc->current_state.rect = (MetaRectangle) { 0 }; crtc->current_state.rect = (MetaRectangle) { 0 };
@ -279,8 +279,8 @@ meta_kms_crtc_disable (MetaKmsCrtc *crtc)
} }
void void
meta_kms_crtc_predict_state (MetaKmsCrtc *crtc, meta_kms_crtc_predict_state_in_impl (MetaKmsCrtc *crtc,
MetaKmsUpdate *update) MetaKmsUpdate *update)
{ {
GList *mode_sets; GList *mode_sets;
GList *crtc_gammas; GList *crtc_gammas;

View File

@ -426,9 +426,9 @@ update_connectors (MetaKmsImplDevice *impl_device,
if (updated_connector_id == 0 || if (updated_connector_id == 0 ||
meta_kms_connector_get_id (connector) == updated_connector_id) meta_kms_connector_get_id (connector) == updated_connector_id)
{ {
changes |= meta_kms_connector_update_state (connector, changes |= meta_kms_connector_update_state_in_impl (connector,
drm_resources, drm_resources,
drm_connector); drm_connector);
} }
} }
else else
@ -911,7 +911,7 @@ meta_kms_impl_device_update_states (MetaKmsImplDevice *impl_device,
meta_kms_crtc_get_id (crtc) != crtc_id) meta_kms_crtc_get_id (crtc) != crtc_id)
continue; continue;
changes |= meta_kms_crtc_update_state (crtc); changes |= meta_kms_crtc_update_state_in_impl (crtc);
} }
drmModeFreeResources (drm_resources); drmModeFreeResources (drm_resources);
@ -935,13 +935,15 @@ meta_kms_impl_device_predict_states (MetaKmsImplDevice *impl_device,
MetaKmsResourceChanges changes = META_KMS_RESOURCE_CHANGE_NONE; MetaKmsResourceChanges changes = META_KMS_RESOURCE_CHANGE_NONE;
GList *l; 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) for (l = priv->connectors; l; l = l->next)
{ {
MetaKmsConnector *connector = l->data; MetaKmsConnector *connector = l->data;
changes |= meta_kms_connector_predict_state (connector, update); changes |= meta_kms_connector_predict_state_in_impl (connector, update);
} }
return changes; return changes;
@ -1017,8 +1019,10 @@ meta_kms_impl_device_disable (MetaKmsImplDevice *impl_device)
meta_kms_impl_device_hold_fd (impl_device); meta_kms_impl_device_hold_fd (impl_device);
klass->disable (impl_device); klass->disable (impl_device);
g_list_foreach (priv->crtcs, (GFunc) meta_kms_crtc_disable, NULL); g_list_foreach (priv->crtcs,
g_list_foreach (priv->connectors, (GFunc) meta_kms_connector_disable, NULL); (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); meta_kms_impl_device_unhold_fd (impl_device);
} }