* [PATCH] drm: Skip drm_mode_config_validate() for !modeset
@ 2020-03-18 18:25 Ville Syrjala
2020-03-18 18:31 ` Chris Wilson
0 siblings, 1 reply; 3+ messages in thread
From: Ville Syrjala @ 2020-03-18 18:25 UTC (permalink / raw)
To: dri-devel; +Cc: intel-gfx
From: Ville Syrjälä <ville.syrjala@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@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
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm: Skip drm_mode_config_validate() for !modeset
2020-03-18 18:25 [PATCH] drm: Skip drm_mode_config_validate() for !modeset Ville Syrjala
@ 2020-03-18 18:31 ` Chris Wilson
2020-03-18 19:51 ` Ville Syrjälä
0 siblings, 1 reply; 3+ messages in thread
From: Chris Wilson @ 2020-03-18 18:31 UTC (permalink / raw)
To: Ville Syrjala, dri-devel; +Cc: intel-gfx
Quoting Ville Syrjala (2020-03-18 18:25:18)
> From: Ville Syrjälä <ville.syrjala@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@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm: Skip drm_mode_config_validate() for !modeset
2020-03-18 18:31 ` Chris Wilson
@ 2020-03-18 19:51 ` Ville Syrjälä
0 siblings, 0 replies; 3+ messages in thread
From: Ville Syrjälä @ 2020-03-18 19:51 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx, dri-devel
On Wed, Mar 18, 2020 at 06:31:16PM +0000, Chris Wilson wrote:
> Quoting Ville Syrjala (2020-03-18 18:25:18)
> > From: Ville Syrjälä <ville.syrjala@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@linux.intel.com>
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Thanks. Looks like this gets BAT up and running again so pushing w/o
waiting for shards.
Sorry about the mess everyone. CI had turned a blind eye on the
regressing series and I didn't notice that fact. I need to adjust my
brain regex to look for *all* CI mails, not just the failures.
--
Ville Syrjälä
Intel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-03-18 19:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-18 18:25 [PATCH] drm: Skip drm_mode_config_validate() for !modeset Ville Syrjala
2020-03-18 18:31 ` Chris Wilson
2020-03-18 19:51 ` Ville Syrjälä
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).