Commit Graph

1807 Commits

Author SHA1 Message Date
Terje Bergstrom
cccd038f8d Revert "gpu: nvgpu: Implement sparse PDEs"
This reverts commit c44947b1314bb2afa1f116b4928f4e8a4c34d7b1. It
introduces a regression in T124.

Bug 1702063

Change-Id: I64e333f66d98bd4dbcfe40a60f1aa825d90376a5
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/830786
GVS: Gerrit_Virtual_Submit
2015-11-09 10:11:23 -08:00
Seshendra Gadagottu
19b3bd28b3 gpu: nvgpu: use platform data for ptimer source rate
Instead of depending on clock frame-work, use platform data
for ptimer source rate. Removed ptimerscaling10x platform
data, and use ptimer source frequency to calculate
ptimerscaling factor.

Reviewed-on: http://git-master/r/819030
(cherry picked from commit dd291334d54dab80cab7eb1656dffc48a59610b4)

Change-Id: I7638ce9875a6e440bbfc2ba2da0d0b094b2700ff
Signed-off-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-on: http://git-master/r/827300
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
2015-11-04 14:38:34 -08:00
Deepak Nibade
9592a4e6fc gpu: nvgpu: IOCTL to set TSG timeslice
Add new IOCTL NVGPU_IOCTL_TSG_SET_PRIORITY to allow
setting timeslice for entire TSG

Return error from channel specific IOCTL_CHANNEL_SET_PRIORITY
if the channel is part of TSG

Separate out API gk20a_channel_get_timescale_from_timeslice()
to get timeslice_timeout and scale from timeslice period

Use this API to get timeslice_timeout and scale for TSG and
store it in tsg_gk20a structure

Then trigger runlist update so that new timeslice values
will be re-written to runlist for TSG

Bug 200146615

Change-Id: I555467d034f81b372b31372f0835d72b1c159508
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/824206
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
2015-11-03 14:20:08 -08:00
Deepak Nibade
8d279dbac1 gpu: nvgpu: IOCTL to disable timeouts
Add IOCTL NVGPU_DBG_GPU_IOCTL_TIMEOUT to support
disabling/re-enabling scheduler timeout from user space

If user space application is closed without re-enabling
the timeouts, kernel will restore the timeouts' state
while releasing the debug session

This is needed for debugging purpose

Bug 1514061

Change-Id: I32efb47ad09d793f3e7fd8f0aaa9720c8bc91272
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/788176
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
2015-11-03 14:14:10 -08:00
Terje Bergstrom
4b5c08f4c0 gpu: nvgpu: Implement sparse PDEs
Change-Id: Idfeb3bf95751902d52a895d77045a529f69abc0b
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/758651
GVS: Gerrit_Virtual_Submit
2015-10-30 16:36:06 -07:00
Seshendra Gadagottu
004a1880ed gpu: nvgpu: update thermal programming
Add required fileds and values for thermal slow-down
settings in thermal header file and implemented chip
specific thermal register programming

Reviewed-on: http://git-master/r/822199
(cherry picked from commit 9e8a745b8295af002b9780c83caa8dc7b22cc737)

Change-Id: I016b18ed230fa6c104eada2e166ccd1a5f2ace36
Signed-off-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-on: http://git-master/r/823012
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
2015-10-27 15:42:08 -07:00
Janne Hellsten
057c6334f7 gpu: nvgpu: Get rid of legacy gpfifo type
Get rid of the duplicate gpfifo struct to emphasize the fact that
nvgpu_gpfifo is the only memory layout for gpfifo entries that works.
This is the same layout that HW uses.

Also, add a local pointer to the gpfifo memory in
gk20a_submit_channel_gpfifo to get rid of repeated typecasts.

Bug 1592391
Bug 1550886

