From: zhoucm1 <david1.zhou-5C7GfCeVMHo@public.gmane.org>
To: "StDenis, Tom" <Tom.StDenis-5C7GfCeVMHo@public.gmane.org>,
amd-gfx list
<amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Subject: Re: mutex_destroy in amdgpu_ctx_fini()
Date: Fri, 30 Sep 2016 11:28:23 +0800 [thread overview]
Message-ID: <57EDDBD7.7090606@amd.com> (raw)
In-Reply-To: <CY4PR12MB1768BBD9F3498EA5EB29C317F7CE0-rpdhrqHFk06yjjPBNVDk/QdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
Good catch, Could you make a patch?
Thanks,
David Zhou
On 2016年09月29日 19:18, StDenis, Tom wrote:
> In this block of code I'm wondering if the mutex_destroy should be hoisted out of the inner loop?
>
> static void amdgpu_ctx_fini(struct amdgpu_ctx *ctx)
> {
> struct amdgpu_device *adev = ctx->adev;
> unsigned i, j;
>
>
> if (!adev)
> return;
>
>
> for (i = 0; i < AMDGPU_MAX_RINGS; ++i)
> for (j = 0; j < amdgpu_sched_jobs; ++j) {
> fence_put(ctx->rings[i].fences[j]);
> mutex_destroy(&ctx->rings[i].sem_lock);
> }
>
>
> Cheers,
> Tom
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
prev parent reply other threads:[~2016-09-30 3:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-29 11:18 mutex_destroy in amdgpu_ctx_fini() StDenis, Tom
[not found] ` <CY4PR12MB1768BBD9F3498EA5EB29C317F7CE0-rpdhrqHFk06yjjPBNVDk/QdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2016-09-29 11:33 ` Christian König
2016-09-30 3:28 ` zhoucm1 [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=57EDDBD7.7090606@amd.com \
--to=david1.zhou-5c7gfcevmho@public.gmane.org \
--cc=Tom.StDenis-5C7GfCeVMHo@public.gmane.org \
--cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@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