diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/fifo_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c index ccc3afca..2daeb1d0 100644 --- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * GK20A Graphics FIFO (gr host) | 2 | * GK20A Graphics FIFO (gr host) |
3 | * | 3 | * |
4 | * Copyright (c) 2011-2016, NVIDIA CORPORATION. All rights reserved. | 4 | * Copyright (c) 2011-2017, NVIDIA CORPORATION. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms and conditions of the GNU General Public License, | 7 | * under the terms and conditions of the GNU General Public License, |
@@ -2870,6 +2870,22 @@ int gk20a_fifo_set_runlist_interleave(struct gk20a *g, | |||
2870 | return 0; | 2870 | return 0; |
2871 | } | 2871 | } |
2872 | 2872 | ||
2873 | int gk20a_fifo_tsg_set_timeslice(struct tsg_gk20a *tsg, u32 timeslice) | ||
2874 | { | ||
2875 | struct gk20a *g = tsg->g; | ||
2876 | |||
2877 | if (timeslice < g->min_timeslice_us || | ||
2878 | timeslice > g->max_timeslice_us) | ||
2879 | return -EINVAL; | ||
2880 | |||
2881 | gk20a_channel_get_timescale_from_timeslice(g, timeslice, | ||
2882 | &tsg->timeslice_timeout, &tsg->timeslice_scale); | ||
2883 | |||
2884 | tsg->timeslice_us = timeslice; | ||
2885 | |||
2886 | return g->ops.fifo.update_runlist(g, tsg->runlist_id, ~0, true, true); | ||
2887 | } | ||
2888 | |||
2873 | static int gk20a_fifo_update_runlist_locked(struct gk20a *g, u32 runlist_id, | 2889 | static int gk20a_fifo_update_runlist_locked(struct gk20a *g, u32 runlist_id, |
2874 | u32 hw_chid, bool add, | 2890 | u32 hw_chid, bool add, |
2875 | bool wait_for_finish) | 2891 | bool wait_for_finish) |
@@ -3296,6 +3312,7 @@ void gk20a_init_fifo(struct gpu_ops *gops) | |||
3296 | gops->fifo.get_num_fifos = gk20a_fifo_get_num_fifos; | 3312 | gops->fifo.get_num_fifos = gk20a_fifo_get_num_fifos; |
3297 | gops->fifo.get_pbdma_signature = gk20a_fifo_get_pbdma_signature; | 3313 | gops->fifo.get_pbdma_signature = gk20a_fifo_get_pbdma_signature; |
3298 | gops->fifo.set_runlist_interleave = gk20a_fifo_set_runlist_interleave; | 3314 | gops->fifo.set_runlist_interleave = gk20a_fifo_set_runlist_interleave; |
3315 | gops->fifo.tsg_set_timeslice = gk20a_fifo_tsg_set_timeslice; | ||
3299 | gops->fifo.force_reset_ch = gk20a_fifo_force_reset_ch; | 3316 | gops->fifo.force_reset_ch = gk20a_fifo_force_reset_ch; |
3300 | gops->fifo.engine_enum_from_type = gk20a_fifo_engine_enum_from_type; | 3317 | gops->fifo.engine_enum_from_type = gk20a_fifo_engine_enum_from_type; |
3301 | /* gk20a doesn't support device_info_data packet parsing */ | 3318 | /* gk20a doesn't support device_info_data packet parsing */ |