hc
2024-01-31 f9004dbfff8a3fbbd7e2a88c8a4327c7f2f8e5b2
kernel/include/drm/drm_encoder.h
....@@ -28,6 +28,7 @@
2828 #include <drm/drm_crtc.h>
2929 #include <drm/drm_mode.h>
3030 #include <drm/drm_mode_object.h>
31
+#include <drm/drm_util.h>
3132
3233 struct drm_encoder;
3334
....@@ -139,9 +140,9 @@
139140 * @possible_crtcs: Bitmask of potential CRTC bindings, using
140141 * drm_crtc_index() as the index into the bitfield. The driver must set
141142 * the bits for all &drm_crtc objects this encoder can be connected to
142
- * before calling drm_encoder_init().
143
+ * before calling drm_dev_register().
143144 *
144
- * In reality almost every driver gets this wrong.
145
+ * You will get a WARN if you get this wrong in the driver.
145146 *
146147 * Note that since CRTC objects can't be hotplugged the assigned indices
147148 * are stable and hence known before registering all objects.
....@@ -153,12 +154,16 @@
153154 * using drm_encoder_index() as the index into the bitfield. The driver
154155 * must set the bits for all &drm_encoder objects which can clone a
155156 * &drm_crtc together with this encoder before calling
156
- * drm_encoder_init(). Drivers should set the bit representing the
157
+ * drm_dev_register(). Drivers should set the bit representing the
157158 * encoder itself, too. Cloning bits should be set such that when two
158159 * encoders can be used in a cloned configuration, they both should have
159160 * each another bits set.
160161 *
161
- * In reality almost every driver gets this wrong.
162
+ * As an exception to the above rule if the driver doesn't implement
163
+ * any cloning it can leave @possible_clones set to 0. The core will
164
+ * automagically fix this up by setting the bit for the encoder itself.
165
+ *
166
+ * You will get a WARN if you get this wrong in the driver.
162167 *
163168 * Note that since encoder objects can't be hotplugged the assigned indices
164169 * are stable and hence known before registering all objects.
....@@ -166,17 +171,18 @@
166171 uint32_t possible_clones;
167172
168173 /**
169
- * @loader_protect:
170
- * encoder loader logo protect state.
171
- */
172
- bool loader_protect;
173
- /**
174174 * @crtc: Currently bound CRTC, only really meaningful for non-atomic
175175 * drivers. Atomic drivers should instead check
176176 * &drm_connector_state.crtc.
177177 */
178178 struct drm_crtc *crtc;
179
- struct drm_bridge *bridge;
179
+
180
+ /**
181
+ * @bridge_chain: Bridges attached to this encoder. Drivers shall not
182
+ * access this field directly.
183
+ */
184
+ struct list_head bridge_chain;
185
+
180186 const struct drm_encoder_funcs *funcs;
181187 const struct drm_encoder_helper_funcs *helper_private;
182188 };
....@@ -202,7 +208,7 @@
202208 }
203209
204210 /**
205
- * drm_encoder_mask - find the mask of a registered ENCODER
211
+ * drm_encoder_mask - find the mask of a registered encoder
206212 * @encoder: encoder to find mask for
207213 *
208214 * Given a registered encoder, return the mask bit of that encoder for an