summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/include
diff options
context:
space:
mode:
authorSeema Khowala <seemaj@nvidia.com>2017-03-16 18:04:29 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-04-04 19:04:26 -0400
commit2766420dfbe15e539a4b9514bbf41480fc636a28 (patch)
treea3e4b831f81ffd9bda4d769ed73d6b71b995a13b /drivers/gpu/nvgpu/include
parent7b5f1bd68d8e4b90d0d5d861dbea256d982c69e5 (diff)
gpu: nvgpu: gv11b: implement teardown_ch_tsg fifo ops
Context TSG teardown procedure: 1. Disable scheduling for the engine's runlist via NV_PFIFO_SCHED_DISABLE. This enables SW to determine whether a context has hung later in the process: otherwise, ongoing work on the runlist may keep ENG_STATUS from reaching a steady state. 2. Disable all channels in the TSG being torn down or submit a new runlist that does not contain the TSG. This is to prevent the TSG from being rescheduled once scheduling is reenabled in step 6. 3. Initiate a preempt of the engine by writing the bit associated with its runlist to NV_PFIFO_RUNLIST_PREEMPT. This allows to begin the preempt process prior to doing the slow register reads needed to determine whether the context has hit any interrupts or is hung. Do not poll NV_PFIFO_RUNLIST_PREEMPT for the preempt to complete. 4. Check for interrupts or hangs while waiting for the preempt to complete. During the pbdma/eng preempt finish polling, any stalling interrupts relating to runlist must be detected and handled in order for the preemption to complete. 5. If a reset is needed as determined by step 4: a. Halt the memory interface for the engine (as per the relevant engine procedure). b. Reset the engine via NV_PMC_ENABLE. c. Take the engine out of reset and reinit the engine (as per relevant engine procedure) 6. Re-enable scheduling for the engine's runlist via NV_PFIFO_SCHED_ENABLE. JIRA GPUT19X-7 Change-Id: I1354dd12b4a4f0e4b4a8d9721581126c02288a85 Signed-off-by: Seema Khowala <seemaj@nvidia.com> Reviewed-on: http://git-master/r/1327931 Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/include')
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_fifo_gv11b.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_fifo_gv11b.h b/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_fifo_gv11b.h
index b9249128..f05df49e 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_fifo_gv11b.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_fifo_gv11b.h
@@ -318,6 +318,22 @@ static inline u32 fifo_sched_disable_true_v(void)
318{ 318{
319 return 0x00000001; 319 return 0x00000001;
320} 320}
321static inline u32 fifo_runlist_preempt_r(void)
322{
323 return 0x00002638;
324}
325static inline u32 fifo_runlist_preempt_runlist_f(u32 v, u32 i)
326{
327 return (v & 0x1) << (0 + i*1);
328}
329static inline u32 fifo_runlist_preempt_runlist_m(u32 i)
330{
331 return 0x1 << (0 + i*1);
332}
333static inline u32 fifo_runlist_preempt_runlist_pending_v(void)
334{
335 return 0x00000001;
336}
321static inline u32 fifo_preempt_r(void) 337static inline u32 fifo_preempt_r(void)
322{ 338{
323 return 0x00002634; 339 return 0x00002634;