From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>,
intel-gfx@lists.freedesktop.org, stable@vger.kernel.org
Subject: Re: [Intel-gfx] [PATCH 2/3] drm/i915: Don't enable the cursor on a disable pipe
Date: Fri, 13 Sep 2013 10:28:34 +0300 [thread overview]
Message-ID: <20130913072833.GF20128@intel.com> (raw)
In-Reply-To: <20130912200817.GA14235@nuc-i3427.alporthouse.com>
On Thu, Sep 12, 2013 at 09:08:17PM +0100, Chris Wilson wrote:
> On Thu, Sep 12, 2013 at 10:45:42PM +0300, ville.syrjala@linux.intel.com wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > On HSW enabling a plane on a disabled pipe may hang the entire system.
> > And there's no good reason for doing it ever, so just don't.
> >
> > Cc: stable@vger.kernel.org
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> > drivers/gpu/drm/i915/intel_display.c | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> > index 18043a2..d0137b6 100644
> > --- a/drivers/gpu/drm/i915/intel_display.c
> > +++ b/drivers/gpu/drm/i915/intel_display.c
> > @@ -6793,6 +6793,9 @@ static void intel_crtc_update_cursor(struct drm_crtc *crtc,
> > u32 base, pos;
> > bool visible;
> >
> > + if (!intel_crtc->active)
> > + return;
>
> This is misleading since we do expect to call this function whilst
> turning off the crtc. This check makes it appear that such calls might
> be wrong.
crtc->active is true until the pipe has been fully turned off.
> Also the !crtc->enabled following intel_crtc->active makes
> ones question their sanity.
I actually forgot we had that there. If you recall I'm actually
removing it in my cursor visibility fixes. But I didn't realize that
we don't actually clear crtc->config to zero for inactive pipes, so
I actually would have introduced a bug there.
> So I feel this check detracts from readability of the function.
I just wanted something minimal for stable. But since we have the
->enabled check there currently I think this patch could just be
dropped as ->enabled should match ->active outside modeset
operations, and during modeset operations we're covered by Jani's
patch to remove the extra cursor calls.
But I need to amend my earlier visibility fixes to add either ->active
or ->enabled check back. Or I need to make it so that crtc->config
gets cleared for disabled pipes.
--
Ville Syrjälä
Intel OTC
next prev parent reply other threads:[~2013-09-13 7:28 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-12 19:45 [PATCH 0/3] drm/i915: HSW modeset hang fix ville.syrjala
2013-09-12 19:45 ` [PATCH 1/3] drm/i915: do not update cursor in crtc mode set ville.syrjala
2013-09-12 20:09 ` Chris Wilson
2013-09-13 7:30 ` [Intel-gfx] " Ville Syrjälä
2013-09-13 8:03 ` [PATCH 1/2] drm/i915: add asserts for cursor disabled Jani Nikula
2013-09-13 8:03 ` [PATCH 2/2] drm/i915: clean up and simplify i9xx_crtc_mode_set wrt PLL handling Jani Nikula
2013-09-13 13:00 ` Daniel Vetter
2013-09-13 13:38 ` Jani Nikula
2013-09-13 14:07 ` Daniel Vetter
2013-09-13 14:47 ` Ville Syrjälä
2013-09-13 8:48 ` [PATCH 1/2] drm/i915: add asserts for cursor disabled Chris Wilson
2013-09-13 11:57 ` Ville Syrjälä
2013-09-13 12:59 ` Daniel Vetter
2013-09-12 19:45 ` [PATCH 2/3] drm/i915: Don't enable the cursor on a disable pipe ville.syrjala
2013-09-12 20:08 ` Chris Wilson
2013-09-13 7:28 ` Ville Syrjälä [this message]
2013-09-12 19:45 ` [PATCH 3/3] drm/i915: Don't enable sprites on a disabled pipe ville.syrjala
2013-09-12 20:13 ` [Intel-gfx] " Chris Wilson
2013-09-13 7:40 ` Ville Syrjälä
2013-09-13 7:50 ` Ville Syrjälä
2013-09-13 7:54 ` Ville Syrjälä
2013-09-13 8:43 ` Chris Wilson
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=20130913072833.GF20128@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
--cc=stable@vger.kernel.org \
/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