Lines Matching refs:state
47 * write new state into hardware ----> ...
49 * switch to new state on next
61 * clean up atomic state
65 * and modeset state change.
162 struct drm_plane_state *state, *old_state, *new_state;
167 struct drm_crtc_state *state, *old_state, *new_state;
185 struct drm_connector_state *state, *old_state, *new_state;
200 * struct drm_private_state_funcs - atomic state functions for private objects
213 * Duplicate the current state of the private object and return it. It
214 * is an error to call this before obj->state has been initialized.
218 * Duplicated atomic state or NULL when obj->state is not
226 * Frees the private object state created with @atomic_duplicate_state.
229 struct drm_private_state *state);
235 * this optional hook for printing additional driver specific state.
241 const struct drm_private_state *state);
251 * Currently only tracks the state update functions and the opaque driver
252 * private state itself, but in the future might also track which
253 * &drm_modeset_lock is required to duplicate and update this object's state.
266 * If that private object is used to store a state shared by multiple
274 * &drm_private_obj its old state, and will be in charge of freeing it whenever
278 * &drm_private_obj the new state and will be likely to access it, resulting in
280 * to) the &drm_crtc_commit structure in our private state in
294 * @lock: Modeset lock to protect the state object.
299 * @state: Current atomic state for this driver private object.
301 struct drm_private_state *state;
306 * Functions to manipulate the state of this driver private object, see
325 * struct drm_private_state - base struct for driver private object state
333 * @state: backpointer to global drm_atomic_state
335 struct drm_atomic_state *state;
345 struct drm_private_state *state, *old_state, *new_state;
349 * struct drm_atomic_state - the global state object for atomic updates
350 * @ref: count of all references to this state (will not be freed until zero)
359 * @acquire_ctx: acquire context for this atomic modeset state update
363 * private state structures, drm_atomic_get_private_obj_state().
395 * Indicates whether or not this atomic state was duplicated using
464 void drm_atomic_state_clear(struct drm_atomic_state *state);
467 * drm_atomic_state_get - acquire a reference to the atomic state
468 * @state: The atomic state
470 * Returns a new reference to the @state
473 drm_atomic_state_get(struct drm_atomic_state *state)
475 kref_get(&state->ref);
476 return state;
482 * drm_atomic_state_put - release a reference to the atomic state
483 * @state: The atomic state
485 * This releases a reference to @state which is freed after removing the
488 static inline void drm_atomic_state_put(struct drm_atomic_state *state)
490 kref_put(&state->ref, __drm_atomic_state_free);
494 drm_atomic_state_init(struct drm_device *dev, struct drm_atomic_state *state);
495 void drm_atomic_state_default_clear(struct drm_atomic_state *state);
496 void drm_atomic_state_default_release(struct drm_atomic_state *state);
499 drm_atomic_get_crtc_state(struct drm_atomic_state *state,
502 drm_atomic_get_plane_state(struct drm_atomic_state *state,
505 drm_atomic_get_connector_state(struct drm_atomic_state *state,
510 struct drm_private_state *state,
515 drm_atomic_get_private_obj_state(struct drm_atomic_state *state,
518 drm_atomic_get_old_private_obj_state(const struct drm_atomic_state *state,
521 drm_atomic_get_new_private_obj_state(const struct drm_atomic_state *state,
525 drm_atomic_get_old_connector_for_encoder(const struct drm_atomic_state *state,
528 drm_atomic_get_new_connector_for_encoder(const struct drm_atomic_state *state,
532 drm_atomic_get_old_crtc_for_encoder(struct drm_atomic_state *state,
535 drm_atomic_get_new_crtc_for_encoder(struct drm_atomic_state *state,
539 * drm_atomic_get_existing_crtc_state - get CRTC state, if it exists
540 * @state: global atomic state object
543 * This function returns the CRTC state for the given CRTC, or NULL
544 * if the CRTC is not part of the global atomic state.
550 drm_atomic_get_existing_crtc_state(const struct drm_atomic_state *state,
553 return state->crtcs[drm_crtc_index(crtc)].state;
557 * drm_atomic_get_old_crtc_state - get old CRTC state, if it exists
558 * @state: global atomic state object
561 * This function returns the old CRTC state for the given CRTC, or
562 * NULL if the CRTC is not part of the global atomic state.
565 drm_atomic_get_old_crtc_state(const struct drm_atomic_state *state,
568 return state->crtcs[drm_crtc_index(crtc)].old_state;
571 * drm_atomic_get_new_crtc_state - get new CRTC state, if it exists
572 * @state: global atomic state object
575 * This function returns the new CRTC state for the given CRTC, or
576 * NULL if the CRTC is not part of the global atomic state.
579 drm_atomic_get_new_crtc_state(const struct drm_atomic_state *state,
582 return state->crtcs[drm_crtc_index(crtc)].new_state;
586 * drm_atomic_get_existing_plane_state - get plane state, if it exists
587 * @state: global atomic state object
590 * This function returns the plane state for the given plane, or NULL
591 * if the plane is not part of the global atomic state.
597 drm_atomic_get_existing_plane_state(const struct drm_atomic_state *state,
600 return state->planes[drm_plane_index(plane)].state;
604 * drm_atomic_get_old_plane_state - get plane state, if it exists
605 * @state: global atomic state object
608 * This function returns the old plane state for the given plane, or
609 * NULL if the plane is not part of the global atomic state.
612 drm_atomic_get_old_plane_state(const struct drm_atomic_state *state,
615 return state->planes[drm_plane_index(plane)].old_state;
619 * drm_atomic_get_new_plane_state - get plane state, if it exists
620 * @state: global atomic state object
623 * This function returns the new plane state for the given plane, or
624 * NULL if the plane is not part of the global atomic state.
627 drm_atomic_get_new_plane_state(const struct drm_atomic_state *state,
630 return state->planes[drm_plane_index(plane)].new_state;
634 * drm_atomic_get_existing_connector_state - get connector state, if it exists
635 * @state: global atomic state object
638 * This function returns the connector state for the given connector,
639 * or NULL if the connector is not part of the global atomic state.
645 drm_atomic_get_existing_connector_state(const struct drm_atomic_state *state,
650 if (index >= state->num_connector)
653 return state->connectors[index].state;
657 * drm_atomic_get_old_connector_state - get connector state, if it exists
658 * @state: global atomic state object
661 * This function returns the old connector state for the given connector,
662 * or NULL if the connector is not part of the global atomic state.
665 drm_atomic_get_old_connector_state(const struct drm_atomic_state *state,
670 if (index >= state->num_connector)
673 return state->connectors[index].old_state;
677 * drm_atomic_get_new_connector_state - get connector state, if it exists
678 * @state: global atomic state object
681 * This function returns the new connector state for the given connector,
682 * or NULL if the connector is not part of the global atomic state.
685 drm_atomic_get_new_connector_state(const struct drm_atomic_state *state,
690 if (index >= state->num_connector)
693 return state->connectors[index].new_state;
697 * __drm_atomic_get_current_plane_state - get current plane state
698 * @state: global atomic state object
701 * This function returns the plane state for the given plane, either from
702 * @state, or if the plane isn't part of the atomic state update, from @plane.
704 * not change, state of other planes, since it avoids threading an error code
710 * required locking for access state structures. Drivers must ensure that it is
711 * safe to access the returned state structure through other means. One common
720 * Read-only pointer to the current plane state.
723 __drm_atomic_get_current_plane_state(const struct drm_atomic_state *state,
726 if (state->planes[drm_plane_index(plane)].state)
727 return state->planes[drm_plane_index(plane)].state;
729 return plane->state;
733 drm_atomic_add_encoder_bridges(struct drm_atomic_state *state,
736 drm_atomic_add_affected_connectors(struct drm_atomic_state *state,
739 drm_atomic_add_affected_planes(struct drm_atomic_state *state,
742 int __must_check drm_atomic_check_only(struct drm_atomic_state *state);
743 int __must_check drm_atomic_commit(struct drm_atomic_state *state);
744 int __must_check drm_atomic_nonblocking_commit(struct drm_atomic_state *state);
753 * old state
755 * new state
759 * new state. This is useful in places where the state delta needs to be
777 * old state
781 * state. This is useful in disable functions, where we need the old state the
798 * new state
802 * state. This is useful in enable functions, where we need the new state the
819 * @old_crtc_state: &struct drm_crtc_state iteration cursor for the old state
820 * @new_crtc_state: &struct drm_crtc_state iteration cursor for the new state
824 * new state. This is useful in places where the state delta needs to be
843 * @old_crtc_state: &struct drm_crtc_state iteration cursor for the old state
847 * state. This is useful in disable functions, where we need the old state the
863 * @new_crtc_state: &struct drm_crtc_state iteration cursor for the new state
867 * state. This is useful in enable functions, where we need the new state the
884 * @old_plane_state: &struct drm_plane_state iteration cursor for the old state
885 * @new_plane_state: &struct drm_plane_state iteration cursor for the new state
889 * new state. This is useful in places where the state delta needs to be
907 * @old_plane_state: &struct drm_plane_state iteration cursor for the old state
908 * @new_plane_state: &struct drm_plane_state iteration cursor for the new state
912 * tracking both old and new state. This is useful in places where the
913 * state delta needs to be considered, for example in atomic check functions.
925 * for_each_new_plane_in_state_reverse - other than only tracking new state,
929 * @new_plane_state: &struct drm_plane_state iteration cursor for the new state
944 * @old_plane_state: &struct drm_plane_state iteration cursor for the old state
948 * state. This is useful in disable functions, where we need the old state the
962 * @new_plane_state: &struct drm_plane_state iteration cursor for the new state
966 * state. This is useful in enable functions, where we need the new state the
983 * @old_obj_state: &struct drm_private_state iteration cursor for the old state
984 * @new_obj_state: &struct drm_private_state iteration cursor for the new state
988 * old and new state. This is useful in places where the state delta needs
1003 * @old_obj_state: &struct drm_private_state iteration cursor for the old state
1007 * the old state. This is useful in disable functions, where we need the old
1008 * state the hardware is still in.
1021 * @new_obj_state: &struct drm_private_state iteration cursor for the new state
1025 * the new state. This is useful in enable functions, where we need the new state the
1038 * @state: &drm_crtc_state for the CRTC
1041 * whether the state CRTC changed enough to need a full modeset cycle:
1043 * combines these three to compute the overall need for a modeset for @state.
1056 drm_atomic_crtc_needs_modeset(const struct drm_crtc_state *state)
1058 return state->mode_changed || state->active_changed ||
1059 state->connectors_changed;
1064 * @state: &drm_crtc_state for the CRTC
1072 drm_atomic_crtc_effectively_active(const struct drm_crtc_state *state)
1074 return state->active || state->self_refresh_active;
1110 * struct drm_bridge_state - Atomic bridge state object
1119 * @bridge: the bridge this state refers to
1141 drm_atomic_get_bridge_state(struct drm_atomic_state *state,
1144 drm_atomic_get_old_bridge_state(const struct drm_atomic_state *state,
1147 drm_atomic_get_new_bridge_state(const struct drm_atomic_state *state,