From: Daniel Vetter <daniel@ffwll.ch>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 03/10] drm/i915: Use the atomic state in intel_update_primary_planes.
Date: Mon, 14 Sep 2015 11:02:41 +0200 [thread overview]
Message-ID: <20150914090241.GP3383@phenom.ffwll.local> (raw)
In-Reply-To: <20150910163405.GQ29811@intel.com>
On Thu, Sep 10, 2015 at 07:34:05PM +0300, Ville Syrjälä wrote:
> On Thu, Sep 10, 2015 at 06:31:02PM +0200, Daniel Vetter wrote:
> > On Thu, Sep 10, 2015 at 06:43:26PM +0300, Ville Syrjälä wrote:
> > > On Thu, Sep 10, 2015 at 04:07:58PM +0200, Maarten Lankhorst wrote:
> > > > This function was still using the legacy state, convert it to atomic.
> > > > While we're at it, fix the FIXME too and disable the primary plane.
> > > >
> > > > Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> > > > ---
> > > > drivers/gpu/drm/i915/intel_display.c | 26 ++++++++++++--------------
> > > > 1 file changed, 12 insertions(+), 14 deletions(-)
> > > >
> > > > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> > > > index 33200403a5db..b68aa95c5460 100644
> > > > --- a/drivers/gpu/drm/i915/intel_display.c
> > > > +++ b/drivers/gpu/drm/i915/intel_display.c
> > > > @@ -3138,24 +3138,22 @@ static void intel_complete_page_flips(struct drm_device *dev)
> > > >
> > > > static void intel_update_primary_planes(struct drm_device *dev)
> > > > {
> > > > - struct drm_i915_private *dev_priv = dev->dev_private;
> > > > struct drm_crtc *crtc;
> > > >
> > > > for_each_crtc(dev, crtc) {
> > > > - struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
> > > > + struct intel_plane *plane = to_intel_plane(crtc->primary);
> > > > + struct intel_plane_state *plane_state;
> > > >
> > > > - drm_modeset_lock(&crtc->mutex, NULL);
> > > > - /*
> > > > - * FIXME: Once we have proper support for primary planes (and
> > > > - * disabling them without disabling the entire crtc) allow again
> > > > - * a NULL crtc->primary->fb.
> > > > - */
> > > > - if (intel_crtc->active && crtc->primary->fb)
> > > > - dev_priv->display.update_primary_plane(crtc,
> > > > - crtc->primary->fb,
> > > > - crtc->x,
> > > > - crtc->y);
> > > > - drm_modeset_unlock(&crtc->mutex);
> > > > + drm_modeset_lock_crtc(crtc, &plane->base);
> > > > +
> > > > + plane_state = to_intel_plane_state(plane->base.state);
> > > > +
> > > > + if (plane_state->base.fb)
> > > > + plane->commit_plane(&plane->base, plane_state);
> > > > + else if (crtc->state->active)
> > > > + plane->disable_plane(&plane->base, crtc);
> > >
> > > That doesn't make sense. There's no way to disable a plane with a page
> > > flip, so there's simply nothing to do here if the fb is NULL. If we can
> > > trust the plane state to be sane we should just check 'visible' here and
> > > commit the plane in that case.
> >
> > Right missed that and squash up a fixup that Ville acked on irc. Also
> > added the FIXME comment too.
>
> Actually I take it back. We just lost the ->active check entirely so now
> we're commiting a plane on a disabled pipe potentially.
Blergh and I tagged the pile already :( Maarten, can you pls send out the
fixup as a separate patch asap?
Thanks, Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-09-14 8:59 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-10 14:07 [PATCH 00/10] Nuke some legacy state Maarten Lankhorst
2015-09-10 14:07 ` [PATCH 01/10] drm/i915: Use atomic plane state in the primary plane update Maarten Lankhorst
2015-09-14 13:27 ` Ville Syrjälä
2015-09-14 13:40 ` Maarten Lankhorst
2015-09-14 13:54 ` Ville Syrjälä
2015-09-14 14:23 ` Daniel Vetter
2015-09-14 14:31 ` Ville Syrjälä
2015-09-10 14:07 ` [PATCH 02/10] drm/i915: Use the plane state in intel_crtc_info Maarten Lankhorst
2015-09-10 14:07 ` [PATCH 03/10] drm/i915: Use the atomic state in intel_update_primary_planes Maarten Lankhorst
2015-09-10 15:32 ` Daniel Vetter
2015-09-10 15:43 ` Ville Syrjälä
2015-09-10 16:31 ` Daniel Vetter
2015-09-10 16:34 ` Ville Syrjälä
2015-09-14 9:02 ` Daniel Vetter [this message]
2015-09-14 9:41 ` [fixup PATCH] drm/i915: Only commit active planes when updating planes during reset Maarten Lankhorst
2015-09-14 13:12 ` Daniel Vetter
2015-09-10 14:07 ` [PATCH 04/10] drm/i915: Use atomic state when changing cursor visibility Maarten Lankhorst
2015-09-10 15:46 ` Ville Syrjälä
2015-09-10 14:08 ` [PATCH 05/10] drm/i915: Remove legacy plane updates for cursor and sprite planes Maarten Lankhorst
2015-09-10 15:38 ` Daniel Vetter
2015-09-10 14:08 ` [PATCH 06/10] drm/i915: Update legacy primary state outside the commit hook Maarten Lankhorst
2015-09-10 15:41 ` Daniel Vetter
2015-09-14 9:52 ` Maarten Lankhorst
2015-09-14 13:13 ` Daniel Vetter
2015-09-14 13:16 ` Maarten Lankhorst
2015-09-14 14:26 ` Daniel Vetter
2015-09-23 14:08 ` Maarten Lankhorst
2015-09-10 14:08 ` [PATCH 07/10] drm/i915: Do not handle a null plane state Maarten Lankhorst
2015-09-10 14:08 ` [PATCH 08/10] drm/i915: Use crtc->state for duplication Maarten Lankhorst
2015-09-10 15:46 ` Daniel Vetter
2015-09-10 15:49 ` Daniel Vetter
2015-09-10 14:08 ` [PATCH 09/10] drm/i915: Kill off a user of update_state_fb Maarten Lankhorst
2015-09-10 15:50 ` Daniel Vetter
2015-09-14 9:56 ` Maarten Lankhorst
2015-09-10 14:08 ` [PATCH 10/10] drm/i915: Only run commit when crtc is active Maarten Lankhorst
2015-09-10 15:51 ` Daniel Vetter
2015-09-14 10:02 ` Maarten Lankhorst
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=20150914090241.GP3383@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.org \
--cc=ville.syrjala@linux.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