Change-Id: I5432859ef8e7c1aab5907e44098994d7bb807f50
Signed-off-by: Janne Hellsten <jhellsten@nvidia.com>
Signed-off-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-on: http://git-master/r/677341
(cherry picked from commit 724c8c6228af81dd440e825bddf545dd6b2b8bd7)
Reviewed-on: http://git-master/r/822548
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Arto Merilainen <amerilainen@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
2015-10-27 08:40:31 -07:00
Seshendra Gadagottu
5c26f72fe1 gpu: nvgpu: Add sysfs node to enable rail gating
Add sysfs node "railgate_enable" to enable
gpu railgating dynamically.

Bug 1552469

Reviewed-on: http://git-master/r/804746
(cherry picked from commit 53d76d1d1576a96c70f66b744411d2909ec8414f)

Change-Id: I69ac63958b00ae4ea5d9ccbaed03316d35ddc5eb
Signed-off-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-on: http://git-master/r/822208
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
2015-10-26 09:46:18 -07:00
Deepak Nibade
3684ed8fd6 gpu: nvgpu: use railgate instead of reset_assert
In gk20a_do_idle(), if can_railgate = false, we do
reset_assert() on the GPU

But asserting reset might have dependencies on
specific h/w seqeunce for ensuring proper reset

Hence avoid calling reset_assert() and directly
call platform specific unrailgate() and railgate()
APIs which take care of the correct reset sequence

Bug 200142989
Bug 200137963
Bug 1678611

Change-Id: Ide886dd88b8422ad36de52d54378b1edd9c7bbd6
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/820322
(cherry picked from commit d621ddd49da976a75c14aa7aaa37f700fb4e83f2)
Reviewed-on: http://git-master/r/822515
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2015-10-26 04:03:56 -07:00
Deepak Nibade
0334d7e303 gpu: nvgpu: unrailgate only if pm_domains not enabled
Currently we unrailgate the GPU if railgating is not enabled
or pm_domains are not enabled

But in case if railgating is not enabled and pm_domains
are enabled, we explicitly unrailgate GPU in gk20a_pm_init()
and then runtime PM unrailgates it again when first user
space request arrives - setting unrailgate refcount to 2

Now for gk20a_do_idle(), we need to railgate the GPU in
fist call but that does not happen since unrailgate
refcount != 1

hence, in case railgating is not enabled, we should
unrailgate the GPU from only one place i.e. when first user
space request arrives

Bug 200142989
Bug 200137963
Bug 1678611

Reviewed-on: http://git-master/r/820321
(cherry picked from commit 452a1ff8da8e3f47caed2371440f9ad150bf8699)

Change-Id: Ic9fe2267c9df5629315c30c1404c2b3044c1265a
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/822296
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2015-10-26 01:53:15 -07:00
Terje Bergstrom
2aead8a72f gpu: nvgpu: Disable only channel at zcull bind
At zcull bind we disable whole GR engine. This is unnecessary, so
instead disable only the channel and make sure it's unloaded.

Introduces also an API in fifo_gk20a.c to do the channel disable.

gr_gk20a_ctx_zcull_setup() was always passed true as last parameter,
so remove parameter.

Change-Id: I7ae6e101ec7d1ab3f6ee4e9bcc442d23dbd21247
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/787570
2015-10-23 08:30:23 -07:00
Terje Bergstrom
75c09b96b4 gpu: nvgpu: Protect sync by an own lock
Protect creation and deletion of sync by an own mutex. This prevents
deadlock in channel abort when abort is called from submit path.

Bug 200147887

Change-Id: I5d6308b773c1d1a6a89d4590e2e74c74d691f79d
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/821127
2015-10-22 11:41:24 -07:00
Terje Bergstrom
790173dcfd gpu: nvgpu: Use gradual slowdown
Program clock slowdown to happen using gradual slowdown. It is
significantly faster than the default slowdown.

Change-Id: I9e5259889637fce2c0b083a424b54af12bb45c25
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/819698
2015-10-22 10:47:11 -07:00
Terje Bergstrom
37255d42cc gpu: nvgpu: vgpu: Alloc kernel address space
JIRA VFND-890

