Commit Graph

124 Commits

Author SHA1 Message Date
Deepak Nibade
4dbf6f7bd6 gpu: nvgpu: define preemption modes in common code
Use common preemption modes in common code instead of using linux specific
definitions

Jira NVGPU-392

Change-Id: Iff65ab4278973f2e2d7db33f6fedb561b2164c42
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1596931
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2017-11-14 04:58:48 -08:00
Peter Daifuku
0f52023687 gpu: nvgpu: ctx_patch_write fixes
- Update commit_global_timeslice to remove unused patch parameter
- Update calls to ctx_patch_write_begin/end to add update_patch_count param

JIRA ESRM-74
Bug 2012077

Change-Id: Ie2e640dfa0ab7193a062a58f588575f220e5efd3
Signed-off-by: Peter Daifuku <pdaifuku@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1594791
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2017-11-13 18:19:28 -08:00
Terje Bergstrom
d64241cb5a gpu: nvgpu: Include UAPI explicitly
Add explicit #includes for <uapi/linux/nvgpu.h> for source code files
that depend on it.

JIRA NVGPU-388

Change-Id: I5d834e6f3b413cee9b1e4e055d710fc9f2c8f7c2
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1596246
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2017-11-13 10:57:21 -08:00
Terje Bergstrom
01e5b17e08 gpu: nvgpu: gv11b: Move sm_arch to nvgpu_gpu_params
Move sm_arch_* fields to nvgpu_gpu_params to make them available from
common code without accessing Linux specific GPU characteristics.

JIRA NVGPU-259

Change-Id: I8e7b542642b620f161d62954400777079065f49d
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1593692
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2017-11-09 19:18:39 -08:00
Sami Kiminki
075852f042 gpu: nvgpu: Switch to newer NVGPU_AS_MAP_BUFFER flags
Switch two cases using the old NVGPU_MAP_BUFFER_FLAGS_CACHEABLE_*
flags to the newer definitions, that is,
NVGPU_AS_MAP_BUFFER_FLAGS_CACHEABLE. The legacy NVGPU_MAP_BUFFER_FLAGS_*
definitions have been deleted.

Bug 1902982

Change-Id: Ifbd2678b10005b4af2375600888469b01dd09f4e
Signed-off-by: Sami Kiminki <skiminki@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1592655
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2017-11-08 09:09:19 -08:00
Deepak Nibade
d393d3294f gpu: nvgpu: use nvgpu_* APIs to allocate/free memory
Use nvgpu specific nvgpu_kcalloc()/nvgpu_kfree() calls instead of linux specific
kcalloc()/kfree()

Jira NVGPU-259

Change-Id: I73034ea23561d1269230b9ac10360f8b171b8d41
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1588221
Reviewed-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2017-11-01 00:07:11 -07:00
Terje Bergstrom
33c707d60b gpu: nvgpu: Linux specific sm_error_state_record
Create an nvgpu internal nvgpu_gr_sm_error_state to store and
propagate SM error state within driver. Use
nvgpu_dbg_gpu_sm_error_state_record only in Linux code.

JIRA NVGPU-259

Change-Id: Ia2b347d0054365bdc790b4d6f2653a568935bdb0
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1585646
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2017-10-26 13:26:30 -07:00
Peter Daifuku
1cbb5ea023 gpu: nvgpu: init_cyclestats fixes
- in the native case, replace calls for init_cyclestats with
  the gm20b version, as each chip had identical versions of the code.

- in the virtual case, use the vgpu version of the function in order
  to get the new max_css_buffer_size characteristic set to the mempool
  size.

JIRA ESRM-54
Bug 200296210

Change-Id: I475876cb392978fb1350ede58e37d0962ae095c3
Signed-off-by: Peter Daifuku <pdaifuku@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1578934
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2017-10-25 20:24:16 -07:00
seshendra Gadagottu
c6ccb5f2a1 gpu: nvgpu: gv11b: use scg perf for smid numbering
For SCG to work, smid numbering needs to be done
based on scg performance of tpcs. For gv11b and
gv11b vgpu, reuse gv100 function "gr_gv100_init_sm_id_table"
to do this.

