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 3/3] drm/i915: Don't enable sprites on a disabled pipe
Date: Fri, 13 Sep 2013 10:40:16 +0300 [thread overview]
Message-ID: <20130913074015.GH20128@intel.com> (raw)
In-Reply-To: <20130912201356.GC14235@nuc-i3427.alporthouse.com>
On Thu, Sep 12, 2013 at 09:13:56PM +0100, Chris Wilson wrote:
> On Thu, Sep 12, 2013 at 10:45:43PM +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_sprite.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
> > index d9c7a66..4f11eb1 100644
> > --- a/drivers/gpu/drm/i915/intel_sprite.c
> > +++ b/drivers/gpu/drm/i915/intel_sprite.c
> > @@ -652,8 +652,8 @@ intel_update_plane(struct drm_plane *plane, struct drm_crtc *crtc,
> > .y2 = crtc_y + crtc_h,
> > };
> > const struct drm_rect clip = {
> > - .x2 = crtc->mode.hdisplay,
> > - .y2 = crtc->mode.vdisplay,
> > + .x2 = intel_crtc->active ? crtc->mode.hdisplay : 0,
> > + .y2 = intel_crtc->active ? crtc->mode.vdisplay : 0,
> > };
>
> Too much magic that looks like it would have interesting effects later
> in the function. This function should only be called on an active CRTC,
> so declare it so:
>
> if (WARN_ON(!intel_crtc->active))
> return -EMONKEY;
I'm actually perfectly happy to let users set up planes on a disabled
pipe. We allow it for cursors already, so why not all planes? Especially
as cursors will be just drm_planes in the future.
And actually we do have a PIPECONF_ENABLED check in there that I was
going to remove but forgot. That already prevents setting up a plane when
the pipe is off outside modeset operations. During modeset even if we add
an ->active check we might be left with a race window when the pipe is not
fully up and running yet. I think to catch those we just need to slap
asserts at the appropriate place in modeset.
So I gues we don't really need this patch in stable either. Hmm. fixing
bugs is easier than I thought ;)
--
Ville Syrjälä
Intel OTC
next prev parent reply other threads:[~2013-09-13 7:40 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 ` [Intel-gfx] " Ville Syrjälä
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ä [this message]
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=20130913074015.GH20128@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.