Skip to content
Commit 71427795 authored by Ville Syrjälä's avatar Ville Syrjälä
Browse files

drm: Include the encoder itself in possible_clones



The docs say possible_clones should always include the encoder itself.
Since most drivers don't want to deal with the complexities of cloning
let's allow them to set possible_clones=0 and instead we'll fix that
up in the core.

We can't put this special case into drm_encoder_init() because drivers
will have to fill up possible_clones after adding all the relevant
encoders. Otherwise they wouldn't know the proper encoder indexes to
use. So we'll just do it just before registering the device.

v2: Don't set the bit if possible_clones!=0 so that the
    validation (coming soon) will WARN (Thomas)
    Fix up the docs to allow possible_clones==0 (Daniel)
    .late_register() is too late, introduce drm_mode_config_validate()
    which gets called _before_ we register the char device (Daniel)

Acked-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Cc: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200211162208.16224-2-ville.syrjala@linux.intel.com


Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent a212d6a5
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment