summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2016-05-13 10:56:43 -0400
committerTerje Bergstrom <tbergstrom@nvidia.com>2016-05-18 11:15:11 -0400
commit67a41e46a230cde7353e4cd46040f1e71d7cd289 (patch)
tree0697ce5ba224db6a92cdab0b192a8069f669be63 /drivers/gpu/nvgpu/gk20a/fifo_gk20a.h
parent8f48afe26bc39fd7508646e8c3ea6bfeb665beae (diff)
gpu: nvgpu: Read all fields of device_info
We were not using the engine_type field in device info, and the code did not handle chained entries properly. The code assumed that first entry is for graphics and second for CE, which is not always true. Improve the code to go through all entries of device_info, and preserve values across entries until we reach the last entry. Only last entry triggers a write to fifo engine info. There can also be multiple engines with same type, so accumulate interrupts and reset ids from all of them. As the code got fixed, now it reads the engine enum correctly from hardware. We used to compare that against CE0, but we should compare against CE2. gk20a_fifo_reset_engine() uses wrong constants - it is passed a internal numbering of engines, but it compares them against hardware engine enum. Change-Id: Ia59273921c602d2a090f7a5b1404afb0fca2532c Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/1147746 Reviewed-by: Konsta Holtta <kholtta@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/fifo_gk20a.h')
-rw-r--r--drivers/gpu/nvgpu/gk20a/fifo_gk20a.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h
index c95ba71c..e795eba0 100644
--- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h
@@ -79,8 +79,8 @@ struct fifo_mmu_fault_info_gk20a {
79struct fifo_engine_info_gk20a { 79struct fifo_engine_info_gk20a {
80 u32 engine_id; 80 u32 engine_id;
81 u32 runlist_id; 81 u32 runlist_id;
82 u32 intr_id; 82 u32 intr_mask;
83 u32 reset_id; 83 u32 reset_mask;
84 u32 pbdma_id; 84 u32 pbdma_id;
85 struct fifo_pbdma_exception_info_gk20a pbdma_exception_info; 85 struct fifo_pbdma_exception_info_gk20a pbdma_exception_info;
86 struct fifo_engine_exception_info_gk20a engine_exception_info; 86 struct fifo_engine_exception_info_gk20a engine_exception_info;
@@ -222,5 +222,6 @@ void gk20a_fifo_debugfs_init(struct device *dev);
222 222
223const char *gk20a_fifo_interleave_level_name(u32 interleave_level); 223const char *gk20a_fifo_interleave_level_name(u32 interleave_level);
224 224
225int gk20a_fifo_engine_enum_from_type(struct gk20a *g, u32 engine_type);
225 226
226#endif /*__GR_GK20A_H__*/ 227#endif /*__GR_GK20A_H__*/