summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_mode_config.c
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2020-03-18 19:25:18 +0100
committerVille Syrjälä <ville.syrjala@linux.intel.com>2020-03-18 19:37:22 +0100
commitb684822a44469fe44b80aef5cdca52cd979a4ecb (patch)
treeba358d3a9ced8d07166de7dddc12a7a0d43bb534 /drivers/gpu/drm/drm_mode_config.c
parentMAINTAINERS: Better regex for dma_buf|fence|resv (diff)
downloadlinux-b684822a44469fe44b80aef5cdca52cd979a4ecb.tar.xz
linux-b684822a44469fe44b80aef5cdca52cd979a4ecb.zip
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>
Diffstat (limited to 'drivers/gpu/drm/drm_mode_config.c')
-rw-r--r--drivers/gpu/drm/drm_mode_config.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_mode_config.c b/drivers/gpu/drm/drm_mode_config.c
index 55322d7048f5..e1ec1bb7068d 100644
--- a/drivers/gpu/drm/drm_mode_config.c
+++ b/drivers/gpu/drm/drm_mode_config.c
@@ -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);