kms: Add debug logging about full resource change triggers
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4209>
This commit is contained in:
parent
3fde2f7100
commit
ba4cb3e021
@ -943,78 +943,144 @@ meta_kms_connector_state_changes (MetaKmsConnectorState *state,
|
||||
MetaKmsConnectorState *new_state)
|
||||
{
|
||||
if (state->current_crtc_id != new_state->current_crtc_id)
|
||||
{
|
||||
meta_topic (META_DEBUG_KMS, "current CRTC ID changed");
|
||||
return META_KMS_RESOURCE_CHANGE_FULL;
|
||||
}
|
||||
|
||||
if (state->common_possible_crtcs != new_state->common_possible_crtcs)
|
||||
{
|
||||
meta_topic (META_DEBUG_KMS, "common possible CRTCs changed");
|
||||
return META_KMS_RESOURCE_CHANGE_FULL;
|
||||
}
|
||||
|
||||
if (state->common_possible_clones != new_state->common_possible_clones)
|
||||
{
|
||||
meta_topic (META_DEBUG_KMS, "common possible clones changed");
|
||||
return META_KMS_RESOURCE_CHANGE_FULL;
|
||||
}
|
||||
|
||||
if (state->encoder_device_idxs != new_state->encoder_device_idxs)
|
||||
{
|
||||
meta_topic (META_DEBUG_KMS, "encoder device idxs changed");
|
||||
return META_KMS_RESOURCE_CHANGE_FULL;
|
||||
}
|
||||
|
||||
if (state->width_mm != new_state->width_mm)
|
||||
{
|
||||
meta_topic (META_DEBUG_KMS, "width_mm changed");
|
||||
return META_KMS_RESOURCE_CHANGE_FULL;
|
||||
}
|
||||
|
||||
if (state->height_mm != new_state->height_mm)
|
||||
{
|
||||
meta_topic (META_DEBUG_KMS, "height_mm changed");
|
||||
return META_KMS_RESOURCE_CHANGE_FULL;
|
||||
}
|
||||
|
||||
if (state->has_scaling != new_state->has_scaling)
|
||||
{
|
||||
meta_topic (META_DEBUG_KMS, "has_scaling changed");
|
||||
return META_KMS_RESOURCE_CHANGE_FULL;
|
||||
}
|
||||
|
||||
if (state->non_desktop != new_state->non_desktop)
|
||||
{
|
||||
meta_topic (META_DEBUG_KMS, "non_desktop changed");
|
||||
return META_KMS_RESOURCE_CHANGE_FULL;
|
||||
}
|
||||
|
||||
if (state->subpixel_order != new_state->subpixel_order)
|
||||
{
|
||||
meta_topic (META_DEBUG_KMS, "subpixel order changed");
|
||||
return META_KMS_RESOURCE_CHANGE_FULL;
|
||||
}
|
||||
|
||||
if (state->suggested_x != new_state->suggested_x)
|
||||
{
|
||||
meta_topic (META_DEBUG_KMS, "suggested_x changed");
|
||||
return META_KMS_RESOURCE_CHANGE_FULL;
|
||||
}
|
||||
|
||||
if (state->suggested_y != new_state->suggested_y)
|
||||
{
|
||||
meta_topic (META_DEBUG_KMS, "suggested_y changed");
|
||||
return META_KMS_RESOURCE_CHANGE_FULL;
|
||||
}
|
||||
|
||||
if (state->hotplug_mode_update != new_state->hotplug_mode_update)
|
||||
{
|
||||
meta_topic (META_DEBUG_KMS, "hotplug_mode_update changed");
|
||||
return META_KMS_RESOURCE_CHANGE_FULL;
|
||||
}
|
||||
|
||||
if (state->panel_orientation_transform !=
|
||||
new_state->panel_orientation_transform)
|
||||
{
|
||||
meta_topic (META_DEBUG_KMS, "panel orientation transform changed");
|
||||
return META_KMS_RESOURCE_CHANGE_FULL;
|
||||
}
|
||||
|
||||
if (!meta_tile_info_equal (&state->tile_info, &new_state->tile_info))
|
||||
{
|
||||
meta_topic (META_DEBUG_KMS, "tile info changed");
|
||||
return META_KMS_RESOURCE_CHANGE_FULL;
|
||||
}
|
||||
|
||||
if (!edid_equal (state->edid_data, new_state->edid_data))
|
||||
{
|
||||
meta_topic (META_DEBUG_KMS, "EDID changed");
|
||||
return META_KMS_RESOURCE_CHANGE_FULL;
|
||||
}
|
||||
|
||||
if (!kms_modes_equal (state->modes, new_state->modes))
|
||||
{
|
||||
meta_topic (META_DEBUG_KMS, "modes changed");
|
||||
return META_KMS_RESOURCE_CHANGE_FULL;
|
||||
}
|
||||
|
||||
if (state->max_bpc.supported != new_state->max_bpc.supported ||
|
||||
state->max_bpc.value != new_state->max_bpc.value ||
|
||||
state->max_bpc.min_value != new_state->max_bpc.min_value ||
|
||||
state->max_bpc.max_value != new_state->max_bpc.max_value)
|
||||
{
|
||||
meta_topic (META_DEBUG_KMS, "max_bpc changed");
|
||||
return META_KMS_RESOURCE_CHANGE_FULL;
|
||||
}
|
||||
|
||||
if (state->colorspace.value != new_state->colorspace.value ||
|
||||
state->colorspace.supported != new_state->colorspace.supported)
|
||||
{
|
||||
meta_topic (META_DEBUG_KMS, "colorspace changed");
|
||||
return META_KMS_RESOURCE_CHANGE_FULL;
|
||||
}
|
||||
|
||||
if (state->hdr.supported != new_state->hdr.supported ||
|
||||
state->hdr.unknown != new_state->hdr.unknown ||
|
||||
!meta_output_hdr_metadata_equal (&state->hdr.value, &new_state->hdr.value))
|
||||
{
|
||||
meta_topic (META_DEBUG_KMS, "HDR changed");
|
||||
return META_KMS_RESOURCE_CHANGE_FULL;
|
||||
}
|
||||
|
||||
if (state->broadcast_rgb.value != new_state->broadcast_rgb.value ||
|
||||
state->broadcast_rgb.supported != new_state->broadcast_rgb.supported)
|
||||
{
|
||||
meta_topic (META_DEBUG_KMS, "broadcast_rgb changed");
|
||||
return META_KMS_RESOURCE_CHANGE_FULL;
|
||||
}
|
||||
|
||||
if (state->vrr_capable != new_state->vrr_capable)
|
||||
{
|
||||
meta_topic (META_DEBUG_KMS, "vrr_capable changed");
|
||||
return META_KMS_RESOURCE_CHANGE_FULL;
|
||||
}
|
||||
|
||||
if (state->privacy_screen_state != new_state->privacy_screen_state)
|
||||
{
|
||||
meta_topic (META_DEBUG_KMS, "privacy screen state changed");
|
||||
return META_KMS_RESOURCE_CHANGE_PRIVACY_SCREEN;
|
||||
}
|
||||
|
||||
return META_KMS_RESOURCE_CHANGE_NONE;
|
||||
}
|
||||
@ -1065,6 +1131,9 @@ meta_kms_connector_read_state (MetaKmsConnector *connector,
|
||||
if (drm_connector->connection != connector->connection)
|
||||
{
|
||||
connector->connection = drm_connector->connection;
|
||||
meta_topic (META_DEBUG_KMS,
|
||||
"%s: connector status changed",
|
||||
__func__);
|
||||
changes |= META_KMS_RESOURCE_CHANGE_FULL;
|
||||
}
|
||||
|
||||
@ -1089,14 +1158,32 @@ meta_kms_connector_read_state (MetaKmsConnector *connector,
|
||||
if (drm_connector->connection != connector->connection)
|
||||
{
|
||||
connector->connection = drm_connector->connection;
|
||||
meta_topic (META_DEBUG_KMS,
|
||||
"%s: connector status changed",
|
||||
__func__);
|
||||
changes |= META_KMS_RESOURCE_CHANGE_FULL;
|
||||
}
|
||||
|
||||
if (!current_state)
|
||||
{
|
||||
meta_topic (META_DEBUG_KMS,
|
||||
"%s: no current connector state for reference",
|
||||
__func__);
|
||||
connector_changes = META_KMS_RESOURCE_CHANGE_FULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
connector_changes = meta_kms_connector_state_changes (current_state, state);
|
||||
|
||||
if (connector_changes & META_KMS_RESOURCE_CHANGE_FULL)
|
||||
{
|
||||
meta_topic (META_DEBUG_KMS,
|
||||
"%s: meta_kms_connector_state_changes triggered "
|
||||
"returned META_KMS_RESOURCE_CHANGE_FULL",
|
||||
__func__);
|
||||
}
|
||||
}
|
||||
|
||||
changes |= connector_changes;
|
||||
|
||||
if (!(changes & META_KMS_RESOURCE_CHANGE_FULL))
|
||||
|
@ -302,11 +302,24 @@ meta_kms_crtc_read_state (MetaKmsCrtc *crtc,
|
||||
if (!crtc_state.is_active)
|
||||
{
|
||||
if (crtc->current_state.is_active)
|
||||
{
|
||||
meta_topic (META_DEBUG_KMS,
|
||||
"%s: CRTC is_active disabled",
|
||||
__func__);
|
||||
changes |= META_KMS_RESOURCE_CHANGE_FULL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
changes = meta_kms_crtc_state_changes (&crtc->current_state, &crtc_state);
|
||||
|
||||
if (changes & META_KMS_RESOURCE_CHANGE_FULL)
|
||||
{
|
||||
meta_topic (META_DEBUG_KMS,
|
||||
"%s: meta_kms_crtc_state_changes returned "
|
||||
"META_KMS_RESOURCE_CHANGE_FULL",
|
||||
__func__);
|
||||
}
|
||||
}
|
||||
|
||||
g_clear_pointer (&crtc->current_state.gamma.value,
|
||||
@ -346,6 +359,9 @@ meta_kms_crtc_update_state_in_impl (MetaKmsCrtc *crtc)
|
||||
crtc->current_state.is_active = FALSE;
|
||||
crtc->current_state.rect = (MtkRectangle) { };
|
||||
crtc->current_state.is_drm_mode_valid = FALSE;
|
||||
meta_topic (META_DEBUG_KMS,
|
||||
"%s: drm_crtc=%p drm_props=%p",
|
||||
__func__, drm_crtc, drm_props);
|
||||
changes = META_KMS_RESOURCE_CHANGE_FULL;
|
||||
goto out;
|
||||
}
|
||||
|
@ -701,6 +701,18 @@ update_connectors (MetaKmsImplDevice *impl_device,
|
||||
g_list_length (connectors) == g_list_length (priv->connectors))
|
||||
return changes;
|
||||
|
||||
if (added_connector)
|
||||
{
|
||||
meta_topic (META_DEBUG_KMS, "%s: New connector(s) added", __func__);
|
||||
}
|
||||
else
|
||||
{
|
||||
meta_topic (META_DEBUG_KMS,
|
||||
"%s: Connectors list length changed from %d to %d",
|
||||
__func__, g_list_length (priv->connectors),
|
||||
g_list_length (connectors));
|
||||
}
|
||||
|
||||
g_list_free_full (priv->connectors, g_object_unref);
|
||||
priv->connectors = g_list_reverse (g_steal_pointer (&connectors));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user