Skip to content

Commit

Permalink
drm: Skip drm_mode_config_validate() for !modeset
Browse files Browse the repository at this point in the history
drm_mode_config_init() may not have been called when the driver/device
doesn't support modeset. That will cause drm_mode_config_validate()
to oops. Skip the validation for !modeset.

TODO: We may want to consider calling drm_mode_config_init()
unconditionally to avoid similar issues elsewhere...

Fixes: 74d2aac ("drm: Validate encoder->possible_clones")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200318182518.31618-1-ville.syrjala@linux.intel.com
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
  • Loading branch information
Ville Syrjälä committed Mar 18, 2020
1 parent 8edb699 commit b684822
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/gpu/drm/drm_mode_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,9 @@ void drm_mode_config_validate(struct drm_device *dev)
{
struct drm_encoder *encoder;

if (!drm_core_check_feature(dev, DRIVER_MODESET))
return;

drm_for_each_encoder(encoder, dev)
fixup_encoder_possible_clones(encoder);

Expand Down

0 comments on commit b684822

Please sign in to comment.