diff options
author | Richard Zhao <rizhao@nvidia.com> | 2016-05-09 20:24:49 -0400 |
---|---|---|
committer | Terje Bergstrom <tbergstrom@nvidia.com> | 2016-05-31 13:47:47 -0400 |
commit | 7a134457a840118ed02967a3c0bc4b4f248837ea (patch) | |
tree | 9d633695abe78b95481b459a77cc905af18e9d17 /drivers/gpu/nvgpu/gk20a | |
parent | d707c5a444e024e1184213a75f44a73dbb1707d2 (diff) |
gpu: nvgpu: vgpu: add tsg set timeslice support
Bug 1702773
JIRA VFND-1496
Change-Id: Ice570df78d974fa59f2a932caf0e6249b13493a1
Signed-off-by: Richard Zhao <rizhao@nvidia.com>
Reviewed-on: http://git-master/r/1144929
(cherry picked from commit 8b6ec996f3773e497a040a8fe4148e01e8dc35fa)
Reviewed-on: http://git-master/r/1150705
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.h | 1 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/tsg_gk20a.c | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index 6f47f228..36bc0fb7 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h | |||
@@ -340,6 +340,7 @@ struct gpu_ops { | |||
340 | u32 new_level); | 340 | u32 new_level); |
341 | int (*channel_set_timeslice)(struct channel_gk20a *ch, | 341 | int (*channel_set_timeslice)(struct channel_gk20a *ch, |
342 | u32 timeslice); | 342 | u32 timeslice); |
343 | int (*tsg_set_timeslice)(struct tsg_gk20a *tsg, u32 timeslice); | ||
343 | int (*force_reset_ch)(struct channel_gk20a *ch, bool verbose); | 344 | int (*force_reset_ch)(struct channel_gk20a *ch, bool verbose); |
344 | int (*engine_enum_from_type)(struct gk20a *g, u32 engine_type, | 345 | int (*engine_enum_from_type)(struct gk20a *g, u32 engine_type, |
345 | u32 *inst_id); | 346 | u32 *inst_id); |
diff --git a/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c b/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c index 1e479395..5298d380 100644 --- a/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c | |||
@@ -582,7 +582,7 @@ long gk20a_tsg_dev_ioctl(struct file *filp, unsigned int cmd, | |||
582 | "failed to host gk20a for ioctl cmd: 0x%x", cmd); | 582 | "failed to host gk20a for ioctl cmd: 0x%x", cmd); |
583 | return err; | 583 | return err; |
584 | } | 584 | } |
585 | err = gk20a_tsg_set_timeslice(tsg, | 585 | err = g->ops.fifo.tsg_set_timeslice(tsg, |
586 | ((struct nvgpu_timeslice_args *)buf)->timeslice_us); | 586 | ((struct nvgpu_timeslice_args *)buf)->timeslice_us); |
587 | gk20a_idle(g->dev); | 587 | gk20a_idle(g->dev); |
588 | break; | 588 | break; |
@@ -607,4 +607,5 @@ void gk20a_init_tsg_ops(struct gpu_ops *gops) | |||
607 | { | 607 | { |
608 | gops->fifo.tsg_bind_channel = gk20a_tsg_bind_channel; | 608 | gops->fifo.tsg_bind_channel = gk20a_tsg_bind_channel; |
609 | gops->fifo.tsg_unbind_channel = gk20a_tsg_unbind_channel; | 609 | gops->fifo.tsg_unbind_channel = gk20a_tsg_unbind_channel; |
610 | gops->fifo.tsg_set_timeslice = gk20a_tsg_set_timeslice; | ||
610 | } | 611 | } |