diff options
author | Seema Khowala <seemaj@nvidia.com> | 2018-12-27 22:23:06 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2019-03-18 14:30:16 -0400 |
commit | e00804594b83781bc9f7c17ac68cd9c5dd30953c (patch) | |
tree | f687d4da54c3b2afc867b8fcdde12bf8489f95f3 /drivers/gpu/nvgpu/vgpu/gr_vgpu.c | |
parent | 0c47ce7d72e4c95ca293a222e2462f52683838a3 (diff) |
gpu: nvgpu: remove gk20a_is_channel_marked_as_tsg
Use tsg_gk20a_from_ch to get tsg pointer for tsgid of a channel. For
invalid tsgid, tsg pointer will be NULL
Bug 2092051
Bug 2429295
Bug 2484211
Change-Id: I82cd6a2dc5fab4acb147202af667ca97a2842a73
Signed-off-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2006722
Signed-off-by: Debarshi Dutta <ddutta@nvidia.com>
(cherry picked from commit 13f37f9c70b9ae2e0d179830cded93a0a6f86494
in dev-kernel)
Reviewed-on: https://git-master.nvidia.com/r/2025507
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/vgpu/gr_vgpu.c')
-rw-r--r-- | drivers/gpu/nvgpu/vgpu/gr_vgpu.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/vgpu/gr_vgpu.c b/drivers/gpu/nvgpu/vgpu/gr_vgpu.c index 6a86c9a0..e3b1888e 100644 --- a/drivers/gpu/nvgpu/vgpu/gr_vgpu.c +++ b/drivers/gpu/nvgpu/vgpu/gr_vgpu.c | |||
@@ -501,7 +501,6 @@ static int vgpu_gr_tsg_bind_gr_ctx(struct tsg_gk20a *tsg) | |||
501 | int vgpu_gr_alloc_obj_ctx(struct channel_gk20a *c, u32 class_num, u32 flags) | 501 | int vgpu_gr_alloc_obj_ctx(struct channel_gk20a *c, u32 class_num, u32 flags) |
502 | { | 502 | { |
503 | struct gk20a *g = c->g; | 503 | struct gk20a *g = c->g; |
504 | struct fifo_gk20a *f = &g->fifo; | ||
505 | struct nvgpu_gr_ctx *gr_ctx = NULL; | 504 | struct nvgpu_gr_ctx *gr_ctx = NULL; |
506 | struct tsg_gk20a *tsg = NULL; | 505 | struct tsg_gk20a *tsg = NULL; |
507 | int err = 0; | 506 | int err = 0; |
@@ -522,10 +521,11 @@ int vgpu_gr_alloc_obj_ctx(struct channel_gk20a *c, u32 class_num, u32 flags) | |||
522 | } | 521 | } |
523 | c->obj_class = class_num; | 522 | c->obj_class = class_num; |
524 | 523 | ||
525 | if (!gk20a_is_channel_marked_as_tsg(c)) | 524 | tsg = tsg_gk20a_from_ch(c); |
525 | if (tsg == NULL) { | ||
526 | return -EINVAL; | 526 | return -EINVAL; |
527 | } | ||
527 | 528 | ||
528 | tsg = &f->tsg[c->tsgid]; | ||
529 | gr_ctx = &tsg->gr_ctx; | 529 | gr_ctx = &tsg->gr_ctx; |
530 | 530 | ||
531 | if (!nvgpu_mem_is_valid(&gr_ctx->mem)) { | 531 | if (!nvgpu_mem_is_valid(&gr_ctx->mem)) { |