Change-Id: I8eba041b663cead94f2cc3d75d6458d472f1a755
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Signed-off-by: Richard Zhao <rizhao@nvidia.com>
Reviewed-on: http://git-master/r/815378
(cherry picked from commit 4b52329e955758ec4368abcb463ce4e3a2653237)
Reviewed-on: http://git-master/r/820499
2015-10-22 09:27:30 -07:00
Aingara Paramakuru
fb3a1d31cd gpu: nvgpu: vgpu: fix notification handling
Take a channel ref when handling a notification from
the server, to prevent the channel from being closed.

Also, mark the channel as faulted before calling
g20a_channel_abort, to keep the semantics the same
as the native driver.

Bug 1653186

Change-Id: I0cb8ce7bad22a4d508eade6ff63a412296a02fc9
Signed-off-by: Aingara Paramakuru <aparamakuru@nvidia.com>
Reviewed-on: http://git-master/r/811885
Signed-off-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-on: http://git-master/r/817021
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
2015-10-22 07:40:08 -07:00
Aingara Paramakuru
ee18a3ae26 gpu: nvgpu: vgpu: re-factor gr ctx management
Move the gr ctx management to the GPU HAL. Also,
add support for a new interface to allocate gr ctxsw
buffers.

Bug 1677153

Change-Id: I5a7980acf4de0de7dbd94b7dd20f91a6196dc989
Signed-off-by: Aingara Paramakuru <aparamakuru@nvidia.com>
Reviewed-on: http://git-master/r/806961
Signed-off-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-on: http://git-master/r/817009
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
2015-10-22 07:39:56 -07:00
Terje Bergstrom
9165427ef7 gpu: nvgpu: Hard code FE_GO_IDLE_TIMEOUT
Always use the PROD value for FE_GO_IDLE_TIMEOUT.

Change-Id: I455c03ae07b35a8999cd0995e458c421a10e7ca2
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/813958
2015-10-20 14:03:52 -07:00
Terje Bergstrom
fd97ed15d6 gpu: nvgpu: Trigger recovery on HWW errors
Trigger recovery on DS and MEMFMT HWW errors, and write an error line
to UART for each HWW error.

Also capture the channel id before clearing the exception.

Bug 1683059

Change-Id: Ia00d88a76371a4bd7e047915dde0bf0d4b84bc10
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/816983
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
2015-10-20 13:58:48 -07:00
Terje Bergstrom
c3b595178e gpu: nvgpu: Fix fake MMU fault for TSGs
When we induce a fake MMU fault, we do not have pointer to a channel.
Use the tsg pointer instead. Also remove the error print in case we
do not have ch pointer.

Change-Id: I14fd75d2b743244915bf32fe39de76097ef5c42f
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/819034
2015-10-20 13:58:35 -07:00
Deepak Nibade
0269339256 gpu: nvgpu: restart timer instead of cancel
In gk20a_fifo_handle_sched_error(), we currently cancel
the timeout on all the channels
But this could cause us to miss one of stuck channel

hence, instead of cancelling, restart the timeout of channel
on which it is already active

Bug 200133289

Change-Id: I40e7e0e5394911fc110ab6fde39592b885dfaf7d
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/816133
Reviewed-by: Ishan Mittal <imittal@nvidia.com>
Tested-by: Ishan Mittal <imittal@nvidia.com>
2015-10-19 23:52:50 -07:00
Deepak Nibade
da8ff40e55 gpu: nvgpu: fix deadlock on timeout lock
In gk20a_channel_timeout_stop(), we take the channel's
timeout lock and then cancel the timeout worker thread

Timeout worker thread also tries to acquire same timeout
lock.

Hence, while cancelling the timeout in gk20a_channel_timeout_stop()
if the timeout_handler is already scheduled, we will have a deadlock

Fix this by moving cancel_delayed_work_sync() out of the locks

Bug 200133289
Bug 1695481

