[Intel-gfx] [PATCH] drm: Skip drm_mode_config_validate() for !modeset
Ville Syrjala
ville.syrjala at linux.intel.com
Wed Mar 18 18:25:18 UTC 2020
From: Ville Syrjälä <ville.syrjala at linux.intel.com>
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 at linux.intel.com>
---
drivers/gpu/drm/drm_mode_config.c | 3 +++
1 file changed, 3 insertions(+)
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);
--
2.24.1
More information about the Intel-gfx
mailing list