Name

struct drm_crtc_funcs — control CRTCs for a given device

Synopsis

struct drm_crtc_funcs {
  void (* save) (struct drm_crtc *crtc);
  void (* restore) (struct drm_crtc *crtc);
  void (* reset) (struct drm_crtc *crtc);
  int (* cursor_set) (struct drm_crtc *crtc, struct drm_file *file_priv,uint32_t handle, uint32_t width, uint32_t height);
  int (* cursor_set2) (struct drm_crtc *crtc, struct drm_file *file_priv,uint32_t handle, uint32_t width, uint32_t height,int32_t hot_x, int32_t hot_y);
  int (* cursor_move) (struct drm_crtc *crtc, int x, int y);
  void (* gamma_set) (struct drm_crtc *crtc, u16 *r, u16 *g, u16 *b,uint32_t start, uint32_t size);
  void (* destroy) (struct drm_crtc *crtc);
  int (* set_config) (struct drm_mode_set *set);
  int (* page_flip) (struct drm_crtc *crtc,struct drm_framebuffer *fb,struct drm_pending_vblank_event *event,uint32_t flags);
  int (* set_property) (struct drm_crtc *crtc,struct drm_property *property, uint64_t val);
  struct drm_crtc_state *(* atomic_duplicate_state) (struct drm_crtc *crtc);
  void (* atomic_destroy_state) (struct drm_crtc *crtc,struct drm_crtc_state *state);
  int (* atomic_set_property) (struct drm_crtc *crtc,struct drm_crtc_state *state,struct drm_property *property,uint64_t val);
  int (* atomic_get_property) (struct drm_crtc *crtc,const struct drm_crtc_state *state,struct drm_property *property,uint64_t *val);
};  

Members

save

save CRTC state

restore

restore CRTC state

reset

reset CRTC after state has been invalidated (e.g. resume)

cursor_set

setup the cursor

cursor_set2

setup the cursor with hotspot, superseeds cursor_set if set

cursor_move

move the cursor

gamma_set

specify color ramp for CRTC

destroy

deinit and free object

set_config

apply a new CRTC configuration

page_flip

initiate a page flip

set_property

called when a property is changed

atomic_duplicate_state

duplicate the atomic state for this CRTC

atomic_destroy_state

destroy an atomic state for this CRTC

atomic_set_property

set a property on an atomic state for this CRTC (do not call directly, use drm_atomic_crtc_set_property)

atomic_get_property

get a property on an atomic state for this CRTC (do not call directly, use drm_atomic_crtc_get_property)

Description

The drm_crtc_funcs structure is the central CRTC management structure in the DRM. Each CRTC controls one or more connectors (note that the name CRTC is simply historical, a CRTC may control LVDS, VGA, DVI, TV out, etc. connectors, not just CRTs).

Each driver is responsible for filling out this structure at startup time, in addition to providing other modesetting features, like i2c and DDC bus accessors.