dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v2 2/6] drm/atomic: Unconditionally call prepare_fb.
Date: Mon, 19 Dec 2016 14:07:11 +0200	[thread overview]
Message-ID: <3183202.995BmsCpkT@avalon> (raw)
In-Reply-To: <6d82f9b6-9d16-91d1-d176-4a37b09afc44@linux.intel.com>

Hi Maarten,

Thank you for the patch.

On Monday 19 Dec 2016 12:08:16 Maarten Lankhorst wrote:
> Op 13-12-16 om 18:10 schreef Daniel Vetter:
> > On Tue, Dec 13, 2016 at 03:13:54PM +0100, Maarten Lankhorst wrote:
> >> Op 09-12-16 om 09:25 schreef Daniel Vetter:
> >>> On Fri, Dec 09, 2016 at 12:42:19AM +0200, Laurent Pinchart wrote:
> >>>> On Thursday 08 Dec 2016 16:41:04 Daniel Vetter wrote:
> >>>>> On Thu, Dec 08, 2016 at 02:45:25PM +0100, Maarten Lankhorst wrote:
> >>>>>> Atomic drivers may set properties like rotation on the same fb, which
> >>>>>> may require a call to prepare_fb even when framebuffer stays
> >>>>>> identical.
> >>>>>> 
> >>>>>> Instead of handling all the special cases in the core, let the driver
> >>>>>> decide when prepare_fb and cleanup_fb are noops.
> >>>>>> 
> >>>>>> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> >>>>> 
> >>>>> I think this makes sense, but would be really good to get a pile of
> >>>>> acks from driver maintainers on this one. Rob, Eric, Laurent, others?
> >>>> 
> >>>> This is all very nice, but it will introduce at least a performance
> >>>> regression, and possibly worse, until drivers get updated. There are 7
> >>>> drivers implementing the .prepare_fb() callback (plus a bunch of
> >>>> drivers that probably should use drm_fb_cma_prepare_fb() but don't at
> >>>> the moment). I can't ack this patch before they get fixed.
> >>> 
> >>> Maarten's commit message is insufficient, since this is defacto a revert
> >>> of
> >>> 
> >>> commit fcc60b413d14dd06ddbd79ec50e83c4fb2a097ba
> >>> Author: Keith Packard <keithp@keithp.com>
> >>> Date:   Sat Jun 4 01:16:22 2016 -0700
> >>> 
> >>>     drm: Don't prepare or cleanup unchanging frame buffers [v3]
> >>> 
> >>> because that breaks stuff. We're simply going back to where we've been a
> >>> few months ago. Since this is a regression fix, back to original
> >>> behaviour, can you ack (assuming Maarten updates the commit message to
> >>> reflect the nature of the commit here)?
> >> 
> >> Waiting on a reply, but what about this commit message for this patch?
> >> ---
> >> Atomic drivers may set properties like rotation on the same fb, which
> >> may require a call to prepare_fb even when framebuffer stays identical.
> >> 
> >> Instead of handling all the special cases in the core, let the driver
> >> decide when prepare_fb and cleanup_fb are noops.
> >> 
> >> This is a revert of:
> >> 
> >> commit fcc60b413d14dd06ddbd79ec50e83c4fb2a097ba
> >> Author: Keith Packard <keithp@keithp.com>
> >> Date:   Sat Jun 4 01:16:22 2016 -0700
> >> 
> >>     drm: Don't prepare or cleanup unchanging frame buffers [v3]
> >> 
> >> The original commit mentions that this prevents waiting in i915 on all
> >> previous rendering during cursor updates, but there are better ways to
> >> fix this.
> >> 
> >> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> > 
> > Yeah sounds good to me. Since we don't want to backport all the i915
> > cursor patches no cc: stable on this. Also, this is only an issue for
> > drivers which both have a cursor plane, and implement that cursor using
> > universal planes (i.e. settting drm_crtc->cursor). Afaik the only two are
> > vc4 and i915, and after this series both will have appropriate hacks (for
> > now) to keep existing userspace happy.
> > -Daniel
> 
> Same patch, reworded!
> ---8<---
> Atomic drivers may set properties like rotation on the same fb, which
> may require a call to prepare_fb even when framebuffer stays identical.
> 
> Instead of handling all the special cases in the core, let the driver
> decide when prepare_fb and cleanup_fb are noops.
> 
> This is a revert of:
> 
> commit fcc60b413d14dd06ddbd79ec50e83c4fb2a097ba
> Author: Keith Packard <keithp@keithp.com>
> Date:   Sat Jun 4 01:16:22 2016 -0700
> 
>     drm: Don't prepare or cleanup unchanging frame buffers [v3]
> 
> The original commit mentions that this prevents waiting in i915 on all
> previous rendering during cursor updates, but there are better ways to
> fix this.
> 
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  drivers/gpu/drm/drm_atomic_helper.c | 9 ---------
>  1 file changed, 9 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_atomic_helper.c
> b/drivers/gpu/drm/drm_atomic_helper.c index 23767df72615..d19563651e07
> 100644
> --- a/drivers/gpu/drm/drm_atomic_helper.c
> +++ b/drivers/gpu/drm/drm_atomic_helper.c
> @@ -1664,9 +1664,6 @@ int drm_atomic_helper_prepare_planes(struct drm_device
> *dev,
> 
>  		funcs = plane->helper_private;
> 
> -		if (!drm_atomic_helper_framebuffer_changed(dev, state,
> plane_state->crtc)) -			continue;
> -
>  		if (funcs->prepare_fb) {
>  			ret = funcs->prepare_fb(plane, plane_state);
>  			if (ret)
> @@ -1683,9 +1680,6 @@ int drm_atomic_helper_prepare_planes(struct drm_device
> *dev, if (j >= i)
>  			continue;
> 
> -		if (!drm_atomic_helper_framebuffer_changed(dev, state,
> plane_state->crtc)) -			continue;
> -
>  		funcs = plane->helper_private;
> 
>  		if (funcs->cleanup_fb)
> @@ -1952,9 +1946,6 @@ void drm_atomic_helper_cleanup_planes(struct
> drm_device *dev, for_each_plane_in_state(old_state, plane, plane_state, i)
> {
>  		const struct drm_plane_helper_funcs *funcs;
> 
> -		if (!drm_atomic_helper_framebuffer_changed(dev, old_state,
> plane_state->crtc)) -			continue;
> -
>  		funcs = plane->helper_private;
> 
>  		if (funcs->cleanup_fb)

-- 
Regards,

Laurent Pinchart

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-12-19 12:07 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-08 13:45 [PATCH 0/6] drm/atomic: Remove drm_atomic_helper_framebuffer_changed Maarten Lankhorst
2016-12-08 13:45 ` [PATCH 1/6] drm/atomic: Use active instead of enable in wait_for_vblanks Maarten Lankhorst
2016-12-08 15:36   ` Daniel Vetter
2016-12-08 13:45 ` [PATCH 2/6] drm/atomic: Unconditionally call prepare_fb Maarten Lankhorst
2016-12-08 15:41   ` Daniel Vetter
2016-12-08 22:42     ` [Intel-gfx] " Laurent Pinchart
2016-12-09  8:25       ` Daniel Vetter
2016-12-13 14:13         ` Maarten Lankhorst
2016-12-13 17:10           ` Daniel Vetter
2016-12-19 11:08             ` [PATCH v2 " Maarten Lankhorst
2016-12-19 12:07               ` Laurent Pinchart [this message]
2016-12-14  0:12           ` [Intel-gfx] [PATCH " Laurent Pinchart
2016-12-08 13:45 ` [PATCH 3/6] drm/atomic: Clean up wait_for_vblanks Maarten Lankhorst
2016-12-08 15:38   ` Daniel Vetter
2016-12-15 11:51     ` [PATCH v2 3/6] drm/atomic: Clean up wait_for_vblanks, v2 Maarten Lankhorst
2016-12-15 15:55       ` Daniel Vetter
2016-12-15 16:14         ` Maarten Lankhorst
2016-12-08 13:45 ` [PATCH 4/6] drm/atomic: Wait for vblank whenever a plane is added to state Maarten Lankhorst
2016-12-08 15:43   ` Daniel Vetter
2016-12-12 10:27     ` Maarten Lankhorst
2016-12-08 13:45 ` [PATCH 5/6] drm/atomic: Remove drm_atomic_helper_framebuffer_changed Maarten Lankhorst
2016-12-08 13:45 ` [PATCH 6/6] drm/i915: Add a cursor hack to allow converting legacy page flip to atomic Maarten Lankhorst
2016-12-08 14:07   ` Matthew Auld
2016-12-12 10:34     ` [PATCH v2 6/6] drm/i915: Add a cursor hack to allow converting legacy page flip to atomic, v3 Maarten Lankhorst
2016-12-13 13:01       ` Archit Taneja
2016-12-13 13:52         ` Maarten Lankhorst
2016-12-14  3:19           ` Archit Taneja
2016-12-20  9:26       ` 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=3183202.995BmsCpkT@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=maarten.lankhorst@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;
as well as URLs for NNTP newsgroup(s).