Change-Id: Iea78770180b483a63e5e176efba27831174e9dde
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/815922
Reviewed-by: Ishan Mittal <imittal@nvidia.com>
Tested-by: Ishan Mittal <imittal@nvidia.com>
2015-10-19 23:52:04 -07:00
Deepak Nibade
68099f8298 gpu: nvgpu: fix pbdma intr handling
To handle any of the pbdma interrupt, we currently write zero
to pbdma_method0 and then clear the interrupt

But this is insufficient since we cannot use same intr clear
method for all the interrupts

Hence, add intr specific routines to handle those interrupts

NV_PPBDMA_INTR_0_PBENTRY:
- fix the pb_header to have a null opcode
- fix the pbdma_method to have a valid nop

NV_PPBDMA_INTR_0_METHOD:
- fix the pbdma_method to have a valid nop

NV_PPBDMA_INTR_0_DEVICE:
- fix the pb_header to have a null opcode
- go through all pbdma_method0/1/2/3
-- if they contain host s/w methods, replace those
   methods with a valid NOP

Bug 200134238

Change-Id: I10c284a6cdc1441f9d437cea65aae00d3c33a8c8
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/814561
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
2015-10-16 08:23:49 -07:00
Seshendra Gadagottu
5b7b59714a gpu: nvgpu: add support to remove bar2 mm
Adding support to remove bar2 mm on gpu module
remove.

Change-Id: Id5f680b1abf7056da9871d5460d9fbc40422673e
Signed-off-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-on: http://git-master/r/814571
(cherry picked from commit e7c6c87dd6b0893d26a9a3b4568121a691e1eb3c)
Reviewed-on: http://git-master/r/815429
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
2015-10-12 18:22:12 -07:00
Deepak Nibade
1cf6539990 gpu: nvgpu: rework secure_page allocation path
Currently, if can_railgate = false, then we have below
sequence to allocate secure_page
- unrailgate GPU (forever)
- reset_assert()
- allocate secure_page
- reset_deassert()

But if we allocate secure page even before unrailgating GPU
for first time, then we can avoid reset_assert()/deassert()
calls since GPU should already be in reset/railgated at
boot time

hence, rework this sequence as below
- init required mutex, set platform->reset_control
- allocate secure page (GPU should already be in reset
  at this point)
- gk20a_pm_init() which unrailgates GPU in case of
  can_railgate = false

Bug 200137963
Bug 1678611

Change-Id: I79d0543bb5cf1eaf1009e1e6ac142532d84514a5
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/797153
(cherry picked from commit 368004501943d38c003747f6bec0384fed57ee65)
Reviewed-on: http://git-master/r/816005
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
2015-10-12 08:58:35 -07:00
Sami Kiminki
960552df3e nvgpu: gk20a: Optimize vm_put_buffers for zero buffers
Return immediately in case there are no buffers to put. This skips
acquiring mutexes and map batch start/finish overheads.

Bug 1614735
Bug 1623949
Bug 1660392

Change-Id: Ief04e36d995e65c1510496c17cb3f5bb90486c69
Signed-off-by: Sami Kiminki <skiminki@nvidia.com>
Reviewed-on: http://git-master/r/815376
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
2015-10-12 08:30:35 -07:00
Seshendra Gadagottu
8bbc0d7730 gpu: nvgpu: gm20b: update blcg xbar prod settings
Bug 1689806

Change-Id: I5090967cd5d14816e4ac3091af0b0c4dca272335
Signed-off-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-on: http://git-master/r/814616
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
2015-10-09 13:33:51 -07:00
Seshendra Gadagottu
95c52b55ad gpu: nvgpu: API for gpmu bootstrap
Expose API for gpmu bootstrap.

Bug 1685722