Used local variable "index" to avoid multiple computations in
the function: gr_gv100_init_sm_id_table
index = sm_id + sm

Add deug info for printing initialized gpc/tpc/sm/global_tpc
indexs.

Bug 1842197

Change-Id: Ibf10f47f10a8ca58b86c307a22e159b2cc0d0f43
Signed-off-by: seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1583916
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2017-10-25 11:23:24 -07:00
seshendra Gadagottu
387ecf8a63 gpu: nvgpu: gv1xx: Remove HAL for restore_context_header
gr restore_context_header is not required any more after
enabling per context va mode for subcontext. Cleaning-up
unused function pointers from gv100 and gv11b HAL.

Change-Id: I65cc7d12d3c96726d323defd99726c3e259e7e63
Signed-off-by: seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1581432
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2017-10-20 10:05:40 -07:00
Terje Bergstrom
99cae3dff7 gpu: nvgpu: gv11b: Use internal nvgpu_warpstate
Replace use of ioctl structure warpstate with internal
nvgpu_warptate.

JIRA NVGPU-259

Change-Id: I003c15152042e566124c04d6124e515e36157c88
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1578683
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2017-10-17 09:25:17 -07:00
Timo Alho
a693acc5b4 Revert "gpu: nvgpu: gv11b: disable cycle stat"
This reverts commit 6647e5c956.

Bug 200352825

Change-Id: Ia44d61eafce78f99be2271e0afaf69cd5c102080
Signed-off-by: Timo Alho <talho@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1577920
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
Tested-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Srikar Srimath Tirumala <srikars@nvidia.com>
2017-10-12 13:46:09 -07:00
Seema Khowala
6647e5c956 gpu: nvgpu: gv11b: disable cycle stat
Feature will be enabled after it is verified.
To disable cycle stat, do not set
NVGPU_GPU_FLAGS_SUPPORT_CYCLE_STATS and
NVGPU_GPU_FLAGS_SUPPORT_CYCLE_STATS_SNAPSHOT

Bug 200352825

Change-Id: I3f0d58a8095f3a0996964056029c12cff45f0a5b
Signed-off-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1573760
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2017-10-10 09:22:08 -07:00
Seema Khowala
6fe9bdeb9a gpu: nvgpu: gv11b: track init veid bundle
Add debug prints to track veid bundle init
and also return err for subctx init failure.

Bug 1983643

Change-Id: I9e6a32e76b1c7deba3a47157ba253976d88b2324
Signed-off-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1568070
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2017-10-10 08:10:37 -07:00
Deepak Goyal
192afccf7c gpu: nvgpu: gv11b: skip clk gating prog for pre-si
For pre-silicon platforms, clock gating
should be skipped as it is not supported.
Added new flags "can_"x"lcg" to check platform
capability before programming SLCG,BLCG and ELCG.

Bug 200314250

Change-Id: Iec7564b00b988cdd50a02f3130662727839c5047
Signed-off-by: Deepak Goyal <dgoyal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1566251
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2017-10-04 02:27:12 -07:00
seshendra Gadagottu
9825a8ec69 gpu: nvgpu: fix handling of EGPC_ETPC_SM addresses
Implemented litter values for following defines:
GPU_LIT_SMPC_PRI_BASE
GPU_LIT_SMPC_PRI_SHARED_BASE
GPU_LIT_SMPC_PRI_UNIQUE_BASE9
GPU_LIT_SMPC_PRI_STRIDE

Added broadcast flags for smpc

Handled all combinations of broadcast/unicast EGPC, ETPC, SM

Bug 200337994

Change-Id: I7aa3c4d9ac4e819010061d44fb5a40056762f518
Signed-off-by: seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1539075
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
2017-09-26 17:29:23 -07:00
Terje Bergstrom
d61643c020 gpu: nvgpu: gv11b: Change license for common files to MIT
Change license of OS independent source code files to MIT.

JIRA NVGPU-218

Change-Id: I93c0504f0544ee8ced4898c386b3f5fbaa6a99a9
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1567804
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: David Martinez Nieto <dmartineznie@nvidia.com>
Reviewed-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
2017-09-25 17:03:31 -07:00
Alexander Lewkowicz
1586a9f004 gpu: nvgpu: gv11b: Fix sm lock down
Volta traphandler RM changes

