Commit f0f50dcf authored by Kevin Wang's avatar Kevin Wang Committed by Alex Deucher

drm/amdgpu: use exiting amdgpu_ctx_total_num_entities function

simplify driver code.
Signed-off-by: default avatarKevin Wang <kevin1.wang@amd.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent b81e57fb
...@@ -289,10 +289,7 @@ static void amdgpu_ctx_do_release(struct kref *ref) ...@@ -289,10 +289,7 @@ static void amdgpu_ctx_do_release(struct kref *ref)
ctx = container_of(ref, struct amdgpu_ctx, refcount); ctx = container_of(ref, struct amdgpu_ctx, refcount);
num_entities = 0; num_entities = amdgpu_ctx_total_num_entities();
for (i = 0; i < AMDGPU_HW_IP_NUM; i++)
num_entities += amdgpu_ctx_num_entities[i];
for (i = 0; i < num_entities; i++) for (i = 0; i < num_entities; i++)
drm_sched_entity_destroy(&ctx->entities[0][i].entity); drm_sched_entity_destroy(&ctx->entities[0][i].entity);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment