diff options
author | Richard Zhao <rizhao@nvidia.com> | 2017-08-10 19:34:16 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-08-11 14:08:41 -0400 |
commit | 3197a918d5052c71ad854f6b22fdb35bfe7cebe2 (patch) | |
tree | 887f155d104926d38d74583739bacf57a57c040b /drivers/gpu/nvgpu/common/linux/ioctl_tsg_t19x.c | |
parent | de8e057f7eebcfe676278826ab457bf86b1b36fd (diff) |
gpu: nvgpu: gv11b: add max_subctx_count to g->fifo.t19x
- For better performance. It used to read register every time referencing
max_subctx_count.
- Avoid reading registers for vgpu.
Jira VFND-3797
Change-Id: Id6e6b15a0d9a035795e8a9a2c6bb63524c5eb544
Signed-off-by: Richard Zhao <rizhao@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1537009
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
Reviewed-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/ioctl_tsg_t19x.c')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/ioctl_tsg_t19x.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/ioctl_tsg_t19x.c b/drivers/gpu/nvgpu/common/linux/ioctl_tsg_t19x.c index bf6088ab..b0b1f9c4 100644 --- a/drivers/gpu/nvgpu/common/linux/ioctl_tsg_t19x.c +++ b/drivers/gpu/nvgpu/common/linux/ioctl_tsg_t19x.c | |||
@@ -44,7 +44,7 @@ static int gv11b_tsg_ioctl_bind_channel_ex(struct gk20a *g, | |||
44 | ch = gk20a_get_channel_from_file(arg->channel_fd); | 44 | ch = gk20a_get_channel_from_file(arg->channel_fd); |
45 | if (!ch) | 45 | if (!ch) |
46 | return -EINVAL; | 46 | return -EINVAL; |
47 | if (arg->subcontext_id < gv11b_get_max_subctx_count(g)) | 47 | if (arg->subcontext_id < g->fifo.t19x.max_subctx_count) |
48 | ch->t19x.subctx_id = arg->subcontext_id; | 48 | ch->t19x.subctx_id = arg->subcontext_id; |
49 | else | 49 | else |
50 | return -EINVAL; | 50 | return -EINVAL; |