diff --git a/drivers/gpu/nvgpu/common/fifo/channel.c b/drivers/gpu/nvgpu/common/fifo/channel.c index 9ec12c186..728a1e45d 100644 --- a/drivers/gpu/nvgpu/common/fifo/channel.c +++ b/drivers/gpu/nvgpu/common/fifo/channel.c @@ -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) diff --git a/drivers/gpu/nvgpu/hal/init/hal_gp10b.c b/drivers/gpu/nvgpu/hal/init/hal_gp10b.c index 4227ba27b..f19089921 100644 --- a/drivers/gpu/nvgpu/hal/init/hal_gp10b.c +++ b/drivers/gpu/nvgpu/hal/init/hal_gp10b.c @@ -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, diff --git a/drivers/gpu/nvgpu/include/nvgpu/channel.h b/drivers/gpu/nvgpu/include/nvgpu/channel.h index bb9f5a0d0..f2b13287d 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/channel.h +++ b/drivers/gpu/nvgpu/include/nvgpu/channel.h @@ -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,