Commit Graph

7 Commits

Author SHA1 Message Date
Terje Bergstrom
b7fca01b0e gpu: nvgpu: Scrub gk20a_platform dependencies
Remove gk20a_platform dependencies from gk20a.h. This makes
gk20a_platform a Linux platform specific data structure. Add #include
for platform_gk20a.h in the source files that still depend on Linux.

JIRA NVGPU-16

Change-Id: Ib098accd34a1f5066eb8680c387f9b178169f3f0
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/1463547
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2017-05-18 15:14:31 -07:00
Terje Bergstrom
19fdb429c2 gpu: nvgpu: Wrappers for checking platform type
Add nvgpu_* wrappers for determining if we're running in simulation
or silicon, and if we're running in hypervisor.

The new wrappers require struct gk20a pointer, and gk20a_fence_wait()
did not have access to one. Add struct gk20a pointer as the first
parameter.

JIRA NVGPU-16

Change-Id: I73b2b8f091ca29fb1827054abd2adaf583710331
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/1331565
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2017-04-11 10:56:06 -07:00
Alex Waterman
a94b4bcde9 gpu: nvgpu: Abstraction for *sleep, *delay
Add abstractions for the following:

  msleep()
  udelay()
  usleep_range()

These functions are only a subset of the available Linux delay and sleep
functions but this seems to be what we use and what is actually useful
for driver development.

Bug 1799159
Jira NVGPU-16

Change-Id: I1a25b66314f365432f2f0a5ff1b3a0a5689fc047
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: http://git-master/r/1309087
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-by: David Martinez Nieto <dmartineznie@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
2017-04-03 13:20:55 -07:00
Alex Waterman
ebe71ea9a2 gpu: nvgpu: Remove 0x from function name print
Remove an 0x that prepended a function name print (not a
function address so the 0x is pretty silly).

Bug 1799159

Change-Id: I208192e3cc22699dca13158ab3a33451cee843b0
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: http://git-master/r/1320840
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
Reviewed-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-by: Konsta Holtta <kholtta@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
2017-03-22 19:46:40 -07:00
Konsta Holtta
b9991767cc gpu: nvgpu: drop 0x in front of timed out symbol
The Linux timer code prints an error message containing the caller when
a timeout happens. The caller is formatted as a function name instead of
a pointer, so don't print 0x in front of it.

Bug 1799159

Change-Id: I4f86d885aba78ca20ba025a91c8c940d3c927d58
Signed-off-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-on: http://git-master/r/1315749
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
2017-03-07 08:09:37 -08:00
Konsta Holtta
92fe000749 gpu: nvgpu: rename timeout_check to timeout_expired
Change "check" to "expired" in nvgpu_timeout_check* and append _expired
to nvgpu_timeout_peek to clarify what the boolean-like return value
means and thus avoid bugs.

Bug 200260715

Change-Id: I47e097ee922e856005a79fa9e27eddb1c8d77f8b
Signed-off-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-on: http://git-master/r/1269366
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2016-12-19 15:40:36 -08:00
Alex Waterman
d8fd0e6467 gpu: nvgpu: Add timeout API
Add a timeout API to nvgpu since this is a common operation done all
across the nvgpu driver.

Also add two new directories for this common code:

  drivers/gpu/nvgpu/common
  drivers/gpu/nvgpu/include/nvgpu

The common directory is for common C code. The include directory is for
common include files.

Bug 1799159

Change-Id: I8b710eecaa75c0707df83f859fb28484525185a6
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: http://git-master/r/1255864
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
2016-12-05 16:16:16 -08:00