mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 18:16:01 +03:00
gpu: nvgpu: skip nvgpu syncpoint in usermode submits
The nvgpu managed syncpoint is not needed for anything if a channel uses usermode submits; in that case the channel would allocate an user-managed syncpoint and use that. Create the channel sync in nvgpu_channel_setup_bind() only if usermode submit is not enabled. Bug 200466905 Change-Id: I976f4b4fd0c3131cb310c72b286329fb16f1f29a Signed-off-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1990270 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
b75ee294d5
commit
d1d1f56c49
@@ -1245,22 +1245,22 @@ int nvgpu_channel_setup_bind(struct channel_gk20a *c,
|
|||||||
|
|
||||||
if (!c->usermode_submit_enabled) {
|
if (!c->usermode_submit_enabled) {
|
||||||
g->ops.fifo.setup_userd(c);
|
g->ops.fifo.setup_userd(c);
|
||||||
}
|
|
||||||
|
|
||||||
if (g->aggressive_sync_destroy_thresh == 0U) {
|
if (g->aggressive_sync_destroy_thresh == 0U) {
|
||||||
nvgpu_mutex_acquire(&c->sync_lock);
|
nvgpu_mutex_acquire(&c->sync_lock);
|
||||||
c->sync = nvgpu_channel_sync_create(c, false);
|
c->sync = nvgpu_channel_sync_create(c, false);
|
||||||
if (c->sync == NULL) {
|
if (c->sync == NULL) {
|
||||||
err = -ENOMEM;
|
err = -ENOMEM;
|
||||||
|
nvgpu_mutex_release(&c->sync_lock);
|
||||||
|
goto clean_up_unmap;
|
||||||
|
}
|
||||||
nvgpu_mutex_release(&c->sync_lock);
|
nvgpu_mutex_release(&c->sync_lock);
|
||||||
goto clean_up_unmap;
|
|
||||||
}
|
|
||||||
nvgpu_mutex_release(&c->sync_lock);
|
|
||||||
|
|
||||||
if (g->ops.fifo.resetup_ramfc != NULL) {
|
if (g->ops.fifo.resetup_ramfc != NULL) {
|
||||||
err = g->ops.fifo.resetup_ramfc(c);
|
err = g->ops.fifo.resetup_ramfc(c);
|
||||||
if (err != 0) {
|
if (err != 0) {
|
||||||
goto clean_up_sync;
|
goto clean_up_sync;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user