gpu: nvgpu: use set_syncpt only with nvhost

nvgpu_channel_set_syncpt() is not useful if nvhost and thus syncpts are
missing and semaphores are used for synchronization. Require
CONFIG_TEGRA_GK20A_NVHOST to be set for the set_syncpt hal.

Jira NVGPU-5496

Change-Id: Ief8b4a0fb29af631817aba55c04181b1a360ce56
Signed-off-by: Konsta Hölttä <kholtta@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2344064
Reviewed-by: automaticguardword <automaticguardword@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Konsta Hölttä
2020-05-14 15:19:05 +03:00
committed by Alex Waterman
parent 10239a9084
commit 2077df9b1a
3 changed files with 5 additions and 1 deletions

View File

@@ -249,6 +249,7 @@ bool nvgpu_channel_is_prealloc_enabled(struct nvgpu_channel *c)
#endif
}
#ifdef CONFIG_TEGRA_GK20A_NVHOST
int nvgpu_channel_set_syncpt(struct nvgpu_channel *ch)
{
struct gk20a *g = ch->g;
@@ -302,6 +303,7 @@ out:
}
return err;
}
#endif
static int channel_setup_kernelmode(struct nvgpu_channel *c,
struct nvgpu_setup_bind_args *args)

View File

@@ -913,7 +913,7 @@ static const struct gpu_ops gp10b_ops = {
.count = gm20b_channel_count,
.read_state = gk20a_channel_read_state,
.force_ctx_reload = gm20b_channel_force_ctx_reload,
#ifdef CONFIG_NVGPU_KERNEL_MODE_SUBMIT
#if defined(CONFIG_NVGPU_KERNEL_MODE_SUBMIT) && defined(CONFIG_TEGRA_GK20A_NVHOST)
.set_syncpt = nvgpu_channel_set_syncpt,
#endif
.abort_clean_up = nvgpu_channel_abort_clean_up,

View File

@@ -609,7 +609,9 @@ int nvgpu_submit_channel_gpfifo_kernel(struct nvgpu_channel *c,
u32 flags,
struct nvgpu_channel_fence *fence,
struct nvgpu_fence_type **fence_out);
#ifdef CONFIG_TEGRA_GK20A_NVHOST
int nvgpu_channel_set_syncpt(struct nvgpu_channel *ch);
#endif
bool nvgpu_channel_is_prealloc_enabled(struct nvgpu_channel *c);
bool nvgpu_channel_update_and_check_ctxsw_timeout(struct nvgpu_channel *ch,