Lines Matching +full:dpi +full:- +full:to +full:- +full:lvds

4  * Permission to use, copy, modify, distribute, and sell this software and its
9 * publicity pertaining to distribution of the software without specific,
14 * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
41 * pixel data from a CRTC and converts it to a format suitable for any attached
42 * connector. Encoders are objects exposed to userspace, originally to allow
43 * userspace to infer cloning and connector/CRTC restrictions. Unfortunately
46 * the recommended way to infer restrictions is by using the
51 * free to use them however they wish. Modeset helper libraries make strong use
52 * of encoders to facilitate code sharing. But for more complex settings it is
53 * usually better to move shared code into a separate &drm_bridge. Compared to
55 * abstraction since they are not exposed to userspace at all.
64 { DRM_MODE_ENCODER_LVDS, "LVDS" },
69 { DRM_MODE_ENCODER_DPI, "DPI" },
80 if (encoder->funcs && encoder->funcs->late_register) in drm_encoder_register_all()
81 ret = encoder->funcs->late_register(encoder); in drm_encoder_register_all()
94 if (encoder->funcs && encoder->funcs->early_unregister) in drm_encoder_unregister_all()
95 encoder->funcs->early_unregister(encoder); in drm_encoder_unregister_all()
109 if (WARN_ON(dev->mode_config.num_encoder >= 32)) in __drm_encoder_init()
110 return -EINVAL; in __drm_encoder_init()
112 ret = drm_mode_object_add(dev, &encoder->base, DRM_MODE_OBJECT_ENCODER); in __drm_encoder_init()
116 encoder->dev = dev; in __drm_encoder_init()
117 encoder->encoder_type = encoder_type; in __drm_encoder_init()
118 encoder->funcs = funcs; in __drm_encoder_init()
120 encoder->name = kvasprintf(GFP_KERNEL, name, ap); in __drm_encoder_init()
122 encoder->name = kasprintf(GFP_KERNEL, "%s-%d", in __drm_encoder_init()
124 encoder->base.id); in __drm_encoder_init()
126 if (!encoder->name) { in __drm_encoder_init()
127 ret = -ENOMEM; in __drm_encoder_init()
131 INIT_LIST_HEAD(&encoder->bridge_chain); in __drm_encoder_init()
132 list_add_tail(&encoder->head, &dev->mode_config.encoder_list); in __drm_encoder_init()
133 encoder->index = dev->mode_config.num_encoder++; in __drm_encoder_init()
137 drm_mode_object_unregister(dev, &encoder->base); in __drm_encoder_init()
143 * drm_encoder_init - Init a preallocated encoder
145 * @encoder: the encoder to init
157 * instead of drm_encoder_init() to let the DRM managed resource
171 WARN_ON(!funcs->destroy); in drm_encoder_init()
182 * drm_encoder_cleanup - cleans up an initialised encoder
183 * @encoder: encoder to cleanup
189 struct drm_device *dev = encoder->dev; in drm_encoder_cleanup()
192 /* Note that the encoder_list is considered to be static; should we in drm_encoder_cleanup()
193 * remove the drm_encoder at runtime we would have to decrement all in drm_encoder_cleanup()
197 list_for_each_entry_safe(bridge, next, &encoder->bridge_chain, in drm_encoder_cleanup()
201 drm_mode_object_unregister(dev, &encoder->base); in drm_encoder_cleanup()
202 kfree(encoder->name); in drm_encoder_cleanup()
203 list_del(&encoder->head); in drm_encoder_cleanup()
204 dev->mode_config.num_encoder--; in drm_encoder_cleanup()
214 if (WARN_ON(!encoder->dev)) in drmm_encoder_alloc_release()
230 if (drm_WARN_ON(dev, funcs && funcs->destroy)) in __drmm_encoder_init()
231 return -EINVAL; in __drmm_encoder_init()
255 return ERR_PTR(-ENOMEM); in __drmm_encoder_alloc()
270 * drmm_encoder_init - Initialize a preallocated encoder
272 * @encoder: the encoder to init
307 struct drm_device *dev = encoder->dev; in drm_encoder_get_crtc()
315 if (!connector->state) in drm_encoder_get_crtc()
320 if (connector->state->best_encoder != encoder) in drm_encoder_get_crtc()
324 return connector->state->crtc; in drm_encoder_get_crtc()
332 return encoder->crtc; in drm_encoder_get_crtc()
343 return -EOPNOTSUPP; in drm_mode_getencoder()
345 encoder = drm_encoder_find(dev, file_priv, enc_resp->encoder_id); in drm_mode_getencoder()
347 return -ENOENT; in drm_mode_getencoder()
349 drm_modeset_lock(&dev->mode_config.connection_mutex, NULL); in drm_mode_getencoder()
351 if (crtc && drm_lease_held(file_priv, crtc->base.id)) in drm_mode_getencoder()
352 enc_resp->crtc_id = crtc->base.id; in drm_mode_getencoder()
354 enc_resp->crtc_id = 0; in drm_mode_getencoder()
355 drm_modeset_unlock(&dev->mode_config.connection_mutex); in drm_mode_getencoder()
357 enc_resp->encoder_type = encoder->encoder_type; in drm_mode_getencoder()
358 enc_resp->encoder_id = encoder->base.id; in drm_mode_getencoder()
359 enc_resp->possible_crtcs = drm_lease_filter_crtcs(file_priv, in drm_mode_getencoder()
360 encoder->possible_crtcs); in drm_mode_getencoder()
361 enc_resp->possible_clones = encoder->possible_clones; in drm_mode_getencoder()