From 2f6698b863c9cc1db6455637b7c72e812b470b93 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Fri, 15 Dec 2017 09:04:15 -0800 Subject: 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 Reviewed-on: https://git-master.nvidia.com/r/1639532 Reviewed-by: Seshendra Gadagottu Tested-by: Seshendra Gadagottu Reviewed-by: svc-mobile-coverity GVS: Gerrit_Virtual_Submit Reviewed-by: Konsta Holtta Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/linux/sched.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'drivers/gpu/nvgpu/common/linux/sched.c') 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, arg->runlist_interleave = tsg->interleave_level; arg->timeslice = tsg->timeslice_us; - if (tsg->tsg_gr_ctx) { - arg->graphics_preempt_mode = - tsg->tsg_gr_ctx->graphics_preempt_mode; - arg->compute_preempt_mode = - tsg->tsg_gr_ctx->compute_preempt_mode; - } else { - arg->graphics_preempt_mode = 0; - arg->compute_preempt_mode = 0; - } + arg->graphics_preempt_mode = + tsg->gr_ctx.graphics_preempt_mode; + arg->compute_preempt_mode = + tsg->gr_ctx.compute_preempt_mode; nvgpu_ref_put(&tsg->refcount, nvgpu_ioctl_tsg_release); -- cgit v1.2.2