summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/linux/sched.c
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2017-12-15 12:04:15 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2018-01-17 15:29:09 -0500
commit2f6698b863c9cc1db6455637b7c72e812b470b93 (patch)
treed0c8abf32d6994b9f54bf5eddafd8316e038c829 /drivers/gpu/nvgpu/common/linux/sched.c
parent6a73114788ffafe4c53771c707ecbd9c9ea0a117 (diff)
gpu: nvgpu: Make graphics context property of TSG
Move graphics context ownership to TSG instead of channel. Combine channel_ctx_gk20a and gr_ctx_desc to one structure, because the split between them was arbitrary. Move context header to be property of channel. Bug 1842197 Change-Id: I410e3262f80b318d8528bcbec270b63a2d8d2ff9 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1639532 Reviewed-by: Seshendra Gadagottu <sgadagottu@nvidia.com> Tested-by: Seshendra Gadagottu <sgadagottu@nvidia.com> Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/sched.c')
-rw-r--r--drivers/gpu/nvgpu/common/linux/sched.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/sched.c b/drivers/gpu/nvgpu/common/linux/sched.c
index fc3f6ed8..e6211790 100644
--- a/drivers/gpu/nvgpu/common/linux/sched.c
+++ b/drivers/gpu/nvgpu/common/linux/sched.c
@@ -198,15 +198,10 @@ static int gk20a_sched_dev_ioctl_get_params(struct gk20a_sched_ctrl *sched,
198 arg->runlist_interleave = tsg->interleave_level; 198 arg->runlist_interleave = tsg->interleave_level;
199 arg->timeslice = tsg->timeslice_us; 199 arg->timeslice = tsg->timeslice_us;
200 200
201 if (tsg->tsg_gr_ctx) { 201 arg->graphics_preempt_mode =
202 arg->graphics_preempt_mode = 202 tsg->gr_ctx.graphics_preempt_mode;
203 tsg->tsg_gr_ctx->graphics_preempt_mode; 203 arg->compute_preempt_mode =
204 arg->compute_preempt_mode = 204 tsg->gr_ctx.compute_preempt_mode;
205 tsg->tsg_gr_ctx->compute_preempt_mode;
206 } else {
207 arg->graphics_preempt_mode = 0;
208 arg->compute_preempt_mode = 0;
209 }
210 205
211 nvgpu_ref_put(&tsg->refcount, nvgpu_ioctl_tsg_release); 206 nvgpu_ref_put(&tsg->refcount, nvgpu_ioctl_tsg_release);
212 207