summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/include
diff options
context:
space:
mode:
authorAlex Waterman <alexw@nvidia.com>2017-01-17 17:04:09 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2017-01-24 18:15:22 -0500
commit6715361156343afc6024513a6618ee4c89cbf49b (patch)
treeea03e86db83a6062395a0f44c11611c33250504b /drivers/gpu/nvgpu/include
parentefe32664311677c87d4da4f0f0e36d519bcc5c16 (diff)
gpu: nvgpu: Add GPU reset for gp106 XVE
Resets the GPU without resetting the XVE/XP interfaces. This allows the GPU to stay attached to the PCI bus but still resets all the rest of the GPU's internal state. Bug 1816516 Signed-off-by: Alex Waterman <alexw@nvidia.com> Reviewed-on: http://git-master/r/1287644 Reviewed-on: http://git-master/r/1287650 (cherry picked from commit c14efaee5d03a053d5bf229425a7594e1c6bfad0) Change-Id: If7aba3cc8109e30bd6b6aa145836e812d50b35c5 Reviewed-on: http://git-master/r/1292699 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/gp106/hw_xve_gp106.h50
1 files changed, 49 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/hw/gp106/hw_xve_gp106.h b/drivers/gpu/nvgpu/include/nvgpu/hw/gp106/hw_xve_gp106.h
index 24434ae0..bfcb4883 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/hw/gp106/hw_xve_gp106.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/hw/gp106/hw_xve_gp106.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,
@@ -146,4 +146,52 @@ static inline u32 xve_priv_xv_cya_l1_enable_v(u32 r)
146{ 146{
147 return (r >> 8) & 0x1; 147 return (r >> 8) & 0x1;
148} 148}
149static inline u32 xve_reset_r(void)
150{
151 return 0x00000718;
152}
153static inline u32 xve_reset_reset_m(void)
154{
155 return 0x1 << 0;
156}
157static inline u32 xve_reset_gpu_on_sw_reset_m(void)
158{
159 return 0x1 << 1;
160}
161static inline u32 xve_reset_counter_en_m(void)
162{
163 return 0x1 << 2;
164}
165static inline u32 xve_reset_counter_val_f(u32 v)
166{
167 return (v & 0x7ff) << 4;
168}
169static inline u32 xve_reset_counter_val_m(void)
170{
171 return 0x7ff << 4;
172}
173static inline u32 xve_reset_counter_val_v(u32 r)
174{
175 return (r >> 4) & 0x7ff;
176}
177static inline u32 xve_reset_clock_on_sw_reset_m(void)
178{
179 return 0x1 << 15;
180}
181static inline u32 xve_reset_clock_counter_en_m(void)
182{
183 return 0x1 << 16;
184}
185static inline u32 xve_reset_clock_counter_val_f(u32 v)
186{
187 return (v & 0x7ff) << 17;
188}
189static inline u32 xve_reset_clock_counter_val_m(void)
190{
191 return 0x7ff << 17;
192}
193static inline u32 xve_reset_clock_counter_val_v(u32 r)
194{
195 return (r >> 17) & 0x7ff;
196}
149#endif 197#endif