summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gp10b/hw_top_gp10b.h
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2016-05-13 15:22:21 -0400
committerDeepak Nibade <dnibade@nvidia.com>2016-12-27 04:56:15 -0500
commit1f225fa73167ec31c9332e4031c156d8b04a41f6 (patch)
treee8fe7949af669bf7bd7bfaf0766946d63b079303 /drivers/gpu/nvgpu/gp10b/hw_top_gp10b.h
parent2580fa57fb4d1c0b6c002bade851a358ac867b24 (diff)
gpu: nvgpu: Implement engine_enum_from_type
Implement a helper function engine_enum_from_type. This allows parsing device_info entries for LCE engine type. Pascal has logical copy engine instead of CE2, so so add definition of that. Change-Id: I71f59c308641d84ac59fd57fc37d9b627bb07a43 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/1147747 Reviewed-by: Konsta Holtta <kholtta@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gp10b/hw_top_gp10b.h')
-rw-r--r--drivers/gpu/nvgpu/gp10b/hw_top_gp10b.h38
1 files changed, 33 insertions, 5 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/hw_top_gp10b.h b/drivers/gpu/nvgpu/gp10b/hw_top_gp10b.h
index ab6f6373..5376717f 100644
--- a/drivers/gpu/nvgpu/gp10b/hw_top_gp10b.h
+++ b/drivers/gpu/nvgpu/gp10b/hw_top_gp10b.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved. 2 * Copyright (c) 2014-2016, 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,
@@ -138,13 +138,37 @@ static inline u32 top_device_info_type_enum_graphics_f(void)
138{ 138{
139 return 0x0; 139 return 0x0;
140} 140}
141static inline u32 top_device_info_type_enum_copy0_v(void) 141static inline u32 top_device_info_type_enum_copy2_v(void)
142{ 142{
143 return 0x00000001; 143 return 0x00000003;
144}
145static inline u32 top_device_info_type_enum_copy2_f(void)
146{
147 return 0xc;
148}
149static inline u32 top_device_info_type_enum_lce_v(void)
150{
151 return 0x00000013;
152}
153static inline u32 top_device_info_type_enum_lce_f(void)
154{
155 return 0x4c;
156}
157static inline u32 top_device_info_engine_v(u32 r)
158{
159 return (r >> 5) & 0x1;
160}
161static inline u32 top_device_info_runlist_v(u32 r)
162{
163 return (r >> 4) & 0x1;
164}
165static inline u32 top_device_info_intr_v(u32 r)
166{
167 return (r >> 3) & 0x1;
144} 168}
145static inline u32 top_device_info_type_enum_copy0_f(void) 169static inline u32 top_device_info_reset_v(u32 r)
146{ 170{
147 return 0x4; 171 return (r >> 2) & 0x1;
148} 172}
149static inline u32 top_device_info_entry_v(u32 r) 173static inline u32 top_device_info_entry_v(u32 r)
150{ 174{
@@ -158,4 +182,8 @@ static inline u32 top_device_info_entry_enum_v(void)
158{ 182{
159 return 0x00000002; 183 return 0x00000002;
160} 184}
185static inline u32 top_device_info_entry_engine_type_v(void)
186{
187 return 0x00000002;
188}
161#endif 189#endif