[Intel-gfx] [PATCH] drm/i915: Resurrect warning from intel_encoder_crtc_ok()
Egbert Eich
eich at freedesktop.org
Wed Apr 16 14:45:17 CEST 2014
Daniel Vetter writes:
> On Wed, Apr 16, 2014 at 11:46 AM, Egbert Eich <eich at suse.de> wrote:
> > Bail out if crtc is NULL to keep the driver from crashing.
> >
> > Signed-off-by: Egbert Eich <eich at suse.de>
> > ---
> > drivers/gpu/drm/i915/intel_display.c | 5 +++++
> > 1 file changed, 5 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> > index c276733..dfebced 100644
> > --- a/drivers/gpu/drm/i915/intel_display.c
> > +++ b/drivers/gpu/drm/i915/intel_display.c
> > @@ -10257,6 +10257,11 @@ intel_modeset_stage_output_state(struct drm_device *dev,
> > new_crtc = set->crtc;
> > }
> >
> > + if (!new_crtc) {
> > + WARN(1, "crtc not set!");
> > + return -EINVAL;
> > + }
>
> This looks really ugly. Can you please supply some context about
> where/how this blows up? We really shouldn't ever attempt a modeset
> with a NULL crtc ...
Without
[PATCH] drm/i915: Break encoder->crtc link separately in intel_sanitize_crtc()
it is easy to make this happen.
It occurs when there is more than one SDVO connector flagged and the plane - crtc
mapping code for GEN < 4 in intel_sanitize_crtc() triggers.
The reason why this happens is that a still linked encoder has a CRTC nulled
(by break_all_links()).
The NULL is picked up by:
new_crtc = connector->new_encoder->base.crtc;
Let me attach a log file I've just generated where the warning code in this
patch is hit. I had to fake the test for the bogus crtc-plane mapping as I cannot
find a test system with this problem - I do have a log file from an older version
of the driver running on a system at a customer which has an issue with plane-crtc
mapping.
With my other patch this particular situation will not occur any more -
but maybe another ...?
Cheers,
Egbert.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: dmesg-3.14-NULL-crtc
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20140416/105e8017/attachment.ksh>
More information about the Intel-gfx
mailing list