summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gm20b/fifo_gm20b.c
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/gm20b/fifo_gm20b.c
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/gm20b/fifo_gm20b.c')
-rw-r--r--drivers/gpu/nvgpu/gm20b/fifo_gm20b.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gm20b/fifo_gm20b.c b/drivers/gpu/nvgpu/gm20b/fifo_gm20b.c
index e738b1d2..a6d953a4 100644
--- a/drivers/gpu/nvgpu/gm20b/fifo_gm20b.c
+++ b/drivers/gpu/nvgpu/gm20b/fifo_gm20b.c
@@ -126,4 +126,5 @@ void gm20b_init_fifo(struct gpu_ops *gops)
126 gops->fifo.get_pbdma_signature = gk20a_fifo_get_pbdma_signature; 126 gops->fifo.get_pbdma_signature = gk20a_fifo_get_pbdma_signature;
127 gops->fifo.set_runlist_interleave = gk20a_fifo_set_runlist_interleave; 127 gops->fifo.set_runlist_interleave = gk20a_fifo_set_runlist_interleave;
128 gops->fifo.force_reset_ch = gk20a_fifo_force_reset_ch; 128 gops->fifo.force_reset_ch = gk20a_fifo_force_reset_ch;
129 gops->fifo.engine_enum_from_type = gk20a_fifo_engine_enum_from_type;
129} 130}