.. | .. |
---|
28 | 28 | #include <drm/drm_crtc.h> |
---|
29 | 29 | #include <drm/drm_mode.h> |
---|
30 | 30 | #include <drm/drm_mode_object.h> |
---|
| 31 | +#include <drm/drm_util.h> |
---|
31 | 32 | |
---|
32 | 33 | struct drm_encoder; |
---|
33 | 34 | |
---|
.. | .. |
---|
139 | 140 | * @possible_crtcs: Bitmask of potential CRTC bindings, using |
---|
140 | 141 | * drm_crtc_index() as the index into the bitfield. The driver must set |
---|
141 | 142 | * 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(). |
---|
143 | 144 | * |
---|
144 | | - * In reality almost every driver gets this wrong. |
---|
| 145 | + * You will get a WARN if you get this wrong in the driver. |
---|
145 | 146 | * |
---|
146 | 147 | * Note that since CRTC objects can't be hotplugged the assigned indices |
---|
147 | 148 | * are stable and hence known before registering all objects. |
---|
.. | .. |
---|
153 | 154 | * using drm_encoder_index() as the index into the bitfield. The driver |
---|
154 | 155 | * must set the bits for all &drm_encoder objects which can clone a |
---|
155 | 156 | * &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 |
---|
157 | 158 | * encoder itself, too. Cloning bits should be set such that when two |
---|
158 | 159 | * encoders can be used in a cloned configuration, they both should have |
---|
159 | 160 | * each another bits set. |
---|
160 | 161 | * |
---|
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. |
---|
162 | 167 | * |
---|
163 | 168 | * Note that since encoder objects can't be hotplugged the assigned indices |
---|
164 | 169 | * are stable and hence known before registering all objects. |
---|
.. | .. |
---|
166 | 171 | uint32_t possible_clones; |
---|
167 | 172 | |
---|
168 | 173 | /** |
---|
169 | | - * @loader_protect: |
---|
170 | | - * encoder loader logo protect state. |
---|
171 | | - */ |
---|
172 | | - bool loader_protect; |
---|
173 | | - /** |
---|
174 | 174 | * @crtc: Currently bound CRTC, only really meaningful for non-atomic |
---|
175 | 175 | * drivers. Atomic drivers should instead check |
---|
176 | 176 | * &drm_connector_state.crtc. |
---|
177 | 177 | */ |
---|
178 | 178 | 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 | + |
---|
180 | 186 | const struct drm_encoder_funcs *funcs; |
---|
181 | 187 | const struct drm_encoder_helper_funcs *helper_private; |
---|
182 | 188 | }; |
---|
.. | .. |
---|
202 | 208 | } |
---|
203 | 209 | |
---|
204 | 210 | /** |
---|
205 | | - * drm_encoder_mask - find the mask of a registered ENCODER |
---|
| 211 | + * drm_encoder_mask - find the mask of a registered encoder |
---|
206 | 212 | * @encoder: encoder to find mask for |
---|
207 | 213 | * |
---|
208 | 214 | * Given a registered encoder, return the mask bit of that encoder for an |
---|