From: Daniel Vetter <daniel@ffwll.ch>
To: Rob Clark <robdclark@gmail.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm: export atomic wait_for_vblanks helper
Date: Tue, 11 Nov 2014 00:23:27 +0100 [thread overview]
Message-ID: <20141110232327.GD25711@phenom.ffwll.local> (raw)
In-Reply-To: <1415635163-19954-1-git-send-email-robdclark@gmail.com>
On Mon, Nov 10, 2014 at 10:59:23AM -0500, Rob Clark wrote:
> Signed-off-by: Rob Clark <robdclark@gmail.com>
> ---
> I'll need this helper for msm async commit, and I suspect other
> drivers will as well.
Yeah, makes sense. Some nits to clarify the kerneldoc below, with that
addressed this is
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
>
> drivers/gpu/drm/drm_atomic_helper.c | 16 +++++++++++++---
> include/drm/drm_atomic_helper.h | 3 +++
> 2 files changed, 16 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
> index ca839bd..9032fd5 100644
> --- a/drivers/gpu/drm/drm_atomic_helper.c
> +++ b/drivers/gpu/drm/drm_atomic_helper.c
> @@ -754,8 +754,17 @@ static void wait_for_fences(struct drm_device *dev,
> }
> }
>
> -static void
> -wait_for_vblanks(struct drm_device *dev, struct drm_atomic_state *old_state)
> +/**
> + * drm_atomic_helper_wait_for_vblanks - wait for vblank on crtcs
> + * @dev: DRM device
> + * @old_state: the just-applied driver state object
I think both for consistency and clarity we should copypaste the kerneldoc
I've used everyhwere else:
* @old_state: atomic state object with old state structures
Maybe we should also clarify the kerneldoc of the swap_state helper
function a bit, dunno. Now that I read it again it's not really a shining
beacon of great docs ;-)
> + *
> + * Helper to, after atomic commit, wait for vblanks on all effected crtcs
> + * (ie. before cleaning up old crtcs)
Missing full stop, and s/crtcs/framebuffers using
drm_atomic_helper_cleanup_planes()/
> + */
> +void
> +drm_atomic_helper_wait_for_vblanks(struct drm_device *dev,
> + struct drm_atomic_state *old_state)
> {
> struct drm_crtc *crtc;
> struct drm_crtc_state *old_crtc_state;
> @@ -800,6 +809,7 @@ wait_for_vblanks(struct drm_device *dev, struct drm_atomic_state *old_state)
> drm_crtc_vblank_put(crtc);
> }
> }
> +EXPORT_SYMBOL(drm_atomic_helper_wait_for_vblanks);
>
> /**
> * drm_atomic_helper_commit - commit validated state object
> @@ -859,7 +869,7 @@ int drm_atomic_helper_commit(struct drm_device *dev,
>
> drm_atomic_helper_commit_post_planes(dev, state);
>
> - wait_for_vblanks(dev, state);
> + drm_atomic_helper_wait_for_vblanks(dev, state);
>
> drm_atomic_helper_cleanup_planes(dev, state);
>
> diff --git a/include/drm/drm_atomic_helper.h b/include/drm/drm_atomic_helper.h
> index 67e3c46..64b4e91 100644
> --- a/include/drm/drm_atomic_helper.h
> +++ b/include/drm/drm_atomic_helper.h
> @@ -34,6 +34,9 @@ int drm_atomic_helper_commit(struct drm_device *dev,
> struct drm_atomic_state *state,
> bool async);
>
> +void drm_atomic_helper_wait_for_vblanks(struct drm_device *dev,
> + struct drm_atomic_state *old_state);
> +
> void drm_atomic_helper_commit_pre_planes(struct drm_device *dev,
> struct drm_atomic_state *state);
> void drm_atomic_helper_commit_post_planes(struct drm_device *dev,
> --
> 1.9.3
>
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
prev parent reply other threads:[~2014-11-10 23:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-10 15:59 [PATCH] drm: export atomic wait_for_vblanks helper Rob Clark
2014-11-10 23:23 ` Daniel Vetter [this message]
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=20141110232327.GD25711@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=robdclark@gmail.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