Change-Id: I46ca6f8b36e14cd1c6a12eb0d5cd178da2e0be1c
Signed-off-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-on: http://git-master/r/812270
(cherry picked from commit bd7ac9992923cc32f2739926400bbf9b5cadc0c1)
Reviewed-on: http://git-master/r/813977
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
2015-10-09 10:52:04 -07:00
Terje Bergstrom
87adfb4963 Revert "gpu: nvgpu: WAR for bad GPFIFO entries from userspace"
This reverts commit aeb74fc7952718ffab6281c687951499510c4333.
User space was fixed not to send zero-length GPFIFO entries.

Bug 1662670

Change-Id: Iec6bf1870a19db4e8daa2ed4512650b92a37ba92
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/811783
2015-10-08 15:34:48 -07:00
Bharat Nihalani
2b9d49a7d4 Merge branch 'dev/dev-t18x-rebase-kernel-04' into HEAD
Change-Id: I196ec645855419c70703eaefd3d83303bbd9fae5
Signed-off-by: Bharat Nihalani <bnihalani@nvidia.com>
2015-10-08 12:26:48 +05:30
Deepak Nibade
d01a0249c4 gpu: nvgpu: cancel all wdt timeouts while handling SCHED errors
A SCHED error might cause multiple channels' watchdogs to trigger
simultaneously

Hence, to avoid this conflict cancel watchdog timeout on all
channels before recovering from SCHED errors

Also, define API gk20a_channel_timeout_stop_all_channels()
to cancel wdt timeout on all channels

Bug 200133289

Change-Id: I8324c397891f0a711327b77d0677cd6718af6d01
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/810959
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
2015-10-07 15:03:28 -07:00
Deepak Nibade
21508ec801 gpu: nvgpu: set default channel timeout to 3s
We have another constant timeout of 5s for channel watchdog.
Hence drop default channel timeout (used for SCHED errors)
to 3s so that they both don't conflict with each other

Bug 200133289

Change-Id: Ieed675cad462119ff2f1a155a955c8a22cb6c6f8
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/810958
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
2015-10-07 15:02:57 -07:00
Deepak Nibade
8e000cc7bc gpu: nvgpu: debugfs for ch_wdt timeout
export debugfs /d/gpu.0/ch_wdt_timeout_ms to modify
all channels' watchdog timeout

this is needed for testing purpose only

Bug 200133289

Change-Id: I8776b567d5d5a1c304334835b0bcab7b242cf0ab
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/810957
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
2015-10-07 15:02:44 -07:00
Deepak Nibade
ff417a72e2 gpu: nvgpu: make wdt timeout per-platform
Channel watchdog timeout is set to a costant value of 5s
as of now

Make this timeout platform specific and set it to 5s for gm20b
and 7s for gk20a

Bug 200133289

Change-Id: I6e7f0fed93a8d5b197ae46807131311196c6636f
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/810956
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
2015-10-07 15:00:18 -07:00
sujeet baranwal
488a2c38d1 gpu: nvgpu: Avoid resetting CDE flag
While loading the context, erstwhile set CDE flag was being
overwritten by copying code of golden context, thus losing
the information. This was not letting the CDE info reach
to the ucode, and T1 was not configured to 128B mem access.

Bug 200096226

Change-Id: I5ceb234a62450ff7875aeba05ec616758cb319d9
Signed-off-by: sujeet baranwal <sbaranwal@nvidia.com>
Reviewed-on: http://git-master/r/811767
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
2015-10-07 10:03:54 -07:00
Kirill Artamonov
3ad8438c90 gpu: nvgpu: set correct timeslice value
Scale timeslice register value based on platform
specific ptimer scale koefficient.

Expose timeslice values through debugfs to simplify performance
tuning.

bug 1605552
bug 1603226

Change-Id: I49f86f22d58d26a366ee1b5f5a9ab9d7f896ad25
Signed-off-by: Kirill Artamonov <kartamonov@nvidia.com>
Reviewed-on: http://git-master/r/800007
(cherry picked from commit 00c85ef24cf28ffaa81eb53fff7edef1c699220a)
Reviewed-on: http://git-master/r/808251
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
2015-10-06 13:31:10 -07:00
Vijayakumar
d60a45b9fd gpu: nvgpu: scale ptimer based timeouts
bug 1603226

