/** * DOC: atomic modeset support * * The functions here implement the state management and hardware programming * dispatch required by the atomic modeset infrastructure. * See intel_plane.c for the plane-specific atomic functionality.
*/
/** * intel_digital_connector_atomic_get_property - hook for connector->atomic_get_property. * @connector: Connector to get the property for. * @state: Connector state to retrieve the property from. * @property: Property to retrieve. * @val: Return value for the property. * * Returns the atomic property value for a digital connector.
*/ int intel_digital_connector_atomic_get_property(struct drm_connector *connector, conststruct drm_connector_state *state, struct drm_property *property,
u64 *val)
{ struct intel_display *display = to_intel_display(connector->dev); conststruct intel_digital_connector_state *intel_conn_state =
to_intel_digital_connector_state(state);
/** * intel_digital_connector_atomic_set_property - hook for connector->atomic_set_property. * @connector: Connector to set the property for. * @state: Connector state to set the property on. * @property: Property to set. * @val: New value for the property. * * Sets the atomic property value for a digital connector.
*/ int intel_digital_connector_atomic_set_property(struct drm_connector *connector, struct drm_connector_state *state, struct drm_property *property,
u64 val)
{ struct intel_display *display = to_intel_display(connector->dev); struct intel_digital_connector_state *intel_conn_state =
to_intel_digital_connector_state(state);
/* * These properties are handled by fastset, and might not end * up in a modeset.
*/ if (new_conn_state->force_audio != old_conn_state->force_audio ||
new_conn_state->broadcast_rgb != old_conn_state->broadcast_rgb ||
new_conn_state->base.colorspace != old_conn_state->base.colorspace ||
new_conn_state->base.picture_aspect_ratio != old_conn_state->base.picture_aspect_ratio ||
new_conn_state->base.content_type != old_conn_state->base.content_type ||
new_conn_state->base.scaling_mode != old_conn_state->base.scaling_mode ||
new_conn_state->base.privacy_screen_sw_state != old_conn_state->base.privacy_screen_sw_state ||
!drm_connector_atomic_hdr_metadata_equal(old_state, new_state))
crtc_state->mode_changed = true;
return 0;
}
/** * intel_digital_connector_duplicate_state - duplicate connector state * @connector: digital connector * * Allocates and returns a copy of the connector state (both common and * digital connector specific) for the specified connector. * * Returns: The newly allocated connector state, or NULL on failure.
*/ struct drm_connector_state *
intel_digital_connector_duplicate_state(struct drm_connector *connector)
{ struct intel_digital_connector_state *state;
state = kmemdup(connector->state, sizeof(*state), GFP_KERNEL); if (!state) return NULL;
/** * intel_any_crtc_needs_modeset - check if any CRTC needs a modeset * @state: the atomic state corresponding to this modeset * * Returns true if any CRTC in @state needs a modeset.
*/ bool intel_any_crtc_needs_modeset(struct intel_atomic_state *state)
{ struct intel_crtc *crtc; struct intel_crtc_state *crtc_state; int i;
for_each_new_intel_crtc_in_state(state, crtc, crtc_state, i) { if (intel_crtc_needs_modeset(crtc_state)) returntrue;
}
/** * intel_crtc_duplicate_state - duplicate crtc state * @crtc: drm crtc * * Allocates and returns a copy of the crtc state (both common and * Intel-specific) for the specified crtc. * * Returns: The newly allocated crtc state, or NULL on failure.
*/ struct drm_crtc_state *
intel_crtc_duplicate_state(struct drm_crtc *crtc)
{ conststruct intel_crtc_state *old_crtc_state = to_intel_crtc_state(crtc->state); struct intel_crtc_state *crtc_state;
crtc_state = kmemdup(old_crtc_state, sizeof(*crtc_state), GFP_KERNEL); if (!crtc_state) return NULL;
/* copy color blobs */ if (crtc_state->hw.degamma_lut)
drm_property_blob_get(crtc_state->hw.degamma_lut); if (crtc_state->hw.ctm)
drm_property_blob_get(crtc_state->hw.ctm); if (crtc_state->hw.gamma_lut)
drm_property_blob_get(crtc_state->hw.gamma_lut);
if (crtc_state->pre_csc_lut)
drm_property_blob_get(crtc_state->pre_csc_lut); if (crtc_state->post_csc_lut)
drm_property_blob_get(crtc_state->post_csc_lut);
if (crtc_state->dp_tunnel_ref.tunnel)
drm_dp_tunnel_ref_get(crtc_state->dp_tunnel_ref.tunnel,
&crtc_state->dp_tunnel_ref);
/** * intel_crtc_destroy_state - destroy crtc state * @crtc: drm crtc * @state: the state to destroy * * Destroys the crtc state (both common and Intel-specific) for the * specified crtc.
*/ void
intel_crtc_destroy_state(struct drm_crtc *crtc, struct drm_crtc_state *state)
{ struct intel_crtc_state *crtc_state = to_intel_crtc_state(state);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.