summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/include
diff options
context:
space:
mode:
authorDeepak Nibade <dnibade@nvidia.com>2017-09-13 08:05:03 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-09-15 15:48:21 -0400
commit52f50addc6cedf57fc3d8ff06314921499fb59e3 (patch)
treebd09a629f0a3c3e15bb4b8a98d9a9e3adcd2570a /drivers/gpu/nvgpu/include
parent56d03664d00f77fa760757467e23d9dbc1a08cf8 (diff)
gpu: nvgpu: add TSG enable/disable operations
Add TSG enable/disable operations for gv11b/gv100 To disable a TSG we continue to use gk20a_disable_tsg() To enable a TSG add new API gv11b_fifo_enable_tsg() since TSG enable sequence is different for Volta than previous versions For Volta it is sufficient to loop over all the channels in TSG and enable them sequentially Bug 1739362 Change-Id: Id4b4684959204c6101ceda83487a41fbfcba8b5f Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1560642 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Seshendra Gadagottu <sgadagottu@nvidia.com> Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/include')
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/hw/gv100/hw_ccsr_gv100.h36
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_ccsr_gv11b.h38
2 files changed, 73 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/hw/gv100/hw_ccsr_gv100.h b/drivers/gpu/nvgpu/include/nvgpu/hw/gv100/hw_ccsr_gv100.h
index f64f542c..664c0b80 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/hw/gv100/hw_ccsr_gv100.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/hw/gv100/hw_ccsr_gv100.h
@@ -110,6 +110,42 @@ static inline u32 ccsr_channel_status_v(u32 r)
110{ 110{
111 return (r >> 24) & 0xf; 111 return (r >> 24) & 0xf;
112} 112}
113static inline u32 ccsr_channel_status_pending_ctx_reload_v(void)
114{
115 return 0x00000002;
116}
117static inline u32 ccsr_channel_status_pending_acq_ctx_reload_v(void)
118{
119 return 0x00000004;
120}
121static inline u32 ccsr_channel_status_on_pbdma_ctx_reload_v(void)
122{
123 return 0x0000000a;
124}
125static inline u32 ccsr_channel_status_on_pbdma_and_eng_ctx_reload_v(void)
126{
127 return 0x0000000b;
128}
129static inline u32 ccsr_channel_status_on_eng_ctx_reload_v(void)
130{
131 return 0x0000000c;
132}
133static inline u32 ccsr_channel_status_on_eng_pending_ctx_reload_v(void)
134{
135 return 0x0000000d;
136}
137static inline u32 ccsr_channel_status_on_eng_pending_acq_ctx_reload_v(void)
138{
139 return 0x0000000e;
140}
141static inline u32 ccsr_channel_next_v(u32 r)
142{
143 return (r >> 1) & 0x1;
144}
145static inline u32 ccsr_channel_next_true_v(void)
146{
147 return 0x00000001;
148}
113static inline u32 ccsr_channel_pbdma_faulted_f(u32 v) 149static inline u32 ccsr_channel_pbdma_faulted_f(u32 v)
114{ 150{
115 return (v & 0x1) << 22; 151 return (v & 0x1) << 22;
diff --git a/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_ccsr_gv11b.h b/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_ccsr_gv11b.h
index 618c4806..7e30c34b 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_ccsr_gv11b.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_ccsr_gv11b.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. 2 * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved.
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify it 4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License, 5 * under the terms and conditions of the GNU General Public License,
@@ -110,6 +110,42 @@ static inline u32 ccsr_channel_status_v(u32 r)
110{ 110{
111 return (r >> 24) & 0xf; 111 return (r >> 24) & 0xf;
112} 112}
113static inline u32 ccsr_channel_status_pending_ctx_reload_v(void)
114{
115 return 0x00000002;
116}
117static inline u32 ccsr_channel_status_pending_acq_ctx_reload_v(void)
118{
119 return 0x00000004;
120}
121static inline u32 ccsr_channel_status_on_pbdma_ctx_reload_v(void)
122{
123 return 0x0000000a;
124}
125static inline u32 ccsr_channel_status_on_pbdma_and_eng_ctx_reload_v(void)
126{
127 return 0x0000000b;
128}
129static inline u32 ccsr_channel_status_on_eng_ctx_reload_v(void)
130{
131 return 0x0000000c;
132}
133static inline u32 ccsr_channel_status_on_eng_pending_ctx_reload_v(void)
134{
135 return 0x0000000d;
136}
137static inline u32 ccsr_channel_status_on_eng_pending_acq_ctx_reload_v(void)
138{
139 return 0x0000000e;
140}
141static inline u32 ccsr_channel_next_v(u32 r)
142{
143 return (r >> 1) & 0x1;
144}
145static inline u32 ccsr_channel_next_true_v(void)
146{
147 return 0x00000001;
148}
113static inline u32 ccsr_channel_pbdma_faulted_f(u32 v) 149static inline u32 ccsr_channel_pbdma_faulted_f(u32 v)
114{ 150{
115 return (v & 0x1) << 22; 151 return (v & 0x1) << 22;