Lines Matching refs:encoder
71 struct drm_encoder *encoder; in drm_encoder_register_all() local
74 drm_for_each_encoder(encoder, dev) { in drm_encoder_register_all()
75 if (encoder->funcs->late_register) in drm_encoder_register_all()
76 ret = encoder->funcs->late_register(encoder); in drm_encoder_register_all()
86 struct drm_encoder *encoder; in drm_encoder_unregister_all() local
88 drm_for_each_encoder(encoder, dev) { in drm_encoder_unregister_all()
89 if (encoder->funcs->early_unregister) in drm_encoder_unregister_all()
90 encoder->funcs->early_unregister(encoder); in drm_encoder_unregister_all()
110 struct drm_encoder *encoder, in drm_encoder_init() argument
120 ret = drm_mode_object_add(dev, &encoder->base, DRM_MODE_OBJECT_ENCODER); in drm_encoder_init()
124 encoder->dev = dev; in drm_encoder_init()
125 encoder->encoder_type = encoder_type; in drm_encoder_init()
126 encoder->funcs = funcs; in drm_encoder_init()
131 encoder->name = kvasprintf(GFP_KERNEL, name, ap); in drm_encoder_init()
134 encoder->name = kasprintf(GFP_KERNEL, "%s-%d", in drm_encoder_init()
136 encoder->base.id); in drm_encoder_init()
138 if (!encoder->name) { in drm_encoder_init()
143 INIT_LIST_HEAD(&encoder->bridge_chain); in drm_encoder_init()
144 list_add_tail(&encoder->head, &dev->mode_config.encoder_list); in drm_encoder_init()
145 encoder->index = dev->mode_config.num_encoder++; in drm_encoder_init()
149 drm_mode_object_unregister(dev, &encoder->base); in drm_encoder_init()
161 void drm_encoder_cleanup(struct drm_encoder *encoder) in drm_encoder_cleanup() argument
163 struct drm_device *dev = encoder->dev; in drm_encoder_cleanup()
171 list_for_each_entry_safe(bridge, next, &encoder->bridge_chain, in drm_encoder_cleanup()
175 drm_mode_object_unregister(dev, &encoder->base); in drm_encoder_cleanup()
176 kfree(encoder->name); in drm_encoder_cleanup()
177 list_del(&encoder->head); in drm_encoder_cleanup()
180 memset(encoder, 0, sizeof(*encoder)); in drm_encoder_cleanup()
184 static struct drm_crtc *drm_encoder_get_crtc(struct drm_encoder *encoder) in drm_encoder_get_crtc() argument
187 struct drm_device *dev = encoder->dev; in drm_encoder_get_crtc()
200 if (connector->state->best_encoder != encoder) in drm_encoder_get_crtc()
212 return encoder->crtc; in drm_encoder_get_crtc()
219 struct drm_encoder *encoder; in drm_mode_getencoder() local
225 encoder = drm_encoder_find(dev, file_priv, enc_resp->encoder_id); in drm_mode_getencoder()
226 if (!encoder) in drm_mode_getencoder()
230 crtc = drm_encoder_get_crtc(encoder); in drm_mode_getencoder()
237 enc_resp->encoder_type = encoder->encoder_type; in drm_mode_getencoder()
238 enc_resp->encoder_id = encoder->base.id; in drm_mode_getencoder()
240 encoder->possible_crtcs); in drm_mode_getencoder()
241 enc_resp->possible_clones = encoder->possible_clones; in drm_mode_getencoder()