Lines Matching full:encoder
36 * struct drm_encoder_funcs - encoder controls
44 * Reset encoder hardware and software state to off. This function isn't
48 void (*reset)(struct drm_encoder *encoder);
53 * Clean up encoder resources. This is only called at driver unload time
54 * through drm_mode_config_cleanup() since an encoder cannot be
57 void (*destroy)(struct drm_encoder *encoder);
63 * interfaces attached to the encoder.
72 int (*late_register)(struct drm_encoder *encoder);
78 * userspace interfaces attached to the encoder from
83 void (*early_unregister)(struct drm_encoder *encoder);
88 * Allows encoders to create encoder-specific debugfs files.
90 void (*debugfs_init)(struct drm_encoder *encoder, struct dentry *root);
94 * struct drm_encoder - central DRM encoder structure
115 * encoder types are defined thus far:
135 * mutliple DP MST streams to share one physical encoder.
141 * index. It is invariant over the lifetime of the encoder.
148 * the bits for all &drm_crtc objects this encoder can be connected to
162 * &drm_crtc together with this encoder before calling
164 * encoder itself, too. Cloning bits should be set such that when two
170 * automagically fix this up by setting the bit for the encoder itself.
174 * Note that since encoder objects can't be hotplugged the assigned indices
187 * @bridge_chain: Bridges attached to this encoder. Drivers shall not
207 struct drm_encoder *encoder,
213 struct drm_encoder *encoder,
225 * drmm_encoder_alloc - Allocate and initialize an encoder
229 * @funcs: callbacks for this encoder (optional)
230 * @encoder_type: user visible type of the encoder
231 * @name: printf style format string for the encoder name, or NULL for default name
233 * Allocates and initializes an encoder. Encoder should be subclassed as part of
234 * driver encoder objects. Cleanup is automatically handled through registering
240 * Pointer to new encoder, or ERR_PTR on failure.
248 * drmm_plain_encoder_alloc - Allocate and initialize an encoder
250 * @funcs: callbacks for this encoder (optional)
251 * @encoder_type: user visible type of the encoder
252 * @name: printf style format string for the encoder name, or NULL for default name
266 * drm_encoder_index - find the index of a registered encoder
267 * @encoder: encoder to find index for
269 * Given a registered encoder, return the index of that encoder within a DRM
272 static inline unsigned int drm_encoder_index(const struct drm_encoder *encoder) in drm_encoder_index() argument
274 return encoder->index; in drm_encoder_index()
278 * drm_encoder_mask - find the mask of a registered encoder
279 * @encoder: encoder to find mask for
281 * Given a registered encoder, return the mask bit of that encoder for an
282 * encoder's possible_clones field.
284 static inline u32 drm_encoder_mask(const struct drm_encoder *encoder) in drm_encoder_mask() argument
286 return 1 << drm_encoder_index(encoder); in drm_encoder_mask()
290 * drm_encoder_crtc_ok - can a given crtc drive a given encoder?
291 * @encoder: encoder to test
294 * Returns false if @encoder can't be driven by @crtc, true otherwise.
296 static inline bool drm_encoder_crtc_ok(struct drm_encoder *encoder, in drm_encoder_crtc_ok() argument
299 return !!(encoder->possible_crtcs & drm_crtc_mask(crtc)); in drm_encoder_crtc_ok()
306 * @id: encoder id
308 * Returns the encoder with @id, NULL if it doesn't exist. Simple wrapper around
322 void drm_encoder_cleanup(struct drm_encoder *encoder);
326 * @encoder: the loop cursor
328 * @encoder_mask: bitmask of encoder indices
332 #define drm_for_each_encoder_mask(encoder, dev, encoder_mask) \ argument
333 list_for_each_entry((encoder), &(dev)->mode_config.encoder_list, head) \
334 for_each_if ((encoder_mask) & drm_encoder_mask(encoder))
338 * @encoder: the loop cursor
343 #define drm_for_each_encoder(encoder, dev) \ argument
344 list_for_each_entry(encoder, &(dev)->mode_config.encoder_list, head)