From: Rob Clark <robdclark@gmail.com>
To: Eric Anholt <eric@anholt.net>
Cc: "dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-arm-msm <linux-arm-msm@vger.kernel.org>,
freedreno <freedreno@lists.freedesktop.org>
Subject: Re: [PATCH v2 3/5] drm/msm: Reuse dma_fence_release.
Date: Tue, 2 May 2017 06:20:25 -0400 [thread overview]
Message-ID: <CAF6AEGuo1axm2kYAg5u+Bj8m_R_85vcOE=snXxDQ0P6b_r5WEg@mail.gmail.com> (raw)
In-Reply-To: <20170412191202.22740-4-eric@anholt.net>
On Wed, Apr 12, 2017 at 3:12 PM, Eric Anholt <eric@anholt.net> wrote:
> If we follow the typical pattern of the base class being the first
> member, we can use the default dma_fence_free function.
>
> Signed-off-by: Eric Anholt <eric@anholt.net>
> Cc: Rob Clark <robdclark@gmail.com>
> Cc: linux-arm-msm@vger.kernel.org
> Cc: freedreno@lists.freedesktop.org
Reviewed-by: Rob Clark <robdclark@gmail.com>
(go ahead and push via drm-misc with the rest of the series, if you
haven't already)
> ---
> drivers/gpu/drm/msm/msm_fence.c | 10 ++--------
> 1 file changed, 2 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/msm_fence.c b/drivers/gpu/drm/msm/msm_fence.c
> index 3f299c537b77..a2f89bac9c16 100644
> --- a/drivers/gpu/drm/msm/msm_fence.c
> +++ b/drivers/gpu/drm/msm/msm_fence.c
> @@ -99,8 +99,8 @@ void msm_update_fence(struct msm_fence_context *fctx, uint32_t fence)
> }
>
> struct msm_fence {
> - struct msm_fence_context *fctx;
> struct dma_fence base;
> + struct msm_fence_context *fctx;
> };
>
> static inline struct msm_fence *to_msm_fence(struct dma_fence *fence)
> @@ -130,19 +130,13 @@ static bool msm_fence_signaled(struct dma_fence *fence)
> return fence_completed(f->fctx, f->base.seqno);
> }
>
> -static void msm_fence_release(struct dma_fence *fence)
> -{
> - struct msm_fence *f = to_msm_fence(fence);
> - kfree_rcu(f, base.rcu);
> -}
> -
> static const struct dma_fence_ops msm_fence_ops = {
> .get_driver_name = msm_fence_get_driver_name,
> .get_timeline_name = msm_fence_get_timeline_name,
> .enable_signaling = msm_fence_enable_signaling,
> .signaled = msm_fence_signaled,
> .wait = dma_fence_default_wait,
> - .release = msm_fence_release,
> + .release = dma_fence_free,
> };
>
> struct dma_fence *
> --
> 2.11.0
>
next prev parent reply other threads:[~2017-05-02 10:20 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-12 19:11 [PATCH v2 0/5] vc4 V3D fencing and msm/etnaviv cleanups Eric Anholt
2017-04-12 19:11 ` [PATCH v2 1/5] drm/msm: Expose our reservation object when exporting a dmabuf Eric Anholt
2017-05-02 10:20 ` Rob Clark
2017-04-12 19:11 ` [PATCH v2 2/5] drm/etnaviv: " Eric Anholt
2017-04-12 19:12 ` [PATCH v2 3/5] drm/msm: Reuse dma_fence_release Eric Anholt
2017-05-02 10:20 ` Rob Clark [this message]
2017-04-12 19:12 ` [PATCH v2 4/5] drm/etnaviv: " Eric Anholt
2017-04-13 7:00 ` Daniel Vetter
2017-05-03 10:19 ` Lucas Stach
2017-05-03 16:03 ` Eric Anholt
2017-04-12 19:12 ` [PATCH v2 5/5] drm/vc4: Expose dma-buf fences for V3D rendering Eric Anholt
2017-04-13 7:13 ` Daniel Vetter
2017-04-13 17:16 ` Eric Anholt
2017-04-13 18:01 ` Eric Anholt
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='CAF6AEGuo1axm2kYAg5u+Bj8m_R_85vcOE=snXxDQ0P6b_r5WEg@mail.gmail.com' \
--to=robdclark@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=eric@anholt.net \
--cc=freedreno@lists.freedesktop.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@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 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).