diff options
author | Kevin Wang <kevin1.wang@amd.com> | 2019-08-13 16:52:04 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-08-15 10:51:45 -0500 |
commit | f0f50dcfd427f9f4a179048f4b56bff176bacc94 (patch) | |
tree | b880dce3c4d69427f3c800e4d9b94aa11829298a /drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | |
parent | b81e57fbf92e76ce8b7329650440021ebb4e00a0 (diff) | |
download | linux-f0f50dcfd427f9f4a179048f4b56bff176bacc94.tar.gz linux-f0f50dcfd427f9f4a179048f4b56bff176bacc94.tar.bz2 linux-f0f50dcfd427f9f4a179048f4b56bff176bacc94.zip |
drm/amdgpu: use exiting amdgpu_ctx_total_num_entities function
simplify driver code.
Signed-off-by: Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c index 34ab14ea05da..c0b101c5d468 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c @@ -289,10 +289,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); |