Commit Graph

16 Commits

Author SHA1 Message Date
Deepak Nibade
f43231f7a5 gpu: nvgpu: enable big page support for pci
While mapping the buffer, first check if buffer is in
vidmem, and if yes convert allocation into base address
And then walk through each chunk to decide the alignment

Add new API gk20a_mm_get_align() which returns the
alignment based on scatterlist and aperture, and use
this API to get alignment during mapping

Enable big page support for pci by unsetting disable_bigpage

Jira DNVGPU-97

Change-Id: I358dc98fac8103fdf9d2bde758e61b363fea9ae9
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1207673
(cherry picked from commit d14d42290eed4aa7a2dd2be25e8e996917a58e82)
Reviewed-on: http://git-master/r/1210959
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2016-09-01 09:12:15 -07:00
Lakshmanan M
1b216d778a gpu: nvgpu: Disable rail gating for dGPU
Bug 200224907

Change-Id: I515bba1987e54fb5ab78efda85916b6f0d3a4297
Signed-off-by: Lakshmanan M <lm@nvidia.com>
Reviewed-on: http://git-master/r/1201233
(cherry picked from commit aa45908e77d451376728860cebe3938e765c4388)
Reviewed-on: http://git-master/r/1201654
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
2016-08-12 08:13:34 -07:00
Terje Bergstrom
4a979fd7bc gpu: nvgpu: Set PCI device node permissions
Device nodes for PCI devices need to be RW for everybody.

Bug 200225622

Change-Id: I14de9d17f76ca45ba525d0c4f5e8d448bbfda98b
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/1198556
(cherry picked from commit 60bf9118715b61b8cd3f2379479caf280ae4e35c)
Reviewed-on: http://git-master/r/1200713
Reviewed-by: Automatic_Commit_Validation_User
2016-08-10 18:17:03 -07:00
Lakshmanan M
89aecd1202 gpu: nvgpu: Add nvgpu infra to allow kernel to create privileged CE channels
Added interface to allow kernel to create privileged CE channels for
page migration and clearing support between sysmem and videmem.

JIRA DNVGPU-53

Change-Id: I3e18d18403809c9e64fa45d40b6c4e3844992506
Signed-off-by: Lakshmanan M <lm@nvidia.com>
Reviewed-on: http://git-master/r/1173085
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
2016-07-20 03:09:28 -07:00
Sachit Kadle
874e3d98d6 gpu: nvgpu: fix sparse warning
Add static qualifier to nvgpu_pci_pm_init, as it is
only used within the current file.

Bug 200067946
Bug 200088648

Change-Id: Ifb7d3ec174a9f8eea0ac53421c953761886f48c6
Signed-off-by: Sachit Kadle <skadle@nvidia.com>
Reviewed-on: http://git-master/r/1181867
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Tested-by: Sachin Nikam <snikam@nvidia.com>
2016-07-15 23:19:39 -07:00
Sachit Kadle
a2831f098b gpu: nvgpu: enable runtime pm for pci
Enable runtime power management ops for PCIe devices, and
move gk20a_pm_finalize_poweron call into the resume routine.
This change only implements suspend as a stub, as suspend/resume
has not yet been verified for dGPU

Bug 1785512
Bug 200187507

Change-Id: I076bafc03c6b4ba10dce874804ed3fd0b9c7b0d8
Signed-off-by: Sachit Kadle <skadle@nvidia.com>
Reviewed-on: http://git-master/r/1179860
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-by: Thomas Fleury <tfleury@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Richard Zhao <rizhao@nvidia.com>
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
2016-07-13 21:26:02 -07:00
David Pu
cfb067b6d7 gpu: nvgpu: fix issue with CONFIG_DEBUG_FS=n
following compilation error are reported with CONFIG_DEBUG_FS=n:

pci.c:246:7: error: 'struct mm_gk20a' has no member named 'ltc_enabled'
pci.c:247:7: error: 'struct mm_gk20a' has no member named 'ltc_enabled_debug'
possible compilation error(reported sometime):
gk20a_allocator.c:1163:13: error: 'gk20a_alloc_debugfs_init' defined
but not used
fixed by adding '#ifdef CONFIG_DEBUG_FS' for debug only code.

following variables from gk20a.c are not initialized from
CONFIG_DEBUG_FS=n path, it will cause kernel oops when booting:

	gk20a->mm.bypass_smmu = platform->bypass_smmu;
	gk20a->mm.disable_bigpage = platform->disable_bigpage;
	gk20a->mm.has_physical_mode = true;
