diff options
author | Vinod G <vinodg@nvidia.com> | 2018-08-29 15:32:25 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-08-31 21:57:23 -0400 |
commit | f187e0bf442c3b0a08c46b21196f06a18c8220a0 (patch) | |
tree | 48820c076f6ab4a2bad6ab6053d26293c99326c3 /drivers/gpu/nvgpu/gk20a | |
parent | b25d5d86caa049201ddcea77cf1a733a85090698 (diff) |
gpu: nvgpu: Move SM_MASK_TYPE setting to TSG level
Moved the SM_MASK_TYPE variable from GR to
TSG struct. SM error registers are context based.
In dbg_session IOCTL to SET_SM_MASK_TYPE, kernel
code iterate the TSG associated with first channel
and set the mask_type to that context.
Bug 200412641
Change-Id: Ic91944037ad2447f403b4803d5266ae6250ba4c9
Signed-off-by: Vinod G <vinodg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1809322
Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.h | 6 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gr_gk20a.h | 5 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/tsg_gk20a.c | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/tsg_gk20a.h | 4 |
4 files changed, 6 insertions, 11 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.h b/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.h index 4d3c4d74..50002557 100644 --- a/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.h | |||
@@ -72,12 +72,6 @@ struct dbg_session_gk20a { | |||
72 | bool broadcast_stop_trigger; | 72 | bool broadcast_stop_trigger; |
73 | 73 | ||
74 | struct nvgpu_mutex ioctl_lock; | 74 | struct nvgpu_mutex ioctl_lock; |
75 | |||
76 | /* | ||
77 | * sm set exception type mask flag, to check whether | ||
78 | * exception type mask is requested or not. | ||
79 | */ | ||
80 | bool is_sm_exception_type_mask_set; | ||
81 | }; | 75 | }; |
82 | 76 | ||
83 | struct dbg_session_data { | 77 | struct dbg_session_data { |
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.h b/drivers/gpu/nvgpu/gk20a/gr_gk20a.h index 0d32cca3..303e1f53 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.h | |||
@@ -420,11 +420,6 @@ struct gr_gk20a { | |||
420 | u32 no_of_sm; | 420 | u32 no_of_sm; |
421 | struct sm_info *sm_to_cluster; | 421 | struct sm_info *sm_to_cluster; |
422 | 422 | ||
423 | #define NVGPU_SM_EXCEPTION_TYPE_MASK_NONE (0x0U) | ||
424 | #define NVGPU_SM_EXCEPTION_TYPE_MASK_FATAL (0x1U << 0) | ||
425 | u32 sm_exception_mask_type; | ||
426 | u32 sm_exception_mask_refcount; | ||
427 | |||
428 | #if defined(CONFIG_GK20A_CYCLE_STATS) | 423 | #if defined(CONFIG_GK20A_CYCLE_STATS) |
429 | struct nvgpu_mutex cs_lock; | 424 | struct nvgpu_mutex cs_lock; |
430 | struct gk20a_cs_snapshot *cs_data; | 425 | struct gk20a_cs_snapshot *cs_data; |
diff --git a/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c b/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c index 624ee1d7..506d4330 100644 --- a/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c | |||
@@ -304,6 +304,7 @@ struct tsg_gk20a *gk20a_tsg_open(struct gk20a *g, pid_t pid) | |||
304 | tsg->timeslice_scale = 0; | 304 | tsg->timeslice_scale = 0; |
305 | tsg->runlist_id = ~0; | 305 | tsg->runlist_id = ~0; |
306 | tsg->tgid = pid; | 306 | tsg->tgid = pid; |
307 | tsg->sm_exception_mask_type = NVGPU_SM_EXCEPTION_TYPE_MASK_NONE; | ||
307 | 308 | ||
308 | if (g->ops.fifo.init_eng_method_buffers) | 309 | if (g->ops.fifo.init_eng_method_buffers) |
309 | g->ops.fifo.init_eng_method_buffers(g, tsg); | 310 | g->ops.fifo.init_eng_method_buffers(g, tsg); |
@@ -373,6 +374,7 @@ void gk20a_tsg_release(struct nvgpu_ref *ref) | |||
373 | release_used_tsg(&g->fifo, tsg); | 374 | release_used_tsg(&g->fifo, tsg); |
374 | 375 | ||
375 | tsg->runlist_id = ~0; | 376 | tsg->runlist_id = ~0; |
377 | tsg->sm_exception_mask_type = NVGPU_SM_EXCEPTION_TYPE_MASK_NONE; | ||
376 | 378 | ||
377 | nvgpu_log(g, gpu_dbg_fn, "tsg released %d\n", tsg->tsgid); | 379 | nvgpu_log(g, gpu_dbg_fn, "tsg released %d\n", tsg->tsgid); |
378 | } | 380 | } |
diff --git a/drivers/gpu/nvgpu/gk20a/tsg_gk20a.h b/drivers/gpu/nvgpu/gk20a/tsg_gk20a.h index 67ccb9f5..1e3be553 100644 --- a/drivers/gpu/nvgpu/gk20a/tsg_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/tsg_gk20a.h | |||
@@ -78,6 +78,10 @@ struct tsg_gk20a { | |||
78 | bool in_use; | 78 | bool in_use; |
79 | 79 | ||
80 | struct nvgpu_tsg_sm_error_state *sm_error_states; | 80 | struct nvgpu_tsg_sm_error_state *sm_error_states; |
81 | |||
82 | #define NVGPU_SM_EXCEPTION_TYPE_MASK_NONE (0x0U) | ||
83 | #define NVGPU_SM_EXCEPTION_TYPE_MASK_FATAL (0x1U << 0) | ||
84 | u32 sm_exception_mask_type; | ||
81 | }; | 85 | }; |
82 | 86 | ||
83 | int gk20a_enable_tsg(struct tsg_gk20a *tsg); | 87 | int gk20a_enable_tsg(struct tsg_gk20a *tsg); |