From: Daniel Vetter <daniel-/w4YWyX8dFk@public.gmane.org>
To: Thomas Zimmermann <tzimmermann-l3A5Bk7waGM@public.gmane.org>,
robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH v3 2/3] drm/msm: Replace drm_gem_object_{un/reference} with put, get functions
Date: Mon, 1 Oct 2018 09:37:25 +0200 [thread overview]
Message-ID: <20181001073725.GM11082@phenom.ffwll.local> (raw)
In-Reply-To: <20180926162317.GJ10761-9PYrDHPZ2Orvke4nUoYGnHL1okKdlPRT@public.gmane.org>
On Wed, Sep 26, 2018 at 10:23:17AM -0600, Jordan Crouse wrote:
> On Wed, Sep 26, 2018 at 01:48:58PM +0200, Thomas Zimmermann wrote:
> > This patch unifies the naming of DRM functions for reference counting
> > of struct drm_gem_object. The resulting code is more aligned with the
> > rest of the Linux kernel interfaces.
>
> Reviewed-by: Jordan Crouse <jcrouse@codeaurora.org>
Care to review all 3 and then push them? Or is msm still not yet group
maintained :-)
Cheers, Daniel
>
> > Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> > ---
> > drivers/gpu/drm/msm/adreno/a5xx_debugfs.c | 4 ++--
> > drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 2 +-
> > drivers/gpu/drm/msm/adreno/a5xx_power.c | 2 +-
> > drivers/gpu/drm/msm/adreno/a5xx_preempt.c | 2 +-
> > drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 2 +-
> > drivers/gpu/drm/msm/msm_gem_submit.c | 4 ++--
> > 6 files changed, 8 insertions(+), 8 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/msm/adreno/a5xx_debugfs.c b/drivers/gpu/drm/msm/adreno/a5xx_debugfs.c
> > index 059ec7d394d0..d2127b1c4ece 100644
> > --- a/drivers/gpu/drm/msm/adreno/a5xx_debugfs.c
> > +++ b/drivers/gpu/drm/msm/adreno/a5xx_debugfs.c
> > @@ -132,14 +132,14 @@ reset_set(void *data, u64 val)
> > if (a5xx_gpu->pm4_bo) {
> > if (a5xx_gpu->pm4_iova)
> > msm_gem_put_iova(a5xx_gpu->pm4_bo, gpu->aspace);
> > - drm_gem_object_unreference(a5xx_gpu->pm4_bo);
> > + drm_gem_object_put(a5xx_gpu->pm4_bo);
> > a5xx_gpu->pm4_bo = NULL;
> > }
> >
> > if (a5xx_gpu->pfp_bo) {
> > if (a5xx_gpu->pfp_iova)
> > msm_gem_put_iova(a5xx_gpu->pfp_bo, gpu->aspace);
> > - drm_gem_object_unreference(a5xx_gpu->pfp_bo);
> > + drm_gem_object_put(a5xx_gpu->pfp_bo);
> > a5xx_gpu->pfp_bo = NULL;
> > }
> >
> > diff --git a/drivers/gpu/drm/msm/adreno/a5xx_gpu.c b/drivers/gpu/drm/msm/adreno/a5xx_gpu.c
> > index ab1d9308c311..6a6849309b6a 100644
> > --- a/drivers/gpu/drm/msm/adreno/a5xx_gpu.c
> > +++ b/drivers/gpu/drm/msm/adreno/a5xx_gpu.c
> > @@ -1234,7 +1234,7 @@ static void a5xx_crashdumper_free(struct msm_gpu *gpu,
> > msm_gem_put_iova(dumper->bo, gpu->aspace);
> > msm_gem_put_vaddr(dumper->bo);
> >
> > - drm_gem_object_unreference(dumper->bo);
> > + drm_gem_object_put(dumper->bo);
> > }
> >
> > static int a5xx_crashdumper_run(struct msm_gpu *gpu,
> > diff --git a/drivers/gpu/drm/msm/adreno/a5xx_power.c b/drivers/gpu/drm/msm/adreno/a5xx_power.c
> > index e9c0e56dbec0..7a41e1c147e4 100644
> > --- a/drivers/gpu/drm/msm/adreno/a5xx_power.c
> > +++ b/drivers/gpu/drm/msm/adreno/a5xx_power.c
> > @@ -323,7 +323,7 @@ void a5xx_gpmu_ucode_init(struct msm_gpu *gpu)
> > if (a5xx_gpu->gpmu_iova)
> > msm_gem_put_iova(a5xx_gpu->gpmu_bo, gpu->aspace);
> > if (a5xx_gpu->gpmu_bo)
> > - drm_gem_object_unreference(a5xx_gpu->gpmu_bo);
> > + drm_gem_object_put(a5xx_gpu->gpmu_bo);
> >
> > a5xx_gpu->gpmu_bo = NULL;
> > a5xx_gpu->gpmu_iova = 0;
> > diff --git a/drivers/gpu/drm/msm/adreno/a5xx_preempt.c b/drivers/gpu/drm/msm/adreno/a5xx_preempt.c
> > index 970c7963ae29..f3c21f827a4d 100644
> > --- a/drivers/gpu/drm/msm/adreno/a5xx_preempt.c
> > +++ b/drivers/gpu/drm/msm/adreno/a5xx_preempt.c
> > @@ -272,7 +272,7 @@ void a5xx_preempt_fini(struct msm_gpu *gpu)
> > if (a5xx_gpu->preempt_iova[i])
> > msm_gem_put_iova(a5xx_gpu->preempt_bo[i], gpu->aspace);
> >
> > - drm_gem_object_unreference(a5xx_gpu->preempt_bo[i]);
> > + drm_gem_object_put(a5xx_gpu->preempt_bo[i]);
> > a5xx_gpu->preempt_bo[i] = NULL;
> > }
> > }
> > diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
> > index c629f742a1d1..1a5d7a53752c 100644
> > --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
> > +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
> > @@ -744,7 +744,7 @@ static void a6xx_destroy(struct msm_gpu *gpu)
> > if (a6xx_gpu->sqe_bo) {
> > if (a6xx_gpu->sqe_iova)
> > msm_gem_put_iova(a6xx_gpu->sqe_bo, gpu->aspace);
> > - drm_gem_object_unreference_unlocked(a6xx_gpu->sqe_bo);
> > + drm_gem_object_put_unlocked(a6xx_gpu->sqe_bo);
> > }
> >
> > a6xx_gmu_remove(a6xx_gpu);
> > diff --git a/drivers/gpu/drm/msm/msm_gem_submit.c b/drivers/gpu/drm/msm/msm_gem_submit.c
> > index 7bd83e0afa97..7a7923e6220d 100644
> > --- a/drivers/gpu/drm/msm/msm_gem_submit.c
> > +++ b/drivers/gpu/drm/msm/msm_gem_submit.c
> > @@ -144,7 +144,7 @@ static int submit_lookup_objects(struct msm_gem_submit *submit,
> > goto out_unlock;
> > }
> >
> > - drm_gem_object_reference(obj);
> > + drm_gem_object_get(obj);
> >
> > submit->bos[i].obj = msm_obj;
> >
> > @@ -396,7 +396,7 @@ static void submit_cleanup(struct msm_gem_submit *submit)
> > struct msm_gem_object *msm_obj = submit->bos[i].obj;
> > submit_unlock_unpin_bo(submit, i, false);
> > list_del_init(&msm_obj->submit_entry);
> > - drm_gem_object_unreference(&msm_obj->base);
> > + drm_gem_object_put(&msm_obj->base);
> > }
> >
> > ww_acquire_fini(&submit->ticket);
> > --
> > 2.19.0
> >
> > _______________________________________________
> > Freedreno mailing list
> > Freedreno@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/freedreno
>
> --
> The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
> a Linux Foundation Collaborative Project
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno
next prev parent reply other threads:[~2018-10-01 7:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-26 11:48 [PATCH v3 0/3] drm/msm: Replace {un/reference} with {put, get} functions Thomas Zimmermann
[not found] ` <20180926114859.23522-1-tzimmermann-l3A5Bk7waGM@public.gmane.org>
2018-09-26 11:48 ` [PATCH v3 1/3] drm/msm: Replace drm_framebuffer_{un/reference} with put, get functions Thomas Zimmermann
2018-09-26 11:48 ` [PATCH v3 2/3] drm/msm: Replace drm_gem_object_{un/reference} " Thomas Zimmermann
[not found] ` <20180926114859.23522-3-tzimmermann-l3A5Bk7waGM@public.gmane.org>
2018-09-26 16:23 ` Jordan Crouse
[not found] ` <20180926162317.GJ10761-9PYrDHPZ2Orvke4nUoYGnHL1okKdlPRT@public.gmane.org>
2018-10-01 7:37 ` Daniel Vetter [this message]
2018-09-26 11:48 ` [PATCH v3 3/3] drm/msm: Replace drm_dev_unref with drm_dev_put Thomas Zimmermann
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=20181001073725.GM11082@phenom.ffwll.local \
--to=daniel-/w4ywyx8dfk@public.gmane.org \
--cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=tzimmermann-l3A5Bk7waGM@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