host based timeouts use ptimer for detecting
timeouts. on gk20a and gm20b ptimer runs 2.6x
slower. scale the fifo_eng_timeout to account
for this

Change-Id: Ie44718382953e36436ea47d6e89b9a225d5c2070
Signed-off-by: Vijayakumar <vsubbu@nvidia.com>
Reviewed-on: http://git-master/r/799983
(cherry picked from commit d1d837fd09ff0f035feff1757c67488404c23cc6)
Reviewed-on: http://git-master/r/808250
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
2015-10-06 13:30:54 -07:00
Jussi Rasanen
f4b6d4d176 gpu: nvgpu: fix ctag computation overflow with 8GB
Bug 1689976

Change-Id: I97ad14c9698030b630d3396199a2a5296c661392
Signed-off-by: Jussi Rasanen <jrasanen@nvidia.com>
Reviewed-on: http://git-master/r/806590
(cherry picked from commit c90cd5ee674d6357db3be2243950ff0d81ef15ef)
Reviewed-on: http://git-master/r/808249
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
2015-10-06 13:30:23 -07:00
Vijayakumar
c94c2035d6 gpu: nvgpu: gk20a: dont disable pmu in pmu_destroy
bug 1688374

disabling pmu will break RAM suspend on chips implementing
split rails. pmu will be powered down along with rest of
the GPU anyway. pmu_destroy is not be used outside of
rail gating or gpu suspend

Change-Id: I9e89859b7c701f731276ae1d1063d9ccd88d4334
Signed-off-by: Vijayakumar <vsubbu@nvidia.com>
Reviewed-on: http://git-master/r/805940
(cherry picked from commit 8ded353878ff7df73e55b702041008ddc3cbf069)
Reviewed-on: http://git-master/r/808248
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
2015-10-06 13:30:03 -07:00
Deepak Nibade
ed0737ab60 gpu: nvgpu: support reset_control API
Bug 200137963

Change-Id: I3197af905c945540b97ba191e5695d970d77af8e
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/797154
(cherry picked from commit 8a50245ea636deb87a3d9435fb115b4eac88fac9)
Reviewed-on: http://git-master/r/808247
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
2015-10-06 13:29:37 -07:00
Jussi Rasanen
c6b8f46f6d gpu: nvgpu: fix 4k compression
Add CPU dcache flush after populating scatterBuffer so that the GPU
will see the buffer contents.

Bug 1679453

Change-Id: I564394ed1fcff4d08d753e753bd3243b460d76df
Signed-off-by: Jussi Rasanen <jrasanen@nvidia.com>
Reviewed-on: http://git-master/r/805197
(cherry picked from commit d6a5513745aa77c84ac5408a62f72f24839ef439)
Reviewed-on: http://git-master/r/808246
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
2015-10-06 13:29:13 -07:00
Seshendra Gadagottu
8ed6ade94f gpu: nvgpu: update slcg xbar prod settings
Bug 1689806

Change-Id: I368ad8fb64e49b21ba61c519def1f86e1ca6e492
Signed-off-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-on: http://git-master/r/806116
(cherry picked from commit 1a3bbe989a795d379703e7f4b915f6e1bb38c2c3)
Reviewed-on: http://git-master/r/805480
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
2015-10-06 13:28:51 -07:00
Richard Zhao
cc793c34cc gpu: nvgpu: let shutdown callback call vgpu_pm_prepare_poweroff for vgpu
It fixed the issue that system hang when reboot.

Bug 1638850

