mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: delete unused job->pre_fence
The pre_fence member in channel_gk20a_job is no longer used for anything. Delete it. Only the post fence needs to be tracked. Jira NVGPU-527 Jira NVGPU-528 Bug 200390539 Change-Id: Ia1a556728dabf9a8e305ed76020ac1aa0b4d6b88 Signed-off-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1676735 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
395496bd6a
commit
2aad9366fe
@@ -420,7 +420,6 @@ static int gk20a_submit_prepare_syncs(struct channel_gk20a *c,
|
||||
struct channel_gk20a_job *job,
|
||||
struct priv_cmd_entry **wait_cmd,
|
||||
struct priv_cmd_entry **incr_cmd,
|
||||
struct gk20a_fence **pre_fence,
|
||||
struct gk20a_fence **post_fence,
|
||||
bool force_need_sync_fence,
|
||||
bool register_irq,
|
||||
@@ -470,19 +469,13 @@ static int gk20a_submit_prepare_syncs(struct channel_gk20a *c,
|
||||
* this condition.
|
||||
*/
|
||||
if (flags & NVGPU_SUBMIT_GPFIFO_FLAGS_FENCE_WAIT) {
|
||||
job->pre_fence = gk20a_alloc_fence(c);
|
||||
if (!job->pre_fence) {
|
||||
err = -ENOMEM;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (!pre_alloc_enabled)
|
||||
job->wait_cmd = nvgpu_kzalloc(g,
|
||||
sizeof(struct priv_cmd_entry));
|
||||
|
||||
if (!job->wait_cmd) {
|
||||
err = -ENOMEM;
|
||||
goto clean_up_pre_fence;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (flags & NVGPU_SUBMIT_GPFIFO_FLAGS_SYNC_FENCE) {
|
||||
@@ -495,12 +488,11 @@ static int gk20a_submit_prepare_syncs(struct channel_gk20a *c,
|
||||
job->wait_cmd);
|
||||
}
|
||||
|
||||
if (!err) {
|
||||
if (job->wait_cmd->valid)
|
||||
*wait_cmd = job->wait_cmd;
|
||||
*pre_fence = job->pre_fence;
|
||||
} else
|
||||
if (err)
|
||||
goto clean_up_wait_cmd;
|
||||
|
||||
if (job->wait_cmd->valid)
|
||||
*wait_cmd = job->wait_cmd;
|
||||
}
|
||||
|
||||
if ((flags & NVGPU_SUBMIT_GPFIFO_FLAGS_FENCE_GET) &&
|
||||
@@ -552,12 +544,8 @@ clean_up_wait_cmd:
|
||||
free_priv_cmdbuf(c, job->wait_cmd);
|
||||
if (!pre_alloc_enabled)
|
||||
job->wait_cmd = NULL;
|
||||
clean_up_pre_fence:
|
||||
gk20a_fence_put(job->pre_fence);
|
||||
job->pre_fence = NULL;
|
||||
fail:
|
||||
*wait_cmd = NULL;
|
||||
*pre_fence = NULL;
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -684,7 +672,6 @@ int gk20a_submit_channel_gpfifo(struct channel_gk20a *c,
|
||||
struct gk20a *g = c->g;
|
||||
struct priv_cmd_entry *wait_cmd = NULL;
|
||||
struct priv_cmd_entry *incr_cmd = NULL;
|
||||
struct gk20a_fence *pre_fence = NULL;
|
||||
struct gk20a_fence *post_fence = NULL;
|
||||
struct channel_gk20a_job *job = NULL;
|
||||
/* we might need two extra gpfifo entries - one for pre fence
|
||||
@@ -875,7 +862,7 @@ int gk20a_submit_channel_gpfifo(struct channel_gk20a *c,
|
||||
|
||||
err = gk20a_submit_prepare_syncs(c, fence, job,
|
||||
&wait_cmd, &incr_cmd,
|
||||
&pre_fence, &post_fence,
|
||||
&post_fence,
|
||||
force_need_sync_fence,
|
||||
need_deferred_cleanup,
|
||||
flags);
|
||||
@@ -940,7 +927,6 @@ clean_up_job:
|
||||
channel_gk20a_free_job(c, job);
|
||||
clean_up:
|
||||
gk20a_dbg_fn("fail");
|
||||
gk20a_fence_put(pre_fence);
|
||||
gk20a_fence_put(post_fence);
|
||||
if (c->deterministic)
|
||||
nvgpu_rwsem_up_read(&g->deterministic_busy);
|
||||
|
||||
@@ -1924,9 +1924,8 @@ void gk20a_channel_clean_up_jobs(struct channel_gk20a *c,
|
||||
channel_gk20a_joblist_delete(c, job);
|
||||
channel_gk20a_joblist_unlock(c);
|
||||
|
||||
/* Close the fences (this will unref the semaphores and release
|
||||
* them to the pool). */
|
||||
gk20a_fence_put(job->pre_fence);
|
||||
/* Close the fence (this will unref the semaphore and release
|
||||
* it to the pool). */
|
||||
gk20a_fence_put(job->post_fence);
|
||||
|
||||
/* Free the private command buffers (wait_cmd first and
|
||||
|
||||
@@ -58,7 +58,6 @@ struct notification {
|
||||
struct channel_gk20a_job {
|
||||
struct nvgpu_mapped_buf **mapped_buffers;
|
||||
int num_mapped_buffers;
|
||||
struct gk20a_fence *pre_fence;
|
||||
struct gk20a_fence *post_fence;
|
||||
struct priv_cmd_entry *wait_cmd;
|
||||
struct priv_cmd_entry *incr_cmd;
|
||||
|
||||
Reference in New Issue
Block a user