Sm lock-down is not being executed correctly. This results in a
GPU being in an undefined state. A similar bug fix was already
provided on the resman implementation. This fix is inspired by the
CL change 21183102.
That change refers to bug http://nvbugs/1800484 and bug
http://nvbugs/200162542

This patch solves the issues mention in bug http://nvbugs/1992522

Change-Id: I601fef7c94e5ba419d7bf854877fa7a9f9b82cfa
Signed-off-by: Alexander Lewkowicz <alewkowicz@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1563815
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2017-09-20 15:58:08 -07:00
seshendra Gadagottu
0420dd383e gpu: nvgpu: gv11b: Initialize ctxsw hdr counters
Initlize following context  switch header counters for
gv11b:
ctxsw_prog_main_image_num_save_ops
ctxsw_prog_main_image_num_restore_ops
ctxsw_prog_main_image_num_wfi_save_ops
ctxsw_prog_main_image_num_cta_save_ops
ctxsw_prog_main_image_num_gfxp_save_ops
ctxsw_prog_main_image_num_cilp_save_ops

Reused gp10b gr hal function gr_gp10b_init_ctxsw_hdr_data()
for this.

Bug 1958308

Signed-off-by: seshendra Gadagottu <sgadagottu@nvidia.com>
Change-Id: I10d83e35ccd8cba517ebaba1f0e5bec5a0f68ba5
Reviewed-on: https://git-master.nvidia.com/r/1562655
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
GVS: Gerrit_Virtual_Submit
2017-09-19 17:45:28 -07:00
seshendra Gadagottu
cedb24c7a0 gpu: nvgpu: gv11b: correct wl reg offset
Corrected whitelist register address offset for
gr_pri_gpcs_tpcs_sm_disp_ctrl. This offset value is
changed for gv11b from gp10b. With wrong offset value,
gl tests are generating "unhandled fecs error interrupt
0x00000002 for channel xxx".

Bug 1958308

Change-Id: Iabfbb20ea1ee4ca8567d0cda940fa1e8cbff1bac
Signed-off-by: seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1562615
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
GVS: Gerrit_Virtual_Submit
2017-09-19 17:45:27 -07:00
Sunny He
866165749a gpu: nvgpu: Reorg gr HAL initialization
Reorganize HAL initialization to remove inheritance and construct
the gpu_ops struct at compile time. This patch only covers the
gr sub-module of the gpu_ops struct.

Perform HAL function assignments in hal_gxxxx.c through the
population of a chip-specific copy of gpu_ops.

Jira NVGPU-74

Change-Id: I8feaa95a9830969221f7ac70a5ef61cdf25094c3
Signed-off-by: Sunny He <suhe@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1542988
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2017-08-24 09:34:43 -07:00
Alexander Lewkowicz
bacbc73312 gpu: nvgpu: gv11b: Fix computation of offset
When reading NV_PGRAPH_PRI_GPC0_TPC1_SM1_DBGR_STATUS0, we are not
reading the expected value. The offset of the sm is not added to the
PRI.

JIRA GPUT19X-75

bug: ?

Change-Id: I2eeb24505e928044c3a3331fa5f493a3f118a3c8
Signed-off-by: Alexander Lewkowicz <alewkowicz@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1533953
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2017-08-15 08:20:25 -07:00
Richard Zhao
3197a918d5 gpu: nvgpu: gv11b: add max_subctx_count to g->fifo.t19x
- For better performance. It used to read register every time referencing
  max_subctx_count.
- Avoid reading registers for vgpu.

Jira VFND-3797

Change-Id: Id6e6b15a0d9a035795e8a9a2c6bb63524c5eb544
Signed-off-by: Richard Zhao <rizhao@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1537009
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
Reviewed-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
2017-08-11 11:08:41 -07:00
Sandarbh Jain
b859393ffe gpu: nvgpu: gv11b: fix no_of_sm
Number of sm is being reported incorrectly. This is because
we are not taking into account that each TPC have 2 sm.

Bug  1951026

