[Intel-gfx] [PATCH] drm/i915: Resurrect warning from intel_encoder_crtc_ok()

Daniel Vetter daniel at ffwll.ch
Wed Apr 16 13:36:14 CEST 2014


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 ...
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch



More information about the Intel-gfx mailing list