Name

struct drm_encoder_helper_funcs — helper operations for encoders

Synopsis

struct drm_encoder_helper_funcs {
  void (* dpms) (struct drm_encoder *encoder, int mode);
  void (* save) (struct drm_encoder *encoder);
  void (* restore) (struct drm_encoder *encoder);
  bool (* mode_fixup) (struct drm_encoder *encoder,const struct drm_display_mode *mode,struct drm_display_mode *adjusted_mode);
  void (* prepare) (struct drm_encoder *encoder);
  void (* commit) (struct drm_encoder *encoder);
  void (* mode_set) (struct drm_encoder *encoder,struct drm_display_mode *mode,struct drm_display_mode *adjusted_mode);
  struct drm_crtc *(* get_crtc) (struct drm_encoder *encoder);
  enum drm_connector_status (* detect) (struct drm_encoder *encoder,struct drm_connector *connector);
  void (* disable) (struct drm_encoder *encoder);
  void (* enable) (struct drm_encoder *encoder);
  int (* atomic_check) (struct drm_encoder *encoder,struct drm_crtc_state *crtc_state,struct drm_connector_state *conn_state);
};  

Members

dpms

set power state

save

save connector state

restore

restore connector state

mode_fixup

try to fixup proposed mode for this connector

prepare

part of the disable sequence, called before the CRTC modeset

commit

called after the CRTC modeset

mode_set

set this mode, optional for atomic helpers

get_crtc

return CRTC that the encoder is currently attached to

detect

connection status detection

disable

disable encoder when not in use (overrides DPMS off)

enable

enable encoder

atomic_check

check for validity of an atomic update

Description

The helper operations are called by the mid-layer CRTC helper.

Note that with atomic helpers dpms, prepare and commit hooks are deprecated. Used enable and disable instead exclusively.

With legacy crtc helpers there's a big semantic difference between disable

and the other hooks

disable also needs to release any resources acquired in mode_set (like shared PLLs).