mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: drop force_need_sync_fence in submit path
For CDE work a sync fence is always requested, but kernel does not need it and submit flags from userspace will be passed to the submit function in cde path so a sync fence will get created if necessary. To reduce some complexity, remove the explicit boolean in favor of just NVGPU_SUBMIT_FLAGS_SYNC_FENCE. Jira NVGPU-705 Change-Id: I8aac85288513ed7cc640acd021d892cee86f41d8 Signed-off-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1721785 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
6266a1210d
commit
de67fb18fb
@@ -527,7 +527,6 @@ static int gk20a_submit_prepare_syncs(struct channel_gk20a *c,
|
||||
struct priv_cmd_entry **wait_cmd,
|
||||
struct priv_cmd_entry **incr_cmd,
|
||||
struct gk20a_fence **post_fence,
|
||||
bool force_need_sync_fence,
|
||||
bool register_irq,
|
||||
u32 flags)
|
||||
{
|
||||
@@ -539,13 +538,6 @@ static int gk20a_submit_prepare_syncs(struct channel_gk20a *c,
|
||||
bool need_wfi = !(flags & NVGPU_SUBMIT_FLAGS_SUPPRESS_WFI);
|
||||
bool pre_alloc_enabled = channel_gk20a_is_prealloc_enabled(c);
|
||||
|
||||
/*
|
||||
* If user wants to always allocate sync_fence_fds then respect that;
|
||||
* otherwise, allocate sync_fence_fd based on user flags.
|
||||
*/
|
||||
if (force_need_sync_fence)
|
||||
need_sync_fence = true;
|
||||
|
||||
if (g->aggressive_sync_destroy_thresh) {
|
||||
nvgpu_mutex_acquire(&c->sync_lock);
|
||||
if (!c->sync) {
|
||||
@@ -772,7 +764,6 @@ int gk20a_submit_channel_gpfifo(struct channel_gk20a *c,
|
||||
u32 flags,
|
||||
struct nvgpu_channel_fence *fence,
|
||||
struct gk20a_fence **fence_out,
|
||||
bool force_need_sync_fence,
|
||||
struct fifo_profile_gk20a *profile)
|
||||
{
|
||||
struct gk20a *g = c->g;
|
||||
@@ -861,7 +852,7 @@ int gk20a_submit_channel_gpfifo(struct channel_gk20a *c,
|
||||
if (c->deterministic && !channel_gk20a_is_prealloc_enabled(c))
|
||||
return -EINVAL;
|
||||
|
||||
need_sync_framework = force_need_sync_fence ||
|
||||
need_sync_framework =
|
||||
gk20a_channel_sync_needs_sync_framework(g) ||
|
||||
(flags & NVGPU_SUBMIT_FLAGS_SYNC_FENCE &&
|
||||
flags & NVGPU_SUBMIT_FLAGS_FENCE_GET);
|
||||
@@ -968,7 +959,6 @@ int gk20a_submit_channel_gpfifo(struct channel_gk20a *c,
|
||||
err = gk20a_submit_prepare_syncs(c, fence, job,
|
||||
&wait_cmd, &incr_cmd,
|
||||
&post_fence,
|
||||
force_need_sync_fence,
|
||||
need_deferred_cleanup,
|
||||
flags);
|
||||
if (err)
|
||||
|
||||
Reference in New Issue
Block a user