Change-Id: If53a31e86c10b2fce4a22fe4fcf92106d86c95ef
Signed-off-by: Richard Zhao <rizhao@nvidia.com>
Reviewed-on: http://git-master/r/803234
(cherry picked from commit 4dbea2c7037a5244ccb9d6e886023c29ba584892)
Reviewed-on: http://git-master/r/808245
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
2015-10-06 13:27:52 -07:00
Deepak Nibade
0125d2a770 gpu: nvgpu: fix sparse warning
fix below sparse warning :
drivers/gpu/nvgpu/gp10b/pmu_gp10b.c:245:6: warning: symbol
'gp10b_pmu_elpg_statistics' was not declared. Should it be static?

Bug 200088648

Change-Id: I74a1de9921bb6ba9cc077bf7291e8eeb3d4c82ff
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/810395
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Tested-by: Sachin Nikam <snikam@nvidia.com>
2015-10-06 05:03:41 -07:00
Aingara Paramakuru
3e08593d45 gpu: nvgpu: vgpu: add new GMMU map interface
The server now exposes a new GMMU map interface that
can accept a scatter-gather list. This is needed to support
SMMU-bypass configurations.

Bug 1677153
JIRA VFND-689

Change-Id: I7b5af145db57dcebe2c9125ec90c689798d7e69e
Signed-off-by: Aingara Paramakuru <aparamakuru@nvidia.com>
Reviewed-on: http://git-master/r/792558
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Richard Zhao <rizhao@nvidia.com>
Reviewed-by: Vladislav Buzov <vbuzov@nvidia.com>
2015-10-02 18:20:05 -07:00
Terje Bergstrom
e233b0fdcd gpu: nvgpu: Commit cb manager at context create
Call commit_cb_manager() at context creation time instead of hardware
initialization. This allows per-channel sizes for buffers.

Bug 1686189

Change-Id: Ie4d08e87f237bc63bac0268128f59d4fe8536c95
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/801777
Reviewed-on: http://git-master/r/806181
2015-10-01 13:31:34 -07:00
Terje Bergstrom
6e97491b00 gpu: nvgpu: Write patch_count after updating ctxsw
Bug 1686189

Change-Id: Idf92d3277a7e8932d11ece13e3b988609e49c74e
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/802550
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-on: http://git-master/r/806180
2015-10-01 13:31:03 -07:00
Deepak Nibade
5b4451cad8 gpu: nvgpu: prevent extra user unmaps
It is possible that user space requests more unmaps on a buffer
than it requested maps
In this case, we end up dropping one extra refcount which could
lead to releasing buffer early

Fix this by checking and returning if buffer's user_mapped
refcount is already zero

Bug 200130521

Change-Id: Ic8ef2dbfe0476b16d852ad899b1ed0404b5bb7de
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/788904
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
2015-09-30 11:10:17 -07:00
Mahantesh Kumbar
dab594ac13 gpu: nvgpu: ELPG init & statistics update
- Required init param to start elpg
- change in statistics dump

Bug  1684939

Change-Id: I26dca52079f08b8962e9cb758831910207610220
Signed-off-by: Mahantesh Kumbar <mkumbar@nvidia.com>
Reviewed-on: http://git-master/r/802456
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/806179
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
2015-09-30 08:29:13 -07:00
Mahantesh Kumbar
b1cd94025b gpu: nvgpu: PMU ucode version update
- PMU ucode version update to sync
  with LS production signature

Bug 200140416

Change-Id: Ib77fa81f7b05ed3cf45c373f3d759a2cfb69b238
Signed-off-by: Mahantesh Kumbar <mkumbar@nvidia.com>
Reviewed-on: http://git-master/r/801738
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/806177
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
2015-09-30 08:28:30 -07:00
Mahantesh Kumbar
1372ec4df2 gpu: nvgpu: interface update to sync CL #19870492
- pg statistics update
- perfmon update
- ADD GR inti params interface to enable ELPG

Bug n/a

Change-Id: I39ae1d4518733480a42f06a0be7bd794fc93ff6f
Signed-off-by: Mahantesh Kumbar <mkumbar@nvidia.com>
Reviewed-on: http://git-master/r/799684
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/806176
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
2015-09-30 08:26:16 -07:00