Lines Matching full:encoder
59 return nvkm_i2c_bus_probe(bus, "TV encoder", in nv04_tv_identify()
74 static void nv04_tv_dpms(struct drm_encoder *encoder, int mode) in nv04_tv_dpms() argument
76 struct drm_device *dev = encoder->dev; in nv04_tv_dpms()
78 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder); in nv04_tv_dpms()
82 NV_DEBUG(drm, "Setting dpms mode %d on TV encoder (output %d)\n", in nv04_tv_dpms()
88 int head = nouveau_crtc(encoder->crtc)->index; in nv04_tv_dpms()
102 get_slave_funcs(encoder)->dpms(encoder, mode); in nv04_tv_dpms()
124 static void nv04_tv_prepare(struct drm_encoder *encoder) in nv04_tv_prepare() argument
126 struct drm_device *dev = encoder->dev; in nv04_tv_prepare()
127 int head = nouveau_crtc(encoder->crtc)->index; in nv04_tv_prepare()
128 const struct drm_encoder_helper_funcs *helper = encoder->helper_private; in nv04_tv_prepare()
130 helper->dpms(encoder, DRM_MODE_DPMS_OFF); in nv04_tv_prepare()
140 static void nv04_tv_mode_set(struct drm_encoder *encoder, in nv04_tv_mode_set() argument
144 struct drm_device *dev = encoder->dev; in nv04_tv_mode_set()
145 struct nouveau_crtc *nv_crtc = nouveau_crtc(encoder->crtc); in nv04_tv_mode_set()
161 get_slave_funcs(encoder)->mode_set(encoder, mode, adjusted_mode); in nv04_tv_mode_set()
164 static void nv04_tv_commit(struct drm_encoder *encoder) in nv04_tv_commit() argument
166 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder); in nv04_tv_commit()
167 struct drm_device *dev = encoder->dev; in nv04_tv_commit()
169 struct nouveau_crtc *nv_crtc = nouveau_crtc(encoder->crtc); in nv04_tv_commit()
170 const struct drm_encoder_helper_funcs *helper = encoder->helper_private; in nv04_tv_commit()
172 helper->dpms(encoder, DRM_MODE_DPMS_ON); in nv04_tv_commit()
179 static void nv04_tv_destroy(struct drm_encoder *encoder) in nv04_tv_destroy() argument
181 get_slave_funcs(encoder)->destroy(encoder); in nv04_tv_destroy()
182 drm_encoder_cleanup(encoder); in nv04_tv_destroy()
184 kfree(encoder->helper_private); in nv04_tv_destroy()
185 kfree(nouveau_encoder(encoder)); in nv04_tv_destroy()
205 struct drm_encoder *encoder; in nv04_tv_create() local
212 /* Ensure that we can talk to this encoder */ in nv04_tv_create()
223 encoder = to_drm_encoder(nv_encoder); in nv04_tv_create()
225 drm_encoder_init(dev, encoder, &nv04_tv_funcs, DRM_MODE_ENCODER_TVDAC, in nv04_tv_create()
227 drm_encoder_helper_add(encoder, &nv04_tv_helper_funcs); in nv04_tv_create()
232 encoder->possible_crtcs = entry->heads; in nv04_tv_create()
233 encoder->possible_clones = 0; in nv04_tv_create()
238 ret = drm_i2c_encoder_init(dev, to_encoder_slave(encoder), in nv04_tv_create()
245 get_slave_funcs(encoder)->create_resources(encoder, connector); in nv04_tv_create()
246 drm_connector_attach_encoder(connector, encoder); in nv04_tv_create()
251 drm_encoder_cleanup(encoder); in nv04_tv_create()