From: Archit Taneja <architt-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
To: Sean Paul <seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: jsanka-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
hoegsberg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org,
abhinavk-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v2 2/6] drm/msm: Refactor complete_commit() to look more the helpers
Date: Mon, 2 Apr 2018 10:52:02 +0530 [thread overview]
Message-ID: <df0760a7-c3c2-fb9a-d5c4-2a74d9792fc8@codeaurora.org> (raw)
In-Reply-To: <20180328190657.218661-3-seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
On Thursday 29 March 2018 12:36 AM, Sean Paul wrote:
> Factor out the commit_tail() portions of complete_commit() into a
> separate function to facilitate moving to the atomic helpers in future
> patches.
>
Reviewed-by: Archit Taneja <architt@codeaurora.org>
> Changes in v2:
> - None
>
> Cc: Jeykumar Sankaran <jsanka@codeaurora.org>
> Signed-off-by: Sean Paul <seanpaul@chromium.org>
> ---
> drivers/gpu/drm/msm/msm_atomic.c | 25 ++++++++++++++++---------
> 1 file changed, 16 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/msm_atomic.c b/drivers/gpu/drm/msm/msm_atomic.c
> index e792158676aa..671a18ee977d 100644
> --- a/drivers/gpu/drm/msm/msm_atomic.c
> +++ b/drivers/gpu/drm/msm/msm_atomic.c
> @@ -97,18 +97,12 @@ static void msm_atomic_wait_for_commit_done(struct drm_device *dev,
> }
> }
>
> -/* The (potentially) asynchronous part of the commit. At this point
> - * nothing can fail short of armageddon.
> - */
> -static void complete_commit(struct msm_commit *c, bool async)
> +static void msm_atomic_commit_tail(struct drm_atomic_state *state)
> {
> - struct drm_atomic_state *state = c->state;
> struct drm_device *dev = state->dev;
> struct msm_drm_private *priv = dev->dev_private;
> struct msm_kms *kms = priv->kms;
>
> - drm_atomic_helper_wait_for_fences(dev, state, false);
> -
> kms->funcs->prepare_commit(kms, state);
>
> drm_atomic_helper_commit_modeset_disables(dev, state);
> @@ -135,6 +129,19 @@ static void complete_commit(struct msm_commit *c, bool async)
> drm_atomic_helper_cleanup_planes(dev, state);
>
> kms->funcs->complete_commit(kms, state);
> +}
> +
> +/* The (potentially) asynchronous part of the commit. At this point
> + * nothing can fail short of armageddon.
> + */
> +static void complete_commit(struct msm_commit *c)
> +{
> + struct drm_atomic_state *state = c->state;
> + struct drm_device *dev = state->dev;
> +
> + drm_atomic_helper_wait_for_fences(dev, state, false);
> +
> + msm_atomic_commit_tail(state);
>
> drm_atomic_state_put(state);
>
> @@ -143,7 +150,7 @@ static void complete_commit(struct msm_commit *c, bool async)
>
> static void commit_worker(struct work_struct *work)
> {
> - complete_commit(container_of(work, struct msm_commit, work), true);
> + complete_commit(container_of(work, struct msm_commit, work));
> }
>
> /**
> @@ -242,7 +249,7 @@ int msm_atomic_commit(struct drm_device *dev,
> return 0;
> }
>
> - complete_commit(c, false);
> + complete_commit(c);
>
> return 0;
>
>
_______________________________________________
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno
next prev parent reply other threads:[~2018-04-02 5:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-28 19:06 [PATCH v2 0/6] drm/msm: Switch to atomic helpers Sean Paul
2018-03-28 19:06 ` [PATCH v2 1/6] drm/msm: Use drm_private_obj/state instead of subclassing Sean Paul
[not found] ` <20180328190657.218661-2-seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2018-04-02 5:01 ` Archit Taneja
[not found] ` <20180328190657.218661-1-seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2018-03-28 19:06 ` [PATCH v2 2/6] drm/msm: Refactor complete_commit() to look more the helpers Sean Paul
[not found] ` <20180328190657.218661-3-seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2018-04-02 5:22 ` Archit Taneja [this message]
2018-03-28 19:06 ` [PATCH v2 3/6] drm/msm: Mark the crtc->state->event consumed Sean Paul
[not found] ` <20180328190657.218661-4-seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2018-04-02 5:22 ` Archit Taneja
2018-03-28 19:06 ` [PATCH v2 4/6] drm/msm: Issue queued events when disabling crtc Sean Paul
[not found] ` <20180328190657.218661-5-seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2018-04-02 5:23 ` Archit Taneja
2018-03-28 19:06 ` [PATCH v2 5/6] drm/msm: Remove msm_commit/worker, use atomic helper commit Sean Paul
2018-03-28 19:06 ` [PATCH v2 6/6] drm/msm: Switch to atomic_helper_commit() Sean Paul
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=df0760a7-c3c2-fb9a-d5c4-2a74d9792fc8@codeaurora.org \
--to=architt-sgv2jx0feol9jmxxk+q4oq@public.gmane.org \
--cc=abhinavk-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=hoegsberg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
--cc=jsanka-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.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