fix it by move them out from '#ifdef CONFIG_DEBUG_FS' section.

Bug 1778001

Change-Id: Ic2da36b3f500882748ee46a5150903244b697761
Signed-off-by: David Pu <dpu@nvidia.com>
Reviewed-on: http://git-master/r/1167358
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
2016-06-22 12:41:57 -07:00
Deepak Nibade
e4dc4adb3b gpu: nvgpu: fix sparse warning
Fix below sparse warning :
$TOP/kernel/nvgpu/drivers/gpu/nvgpu/pci.c:145:14: warning: symbol
'nvgpu_pci_class' was not declared. Should it be static?

Bug 200088648

Change-Id: Ia3e8f1ae426fa72254b5204da0f6f85502b4670c
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1155981
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>
2016-05-30 08:18:08 -07:00
Mahantesh Kumbar
ed32288ee8 gpu: nvgpu: ELPG init based on flag
flag helps to enable/disable ELPG init in SW

Bug N/A

Change-Id: I73eb592b789c2c29db8a75018cbd1617dcf16df8
Signed-off-by: Mahantesh Kumbar <mkumbar@nvidia.com>
Reviewed-on: http://git-master/r/1152430
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
2016-05-26 16:07:33 -07:00
Terje Bergstrom
dc08f78c57 gpu: nvgpu: Move PCI devnodes to own directory
To be able to scan, PCI devnodes need to be in a directory with read
permission. By default /dev is read protected by SELinux policy. Move
the devnodes to their own directory so that reading this one
directory can be allowed.

At the same time rename the nodes to start with string "card-".

JIRA DNVGPU-54

Change-Id: I0df4ced08afd1f3a468e983d07395ffcb8050365
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/1152745
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Konsta Holtta <kholtta@nvidia.com>
GVS: Gerrit_Virtual_Submit
2016-05-25 11:58:54 -07:00
Terje Bergstrom
9c9c0a8234 gpu: nvgpu: Disable big pages for dGPUs
Big pages are not supported by all dGPUs on sysmem. Disable support
for all dGPUs for now.

Change-Id: I7bdcd9b18845c3d32d40e33220bf9afaf2d8c28e
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/1150547
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Konsta Holtta <kholtta@nvidia.com>
2016-05-23 08:04:48 -07:00
Terje Bergstrom
1fc23d1280 gpu: nvgpu: Define watchdog timeout for PCIe
Watchdog timeout is now zero for PCIe devices. This makes also
semaphore acquire timeout to be zero. Fix the timeout to be the
same as for platform devices.

JIRA DNVGPU-7

Change-Id: I5c2921b65f4f957c08a4e9f815deeed2ba231013
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/1134441
2016-05-06 09:06:09 -07:00
Deepak Nibade
8b55a34c1d gpu: nvgpu: fix sparse warning
Fix below sparse warning:
drivers/gpu/nvgpu/pci.c:52:23: warning: symbol 'nvgpu_pci_device' was
not declared. Should it be static?

Bug 200067946
Bug 200088648

Change-Id: Ie30c952e0addf16fe3639e9372ecaace552d6e46
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1142612
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2016-05-06 02:59:45 -07:00
Konsta Holtta
52a4883114 gpu: nvgpu: fix copy-paste error with bar1 ioremap
If bar1 resource remap fails during initialization, return the correct
error code from g->bar1 instead of g->regs.

Coverity ID 32068
Bug 200192125

Signed-off-by: Konsta Holtta <kholtta@nvidia.com>
Change-Id: Ia326bfa122259c7b3402f78746673612f0ac0009
Reviewed-on: http://git-master/r/1141078
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
2016-05-05 18:21:17 -07:00
Terje Bergstrom
eac46a64c0 gpu: nvgpu: Add PCIe id to device node name
Use device name to distinguish between different instances of PCIe
devices.

JIRA DNVGPU-7

Change-Id: Ice0a9dae41396c8faada1815afd1237907896036
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/1140685
Reviewed-by: Sami Kiminki <skiminki@nvidia.com>
GVS: Gerrit_Virtual_Submit
2016-05-05 13:03:55 -07:00
Terje Bergstrom
6d888006aa gpu: nvgpu: Add PCIe device support
Add support for probing PCIe graphics cards.

JIRA DNVGPU-7

Change-Id: Iad3d31a1dc0ca6575d8a9916857022cac9181948
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/1127684
2016-04-27 08:10:54 -07:00