drm: Skip drm_mode_config_validate() for !modeset
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 18 Mar 2020 18:25:18 +0000 (20:25 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 18 Mar 2020 18:37:22 +0000 (20:37 +0200)
commitb684822a44469fe44b80aef5cdca52cd979a4ecb
treeba358d3a9ced8d07166de7dddc12a7a0d43bb534
parent8edb699707393a87e012de0804f7acc636d76c6e
drm: Skip drm_mode_config_validate() for !modeset

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: 74d2aacbe840 ("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>
drivers/gpu/drm/drm_mode_config.c