From: Imre Deak <imre.deak@intel.com>
To: "Kumar, Shobhit" <shobhit.kumar@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: dsi: fix pipe-off timeout due to port vs. pipe disable ordering
Date: Tue, 27 May 2014 18:12:30 +0300 [thread overview]
Message-ID: <1401203550.10798.61.camel@intelbox> (raw)
In-Reply-To: <53849DF7.4040403@intel.com>
[-- Attachment #1.1: Type: text/plain, Size: 2827 bytes --]
On Tue, 2014-05-27 at 19:45 +0530, Kumar, Shobhit wrote:
> On 5/27/2014 6:45 PM, Imre Deak wrote:
> > If we disable first the port (by disabling DPI) and only then the
> > display pipe the pipe-off flag will never be set, possibly leading to a
> > hanged pipe state at the next modeset-enable.
> >
> > Note that according to the VLV2 display cluster HAS, we should disable
> > the port before the pipe. This doesn't seem to match reality based on
> > the above and it's also asymmetric with the enabling sequence, where we
> > first enable the port and then the pipe.
> >
> > Signed-off-by: Imre Deak <imre.deak@intel.com>
> > ---
> > drivers/gpu/drm/i915/intel_dsi.c | 9 ++++++++-
> > 1 file changed, 8 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_dsi.c b/drivers/gpu/drm/i915/intel_dsi.c
> > index e73bec6..3756af1 100644
> > --- a/drivers/gpu/drm/i915/intel_dsi.c
> > +++ b/drivers/gpu/drm/i915/intel_dsi.c
> > @@ -206,6 +206,11 @@ static void intel_dsi_enable_nop(struct intel_encoder *encoder)
> > */
> > }
> >
> > +static void intel_dsi_disable_nop(struct intel_encoder *encoder)
> > +{
> > + DRM_DEBUG_KMS("\n");
> > +}
> > +
>
> Make this as *_pre_disable and the SHUTDOWN command should be sent in
> this function. That is the recommended sequence in disable path. First
> thing is to shutdown the panel. Remove that bit from the intel_dsi_disable.
I tried this, but it results in a "Timeout waiting for DPI FIFO empty"
error when sending the SHUTDOWN command. This order would be also
asymmetric with the enabling sequence where we first turn on the panel
and only then enable the pipe. So I would need more explanation for the
above before moving the SHUTDOWN command earlier.
--Imre
> > static void intel_dsi_disable(struct intel_encoder *encoder)
> > {
> > struct drm_device *dev = encoder->base.dev;
> > @@ -293,6 +298,8 @@ static void intel_dsi_post_disable(struct intel_encoder *encoder)
> >
> > DRM_DEBUG_KMS("\n");
> >
> > + intel_dsi_disable(encoder);
> > +
> > intel_dsi_clear_device_ready(encoder);
> >
> > val = I915_READ(DSPCLK_GATE_D);
> > @@ -691,7 +698,7 @@ bool intel_dsi_init(struct drm_device *dev)
> > intel_encoder->pre_pll_enable = intel_dsi_pre_pll_enable;
> > intel_encoder->pre_enable = intel_dsi_pre_enable;
> > intel_encoder->enable = intel_dsi_enable_nop;
> > - intel_encoder->disable = intel_dsi_disable;
> > + intel_encoder->disable = intel_dsi_disable_nop;
>
> intel_encoder->disable = intel_dsi_pre_disable
> as suggested above
>
> > intel_encoder->post_disable = intel_dsi_post_disable;
> > intel_encoder->get_hw_state = intel_dsi_get_hw_state;
> > intel_encoder->get_config = intel_dsi_get_config;
> >
>
> Regards
> Shobhit
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2014-05-27 15:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-27 13:15 [PATCH] drm/i915: dsi: fix pipe-off timeout due to port vs. pipe disable ordering Imre Deak
2014-05-27 14:15 ` Kumar, Shobhit
2014-05-27 15:12 ` Imre Deak [this message]
2014-05-27 15:34 ` Kumar, Shobhit
2014-05-27 15:53 ` Imre Deak
2014-05-27 16:00 ` Imre Deak
2014-05-27 16:27 ` Kumar, Shobhit
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=1401203550.10798.61.camel@intelbox \
--to=imre.deak@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=shobhit.kumar@intel.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