Change-Id: I7c666aa2a0470a14aad29ab1a80ae9d23958a743
Signed-off-by: Sandarbh Jain <sanjain@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1527771
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alexander Lewkowicz <alewkowicz@nvidia.com>
Tested-by: Alexander Lewkowicz <alewkowicz@nvidia.com>
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
2017-07-28 05:14:04 -07:00
Sunny He
2b98e1308d gpu: nvgpu: gv11b: Remove privsecurity from gpu_ops
Replace privsecurity boolean flag in gpu_ops with entry in
common flag system.

The new common flag is NVGPU_SEC_PRIVSECURITY

Jira NVGPU-74

Change-Id: I4c11e3a89a76abe137cf61b69ad0fbcd665554b7
Signed-off-by: Sunny He <suhe@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1525714
Reviewed-by: Alex Waterman <alexw@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
2017-07-26 02:45:15 -07:00
Seema Khowala
8b571de456 gpu: nvgpu: gv11b: implement init_gpc_mmu
- Created HAL to configure gpc mmu unit for gv11b.
- Earlier chips needs writes to NV_PGRAPH_PRI_GPCS_MMU_NUM_ACTIVE_LTCS
  register to know supported number of LTCS by reading NUM_ACTIVE_LTCS
  but gv11b support auto update from fuse upon reset, so skipped
  LTCS update for GPCS & skipping helps to fix compression failure
  issue.

Bug 1950234

Change-Id: I628af7d1399e4fe3126895e3a703a19147f7a12f
Signed-off-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1517733
Reviewed-by: Mahantesh Kumbar <mkumbar@nvidia.com>
Tested-by: Mahantesh Kumbar <mkumbar@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
2017-07-20 00:20:56 -07:00
Seema Khowala
7ab28a4184 gpu: nvgpu: gv11b: support egpc and etpc context regoptype
- implement is_egpc_addr, is_etpc_addr and get_egpc_etpc_num gr ops
- implement decode and create priv addr for egpc/etpc

JIRA GPUT19X-49
Bug 200311674

Signed-off-by: Seema Khowala <seemaj@nvidia.com>
Change-Id: Ia0cef51b2064df28460711185cd90b60aac03e4f
Reviewed-on: https://git-master.nvidia.com/r/1522450
GVS: Gerrit_Virtual_Submit
Reviewed-by: Tushar Kashalikar <tkashalikar@nvidia.com>
Tested-by: Tushar Kashalikar <tkashalikar@nvidia.com>
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
2017-07-18 23:42:08 -07:00
Seema Khowala
c7d48710b0 gpu: nvgpu: gv11b: init access_smpc_reg gr ops
This is needed to support t19x smpc register addresses

JIRA GPUT19X-49
Bug 200311674

Change-Id: I67146d997d96eeca4344ed0fb4cabbc216461c6c
Signed-off-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1508543
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
2017-07-18 23:42:01 -07:00
Seema Khowala
4df5427c15 gpu: nvgpu: gv11b: init perf related gr ops
Implement gv11b specific perf gr ops

JIRA GPUT19X-49
Bug 200311674

Change-Id: Ia65fe84df6e38e25f87d2c1b21c04b518c334d42
Signed-off-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1497402
GVS: Gerrit_Virtual_Submit
Reviewed-by: Tushar Kashalikar <tkashalikar@nvidia.com>
Tested-by: Tushar Kashalikar <tkashalikar@nvidia.com>
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
2017-07-18 23:41:54 -07:00
Lauri Peltonen
2272cedfba gpu: nvgu: Support SET_BES_CROP_DEBUG3 sw method
The new SET_BES_CROP_DEBUG3 sw method is used to flip two fields
in the NV_PGRAPH_PRI_BES_CROP_DEBUG3 register.  The sw method is
used by the user space driver to disable enough ROP optimizations
to maintain ZBC state of target tiles.

Bug 1942454

