Lines Matching refs:encoder
75 static void nv04_tv_dpms(struct drm_encoder *encoder, int mode) in nv04_tv_dpms() argument
77 struct drm_device *dev = encoder->dev; in nv04_tv_dpms()
79 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder); in nv04_tv_dpms()
89 int head = nouveau_crtc(encoder->crtc)->index; in nv04_tv_dpms()
103 get_slave_funcs(encoder)->dpms(encoder, mode); in nv04_tv_dpms()
125 static void nv04_tv_prepare(struct drm_encoder *encoder) in nv04_tv_prepare() argument
127 struct drm_device *dev = encoder->dev; in nv04_tv_prepare()
128 int head = nouveau_crtc(encoder->crtc)->index; in nv04_tv_prepare()
129 const struct drm_encoder_helper_funcs *helper = encoder->helper_private; in nv04_tv_prepare()
131 helper->dpms(encoder, DRM_MODE_DPMS_OFF); in nv04_tv_prepare()
141 static void nv04_tv_mode_set(struct drm_encoder *encoder, in nv04_tv_mode_set() argument
145 struct drm_device *dev = encoder->dev; in nv04_tv_mode_set()
146 struct nouveau_crtc *nv_crtc = nouveau_crtc(encoder->crtc); in nv04_tv_mode_set()
162 get_slave_funcs(encoder)->mode_set(encoder, mode, adjusted_mode); in nv04_tv_mode_set()
165 static void nv04_tv_commit(struct drm_encoder *encoder) in nv04_tv_commit() argument
167 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder); in nv04_tv_commit()
168 struct drm_device *dev = encoder->dev; in nv04_tv_commit()
170 struct nouveau_crtc *nv_crtc = nouveau_crtc(encoder->crtc); in nv04_tv_commit()
171 const struct drm_encoder_helper_funcs *helper = encoder->helper_private; in nv04_tv_commit()
173 helper->dpms(encoder, DRM_MODE_DPMS_ON); in nv04_tv_commit()
180 static void nv04_tv_destroy(struct drm_encoder *encoder) in nv04_tv_destroy() argument
182 get_slave_funcs(encoder)->destroy(encoder); in nv04_tv_destroy()
183 drm_encoder_cleanup(encoder); in nv04_tv_destroy()
185 kfree(encoder->helper_private); in nv04_tv_destroy()
186 kfree(nouveau_encoder(encoder)); in nv04_tv_destroy()
206 struct drm_encoder *encoder; in nv04_tv_create() local
224 encoder = to_drm_encoder(nv_encoder); in nv04_tv_create()
226 drm_encoder_init(dev, encoder, &nv04_tv_funcs, DRM_MODE_ENCODER_TVDAC, in nv04_tv_create()
228 drm_encoder_helper_add(encoder, &nv04_tv_helper_funcs); in nv04_tv_create()
233 encoder->possible_crtcs = entry->heads; in nv04_tv_create()
234 encoder->possible_clones = 0; in nv04_tv_create()
239 ret = drm_i2c_encoder_init(dev, to_encoder_slave(encoder), in nv04_tv_create()
246 get_slave_funcs(encoder)->create_resources(encoder, connector); in nv04_tv_create()
247 drm_mode_connector_attach_encoder(connector, encoder); in nv04_tv_create()
252 drm_encoder_cleanup(encoder); in nv04_tv_create()