From: "Wang, Kevin(Yang)" <Kevin1.Wang-5C7GfCeVMHo@public.gmane.org>
To: "dl.srdc_lnx_nv10" <dl.srdc_lnx_nv10-5C7GfCeVMHo@public.gmane.org>
Cc: "Wang, Kevin(Yang)" <Kevin1.Wang-5C7GfCeVMHo@public.gmane.org>,
"amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
<amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Subject: [PATCH 2/2] drm/amdgpu: use exiting amdgput_ctx_total_num_entities function
Date: Tue, 13 Aug 2019 09:08:21 +0000 [thread overview]
Message-ID: <20190813090745.9496-2-kevin1.wang@amd.com> (raw)
In-Reply-To: <20190813090745.9496-1-kevin1.wang-5C7GfCeVMHo@public.gmane.org>
simplify driver code.
Signed-off-by: Kevin Wang <kevin1.wang@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
index 95d8201a738e..89c26bb0f05c 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
@@ -290,10 +290,7 @@ static void amdgpu_ctx_do_release(struct kref *ref)
ctx = container_of(ref, struct amdgpu_ctx, refcount);
- num_entities = 0;
- for (i = 0; i < AMDGPU_HW_IP_NUM; i++)
- num_entities += amdgpu_ctx_num_entities[i];
-
+ num_entities = amdgpu_ctx_total_num_entities();
for (i = 0; i < num_entities; i++)
drm_sched_entity_destroy(&ctx->entities[0][i].entity);
--
2.22.0
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2019-08-13 9:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-13 9:08 [PATCH 1/2] drm/amdgpu: fix typo error amdgput -> amdgpu Wang, Kevin(Yang)
[not found] ` <20190813090745.9496-1-kevin1.wang-5C7GfCeVMHo@public.gmane.org>
2019-08-13 9:08 ` Wang, Kevin(Yang) [this message]
[not found] ` <20190813090745.9496-2-kevin1.wang-5C7GfCeVMHo@public.gmane.org>
2019-08-13 9:44 ` [PATCH 2/2] drm/amdgpu: use exiting amdgput_ctx_total_num_entities function Christian König
2019-08-13 9:11 ` [PATCH 1/2] drm/amdgpu: fix typo error amdgput -> amdgpu Christian König
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=20190813090745.9496-2-kevin1.wang@amd.com \
--to=kevin1.wang-5c7gfcevmho@public.gmane.org \
--cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=dl.srdc_lnx_nv10-5C7GfCeVMHo@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