From 4c4d0e6eb29fab7c1fb54cb7a7f5e3e41e245991 Mon Sep 17 00:00:00 2001 From: Haley Teng Date: Thu, 21 Apr 2016 21:02:14 +0800 Subject: nvgpu: vgpu: create fifo.force_reset_ch in gpu_ops gk20a_fifo_force_reset_ch() does not support vgpu now, so we need to create a function pointer in gpu_ops and assign it differently for vgpu and non-vgpu. Bug 200184349 Change-Id: I5f8f4f731b4b970c4ff8de65531f25568e7691b6 Signed-off-by: Haley Teng Reviewed-on: http://git-master/r/1130420 Reviewed-by: Terje Bergstrom Tested-by: Terje Bergstrom --- drivers/gpu/nvgpu/vgpu/fifo_vgpu.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'drivers/gpu/nvgpu/vgpu') diff --git a/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c b/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c index dc82d57b..66b5e410 100644 --- a/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c +++ b/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c @@ -585,6 +585,17 @@ static int vgpu_channel_set_timeslice(struct channel_gk20a *ch, u32 timeslice) return err ? err : msg.ret; } +static int vgpu_fifo_force_reset_ch(struct channel_gk20a *ch, bool verbose) +{ + gk20a_dbg_fn(""); + + if (verbose) + gk20a_warn(dev_from_gk20a(ch->g), + "channel force reset is not supported"); + + return -ENOSYS; +} + static void vgpu_fifo_set_ctx_mmu_error(struct gk20a *g, struct channel_gk20a *ch) { @@ -664,6 +675,7 @@ void vgpu_init_fifo_ops(struct gpu_ops *gops) { gops->fifo.bind_channel = vgpu_channel_bind; gops->fifo.unbind_channel = vgpu_channel_unbind; + gops->fifo.enable_channel = NULL; gops->fifo.disable_channel = vgpu_channel_disable; gops->fifo.alloc_inst = vgpu_channel_alloc_inst; gops->fifo.free_inst = vgpu_channel_free_inst; @@ -674,4 +686,5 @@ void vgpu_init_fifo_ops(struct gpu_ops *gops) gops->fifo.channel_set_priority = vgpu_channel_set_priority; gops->fifo.set_runlist_interleave = vgpu_fifo_set_runlist_interleave; gops->fifo.channel_set_timeslice = vgpu_channel_set_timeslice; + gops->fifo.force_reset_ch = vgpu_fifo_force_reset_ch; } -- cgit v1.2.2