Change-Id: I3109fb4120674b15db4998693d0aa65bf0c3c8b5
Signed-off-by: Lauri Peltonen <lpeltonen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1516205
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
GVS: Gerrit_Virtual_Submit
2017-07-14 02:54:35 -07:00
Seema Khowala
df022d27dd gpu: nvgpu: gv11b: support SET_SKEDCHECK s/w methods
Support sw method NVC397_SET_SKEDCHECK and NVC3C0_SET_SKEDCHECK
data fields are
data:0 SKEDCHECK_18_DISABLE
data:1 SKEDCHECK_18_ENABLE

Bug 200315442

Change-Id: I0652434ab0b4d6e49dab94be329072861e99c38c
Signed-off-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1515772
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
2017-07-12 22:15:19 -07:00
Seema Khowala
cc940da42f gpu: nvgpu: gv11b: enable and handle mpc exception
Implement gr ops to handle MPC exception triggered per TPC

JIRA GPUT19X-69

Change-Id: Ia92b1d51ad896116b25d71e07ed26f1539475be8
Signed-off-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-on: https://git-master/r/1515915
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
2017-07-09 23:34:19 -07:00
Seema Khowala
1f09340f82 gpu: nvgpu: gv11b: init handle_sm_exception gr ops
gr_gk20a_handle_sm_exception is initialized to
handle_sm_exception and new gr ops handle_tpc_sm_ecc_exception
is initialized to gr_gv11b_handle_tpc_sm_ecc_exception
to handle sm ecc errors per tpc.

JIRA GPUT19X-75
JIRA GPUT19X-109

Change-Id: Iefa95b185b9eed23f9f54e231405fcd9fd83ccc0
Signed-off-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-on: https://git-master/r/1514039
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
2017-07-06 12:04:42 -07:00
Seema Khowala
99aeb5ae3b gpu: nvgpu: gv11b: init clear_sm_hww gr ops
Required for multiple SM support and SM register
address changes

JIRA GPUT19X-75

Change-Id: I552bae890a416dc4a430b907641b5b3d09b638c7
Signed-off-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-on: https://git-master/r/1514038
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
2017-07-06 12:04:41 -07:00
Seema Khowala
013ead1587 gpu: nvgpu: gv11b: init sm lock_down gr ops
init lock_down_sm and wait_for_sm_lock_down gr ops
Required to support multiple SM and register address
changes

JIRA GPUT19X-75

Change-Id: I992d1c0c5a1f559dc57bcef50025fa42913d6761
Signed-off-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-on: https://git-master/r/1514037
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
2017-07-06 12:04:41 -07:00
Seema Khowala
bdf5207583 gpu: nvgpu: gv11b: init get_sm_no_lock_down_hww_global_esr_mask gr ops
Support SM register changes

JIRA GPUT19X-75

Change-Id: I5d5e702d681398a8a8181d912e8c691c15e265d9
Signed-off-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-on: https://git-master/r/1514036
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
2017-07-06 12:04:41 -07:00
Seema Khowala
d250adf53e gpu: nvgpu: gv11b: init gr ops get_sm_hww_global_esr
Required for multiple SM support and sm register address
changes

JIRA GPUT19X-75

Change-Id: I3fb62a935636f3df050ed125ebe57d8469069591
Signed-off-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-on: https://git-master/r/1514035
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
2017-07-06 12:04:41 -07:00
Seema Khowala
37fa5128ec gpu: nvgpu: gv11b: init get_sm_hww_warp_esr gr ops
get sm hww_warp_esr reg val

JIRA GPUT19X-75

Change-Id: I4ed04045e947c417291b7b1e2fc81bbe51f0b48c
Signed-off-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-on: https://git-master/r/1512212
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
2017-07-05 03:06:57 -07:00
Seema Khowala
f5b5099cf8 gpu: nvgpu: gv11b: init resume_from_pause gr ops
JIRA GPUT19X-75

Change-Id: Ie741bf50c771f21de3bf762ca506a36276f38437
Signed-off-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-on: https://git-master/r/1512211
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
2017-07-05 03:06:57 -07:00
Seema Khowala
8fb191aec0 gpu: nvgpu: gv11b: init resume_all_sms gr ops
This is required to support multiple SM and t19x
sm register address changes

JIRA GPUT19X-75

