drm: Validate encoder->possible_crtcs
WARN if the encoder possible_crtcs is effectively empty or contains
bits for non-existing crtcs.
v2: Move to drm_mode_config_validate() (Daniel)
Make the docs say we WARN when this is wrong (Daniel)
Extract full_crtc_mask()
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200211162208.16224-7-ville.syrjala@linux.intel.com
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
@@ -142,7 +142,7 @@ struct drm_encoder {
|
||||
* the bits for all &drm_crtc objects this encoder can be connected to
|
||||
* before calling drm_dev_register().
|
||||
*
|
||||
* In reality almost every driver gets this wrong.
|
||||
* You will get a WARN if you get this wrong in the driver.
|
||||
*
|
||||
* Note that since CRTC objects can't be hotplugged the assigned indices
|
||||
* are stable and hence known before registering all objects.
|
||||
|
||||
Reference in New Issue
Block a user