[Intel-gfx] [PATCH 4/9] drm/i915: WARN on !crtc in intel_dp_link_down

Paulo Zanoni przanoni at gmail.com
Fri Nov 16 20:35:16 CET 2012


Hi

2012/11/5 Daniel Vetter <daniel.vetter at ffwll.ch>:
> This could have happened with the old crtc helper based modeset code,
> but can't happen any longer with the new code.
>
> Hence put in a WARN and adjust the comment. If no one hits this, we
> can eventually remove it (like a few other such cases across our
> code).
>
> Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>

Reviewed-by: Paulo Zanoni <paulo.r.zanoni at intel.com>

> ---
>  drivers/gpu/drm/i915/intel_dp.c | 13 ++++---------
>  1 file changed, 4 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index b782094..8ec4d1c 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -2044,15 +2044,10 @@ intel_dp_link_down(struct intel_dp *intel_dp)
>                 /* Changes to enable or select take place the vblank
>                  * after being written.
>                  */
> -               if (crtc == NULL) {
> -                       /* We can arrive here never having been attached
> -                        * to a CRTC, for instance, due to inheriting
> -                        * random state from the BIOS.
> -                        *
> -                        * If the pipe is not running, play safe and
> -                        * wait for the clocks to stabilise before
> -                        * continuing.
> -                        */
> +               if (WARN_ON(crtc == NULL)) {
> +                       /* We should never try to disable a port without a crtc
> +                        * attached. For paranoia keep the code around for a
> +                        * bit. */
>                         POSTING_READ(intel_dp->output_reg);
>                         msleep(50);
>                 } else
> --
> 1.7.11.7
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx



-- 
Paulo Zanoni



More information about the Intel-gfx mailing list