Change-Id: Ia5c0a3d1dead9c6094ca28716c06929dd3461814
Signed-off-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-on: https://git-master/r/1512210
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
2017-07-05 03:06:56 -07:00
Seema Khowala
7185dcdbf8 gpu: nvgpu: gv11b: init resume_single_sm gr ops
This is required to support multiple SM and t19x
sm register address changes

JIRA GPUT19X-75

Change-Id: I0ebbfdad73d6212997a21f9240f5d4bc2f28ab2f
Signed-off-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-on: https://git-master/r/1512209
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
2017-07-05 03:06:55 -07:00
Seema Khowala
cc698f6b98 gpu: nvgpu: gv11b: init suspend_all_sms gr ops
This is required to support multiple SM and t19x
sm register address changes

JIRA GPUT19X-75

Change-Id: I46b7d58ed02710339aa27cd9db999aa60fbd4dd9
Signed-off-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-on: https://git-master/r/1512208
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
2017-07-05 03:06:54 -07:00
Seema Khowala
30dcb31707 gpu: nvgpu: gv11b: init suspend_single_sm gr ops
Take care of SM register address changes.

JIRA GPUT19X-75

Change-Id: I7fa68dbef014fb07a3656b2816d7d8d538a7cf52
Signed-off-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-on: https://git-master/r/1512207
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
2017-07-05 03:06:53 -07:00
Seema Khowala
edf87a42c3 gpu: nvgpu: gv11b: init sm_debugger_attached gr ops
Support gv11b sm register address changes.

JIRA GPUT19X-75

Change-Id: I22562789ef7c064fa36c2d382224af6dc6a806c7
Signed-off-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-on: https://git-master/r/1512206
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
2017-07-05 03:06:53 -07:00
Seema Khowala
690d560e65 gpu: nvgpu: gv11b: Use sm dbgr bpt and warp mask 0/1
Instead of assuming mask_0 and mask_1 as consecutive registers,
use mask_1 and mask_0 registers for reading/writing sm dbgr warp
and bpt mask registers

JIRA GPUT19X-75

Change-Id: Ib6843d13828d899d4bd3f12bdf6701325ea760fd
Signed-off-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-on: https://git-master/r/1511736
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
2017-07-05 03:06:51 -07:00
Seema Khowala
a4439aee3a gpu: nvgpu: gv11b: read from unicast register
For updating broadcast register, read the current
value from unicast register.

JIRA GPUT19x-75

Change-Id: Ib4a3791304cabe77cf46543d4bec0312c6fcc0fb
Signed-off-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-on: https://git-master/r/1511735
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
2017-07-05 03:06:46 -07:00
Seema Khowala
6f6329c377 gpu: nvgpu: gv11b: init set_hww_esr_report_mask
gv11b has 2 SMs per TPC. Use *gpcs_tpcs_sms_hww_warp/global_esr*
registers instead of *gpcs_tpcs_sm_hww_warp/global_esr*

GPUT19X-75

Change-Id: I86c7ded32b2b69214e047e6de67a1745f2cef6f3
Signed-off-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-on: https://git-master/r/1474860
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
2017-06-30 00:05:05 -07:00
Seema Khowala
ec71ac2957 gpu: nvgpu: gv11b: init record_sm_error_state gr ops
Take care of t19x sm reg address changes and support multiple SM

JIRA GPUT19X-75

Change-Id: I675b76b90d08fe75331f0023f1fe722497d06373
Signed-off-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-on: https://git-master/r/1477673
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
2017-06-30 00:05:05 -07:00
Seema Khowala
8f0f88d61e gpu: nvgpu: gv11b: init set_sm_debug_mode gr ops
Support multiple SM and take care of sm reg addr changes

JIRA GPUT19X-75

Change-Id: Id39e269034762c7a8347edaf1fff0b2efd7f153c
Signed-off-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-on: https://git-master/r/1477705
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
2017-06-30 00:05:05 -07:00
Seema Khowala
f28efb987a gpu: nvgpu: gv11b: init update_sm_error_state gr ops
Support multiple SM and take care of SM hardware reg address changes

JIRA GPUT19X-75

Change-Id: I866011a85da06ca22bc10fda5ab59f84d0782902
Signed-off-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-on: https://git-master/r/1477686
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
2017-06-30 00:05:04 -07:00