From: Daniel Vetter <daniel@ffwll.ch>
To: Paulo Zanoni <przanoni@gmail.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 4/6] drm/i915: Cleanup if the EDP transcoder has a bobug input value
Date: Sat, 23 Mar 2013 13:30:32 +0100 [thread overview]
Message-ID: <20130323123032.GZ9021@phenom.ffwll.local> (raw)
In-Reply-To: <CA+gsUGSWd3owZjTdVg5wRnRDOwNdjb4P_m10gXkeMZBA=9n-vQ@mail.gmail.com>
On Fri, Mar 22, 2013 at 06:34:43PM -0300, Paulo Zanoni wrote:
> Hi
>
> 2013/3/7 Damien Lespiau <damien.lespiau@intel.com>:
> > In the case where the hardware has been wrongly programmed and the EDP
> > TRANS_DDI_FUNC_CTL register has a bogus value in its EDP Input field, we
> > were using the pipe variable uninitialized.
> >
> > In this case, shutdown the transcoder. It will be programmed correctly
> > the next time we try to enabled eDP.
> >
> > Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
> > ---
> > drivers/gpu/drm/i915/intel_display.c | 8 ++++++++
> > 1 files changed, 8 insertions(+), 0 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> > index 502cb28..875baf1 100644
> > --- a/drivers/gpu/drm/i915/intel_display.c
> > +++ b/drivers/gpu/drm/i915/intel_display.c
> > @@ -9107,6 +9107,13 @@ void intel_modeset_setup_hw_state(struct drm_device *dev,
> > case TRANS_DDI_EDP_INPUT_C_ONOFF:
> > pipe = PIPE_C;
> > break;
> > + default:
> > + /* A bogus value has been programmed, disable
> > + * the transcoder */
> > + WARN(1, "Bogus eDP source %08x\n", tmp);
> > + intel_ddi_disable_transcoder_func(dev_priv,
> > + TRANSCODER_EDP);
>
> I imagine this patch is a result of checking some code analyzer and
> not real hardware, so we didn't really test this code on real
> hardware, right? The WARN is definitely a must-have, but I kinda fear
> this "disable" code since we can easily freeze the machine if we get
> the mode set sequence wrong. Anyway, if the hardware is programmed in
> an inconsistent way I don't really think there's a "right way" to
> disable it, so:
>
> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Queued for -next, thanks for the patch.
> But we need to watch out in case users start reporting about machines
> that freeze during boot.
And added a little note to the patch to this effect.
-Daniel
>
> > + goto setup_pipes;
> > }
> >
> > crtc = to_intel_crtc(dev_priv->pipe_to_crtc_mapping[pipe]);
> > @@ -9117,6 +9124,7 @@ void intel_modeset_setup_hw_state(struct drm_device *dev,
> > }
> > }
> >
> > +setup_pipes:
> > for_each_pipe(pipe) {
> > crtc = to_intel_crtc(dev_priv->pipe_to_crtc_mapping[pipe]);
> >
> > --
> > 1.7.7.5
> >
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
>
>
> --
> Paulo Zanoni
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
next prev parent reply other threads:[~2013-03-23 12:27 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-07 15:30 [PATCH 1/6] drm/i915: Warn if a pipe is enabled with a bogus port Damien Lespiau
2013-03-07 15:30 ` [PATCH 2/6] drm/i915: Initialize wait in intel_ddi_prepare_link_retrain() Damien Lespiau
2013-03-08 21:03 ` Ben Widawsky
2013-03-07 15:30 ` [PATCH 3/6] drm/i915: Error out if we are trying to use VGA with SPLL already in use Damien Lespiau
2013-03-08 21:06 ` Ben Widawsky
2013-03-22 21:14 ` Paulo Zanoni
2013-03-23 12:27 ` Daniel Vetter
2013-03-07 15:30 ` [PATCH 4/6] drm/i915: Cleanup if the EDP transcoder has a bobug input value Damien Lespiau
2013-03-22 21:34 ` Paulo Zanoni
2013-03-23 12:30 ` Daniel Vetter [this message]
2013-03-07 15:30 ` [PATCH 5/6] drm/i915: Rename intel_ddi_enable_pipe_func() to transcoder_func() Damien Lespiau
2013-03-22 21:37 ` Paulo Zanoni
2013-03-07 15:30 ` [PATCH 6/6] drm/i915: Use BUG() in a case of a programming error Damien Lespiau
2013-03-22 21:43 ` Paulo Zanoni
2013-03-23 12:31 ` Daniel Vetter
2013-03-22 21:04 ` [PATCH 1/6] drm/i915: Warn if a pipe is enabled with a bogus port Paulo Zanoni
2013-03-25 15:16 ` [PATCH v2] " Damien Lespiau
2013-03-25 17:00 ` Paulo Zanoni
2013-03-25 18:21 ` Daniel Vetter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130323123032.GZ9021@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.org \
--cc=przanoni@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox