summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/fifo/channel.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/common/fifo/channel.c')
-rw-r--r--drivers/gpu/nvgpu/common/fifo/channel.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/common/fifo/channel.c b/drivers/gpu/nvgpu/common/fifo/channel.c
index 6ebeb596..0f4fe850 100644
--- a/drivers/gpu/nvgpu/common/fifo/channel.c
+++ b/drivers/gpu/nvgpu/common/fifo/channel.c
@@ -1136,6 +1136,7 @@ int nvgpu_channel_setup_bind(struct channel_gk20a *c,
1136{ 1136{
1137 struct gk20a *g = c->g; 1137 struct gk20a *g = c->g;
1138 struct vm_gk20a *ch_vm; 1138 struct vm_gk20a *ch_vm;
1139 struct tsg_gk20a *tsg;
1139 u32 gpfifo_size, gpfifo_entry_size; 1140 u32 gpfifo_size, gpfifo_entry_size;
1140 u64 gpfifo_gpu_va; 1141 u64 gpfifo_gpu_va;
1141 int err = 0; 1142 int err = 0;
@@ -1176,6 +1177,16 @@ int nvgpu_channel_setup_bind(struct channel_gk20a *c,
1176 err = -EINVAL; 1177 err = -EINVAL;
1177 goto clean_up_idle; 1178 goto clean_up_idle;
1178 } 1179 }
1180
1181 /* The channel needs to be bound to a tsg at this point */
1182 tsg = tsg_gk20a_from_ch(c);
1183 if (tsg == NULL) {
1184 nvgpu_err(g,
1185 "not bound to tsg at time of setup_bind");
1186 err = -EINVAL;
1187 goto clean_up_idle;
1188 }
1189
1179 ch_vm = c->vm; 1190 ch_vm = c->vm;
1180 1191
1181 if (nvgpu_mem_is_valid(&c->gpfifo.mem) || 1192 if (nvgpu_mem_is_valid(&c->gpfifo.mem) ||