Name

struct drm_crtc_state — mutable CRTC state

Synopsis

struct drm_crtc_state {
  struct drm_crtc * crtc;
  bool enable;
  bool active;
  bool planes_changed:1;
  bool mode_changed:1;
  bool active_changed:1;
  u32 plane_mask;
  u32 last_vblank_count;
  struct drm_display_mode adjusted_mode;
  struct drm_display_mode mode;
  struct drm_pending_vblank_event * event;
  struct drm_atomic_state * state;
};  

Members

crtc

backpointer to the CRTC

enable

whether the CRTC should be enabled, gates all other state

active

whether the CRTC is actively displaying (used for DPMS)

planes_changed

for use by helpers and drivers when computing state updates

mode_changed

for use by helpers and drivers when computing state updates

active_changed

for use by helpers and drivers when computing state updates

plane_mask

bitmask of (1 << drm_plane_index(plane)) of attached planes

last_vblank_count

for helpers and drivers to capture the vblank of the update to ensure framebuffer cleanup isn't done too early

adjusted_mode

for use by helpers and drivers to compute adjusted mode timings

mode

current mode timings

event

optional pointer to a DRM event to signal upon completion of the state update

state

backpointer to global drm_atomic_state

Description

Note that the distinction between enable and active is rather subtile: Flipping active while enable is set without changing anything else may never return in a failure from the ->atomic_check callback. Userspace assumes that a DPMS On will always succeed. In other words: enable controls resource assignment, active controls the actual hardware state.