diff --git a/drivers/gpu/nvgpu/gp10b/fifo_gp10b.c b/drivers/gpu/nvgpu/gp10b/fifo_gp10b.c index 08f1c13c4..acf6f8290 100644 --- a/drivers/gpu/nvgpu/gp10b/fifo_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/fifo_gp10b.c @@ -78,7 +78,7 @@ static int channel_gp10b_commit_userd(struct channel_gk20a *c) } static int channel_gp10b_setup_ramfc(struct channel_gk20a *c, - u64 gpfifo_base, u32 gpfifo_entries) + u64 gpfifo_base, u32 gpfifo_entries, u32 flags) { void *inst_ptr; @@ -133,7 +133,8 @@ static int channel_gp10b_setup_ramfc(struct channel_gk20a *c, pbdma_runlist_timeslice_timescale_3_f() | pbdma_runlist_timeslice_enable_true_f()); - gp10b_set_pdb_fault_replay_flags(c->g, inst_ptr); + if ( flags & NVGPU_ALLOC_GPFIFO_FLAGS_REPLAYABLE_FAULTS_ENABLE) + gp10b_set_pdb_fault_replay_flags(c->g, inst_ptr); gk20a_mem_wr32(inst_ptr, ram_fc_chid_w(), ram_fc_chid_id_f(c->hw_chid)); diff --git a/include/uapi/linux/nvgpu-t18x.h b/include/uapi/linux/nvgpu-t18x.h index c144f837e..768144159 100644 --- a/include/uapi/linux/nvgpu-t18x.h +++ b/include/uapi/linux/nvgpu-t18x.h @@ -33,6 +33,12 @@ */ #define NVGPU_AS_MAP_BUFFER_FLAGS_IO_COHERENT (1 << 4) +/* + * this flag is used in struct nvgpu_alloc_gpfifo_args + * to enable re-playable faults for that channel + */ +#define NVGPU_ALLOC_GPFIFO_FLAGS_REPLAYABLE_FAULTS_ENABLE (1 << 2) + #endif /* _UAPI__LINUX_NVGPU_T18X_IOCTL_H_ */