1.There is a switch-case where one case is falling to the
next case. This is creating the compilation warning.
Make this fall through as intentional by adding
compiler attribute as "fallthrough".
2.Remove redefinition of macro MII_ADDR_C45
Bug 4055275
Change-Id: I99193b225e97c414588bb306cb48e472ae079f9f
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2882027
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
The nvgpu is lying in separate repository and it is required
to build directly from that repository instead of copying source
to nvidia-oot tree and then build.
Remove the list of files/directories to copy to nvdia-oot source
path.
Bug 4038415
Change-Id: I236440d0e94335bb642b415ca8ef275acff69067
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2880467
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Using this patch we are fixing below cert warnings :-
1. cert_err33_c_violation: The error status of function
call snprintf(name, 20UL, "ivc-queue%d", i) is not checked.
2. cert_err33_c_violation: The error status of function call
snprintf(name, 30UL, "gr-virt-comm-%d", i) is not checked.
3. cert_err33_c_violation: The error status of function call
snprintf(name, 20UL, "mempool%d", i) is not checked.
Below changes has been done to fix above cert warnings:-
1. check the return value to snprintf function and handle
return error gracefully.
Bug 3512545
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Change-Id: Ia41ab89e3759387b36489dca5f57652f7389f328
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2676650
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
1. kernel/nvidia/drivers/video/tegra/virt/tegra_gr_comm.c:604:14:
warning: incorrect type in assignment (different address spaces)
2. kernel/nvidia/drivers/virt/tegra/hvc_sysfs.c:154:17:
warning: cast removes address space '__iomem' of expression
3. kernel/nvidia/drivers/virt/tegra/hvc_sysfs.c:189:17:
warning: incorrect type in argument 1 (different address spaces)
4. kernel/nvidia/drivers/virt/tegra/ivc-cdev.c:330:27:
warning: incorrect type in initializer (different base types)
5. kernel/nvidia/drivers/virt/tegra/tegra_hv.c:378:42:
warning: incorrect type in argument 1 (different address spaces)
6. kernel/nvidia/drivers/virt/tegra/tegra_hv.c:386:26:
warning: incorrect type in argument 1 (different address spaces)
7. kernel/nvidia/drivers/virt/tegra/tegra_hv.c:444:22:
warning: cast removes address space '__iomem' of expression
8. kernel/nvidia/drivers/virt/tegra/tegra_hv.c:543:58:
warning: incorrect type in assignment (different base types)
9. kernel/nvidia/drivers/virt/tegra/tegra_hv.c:544:62:
warning: incorrect type in assignment (different base types)
10. kernel/nvidia/drivers/virt/tegra/tegra_hv.c:547:62:
warning: incorrect type in assignment (different base types)
11. kernel/nvidia/drivers/virt/tegra/tegra_hv.c:823:10:
warning: symbol 'tegra_hv_ivc_tx_frames_available' was not declared. Should it be static?
12. kernel/nvidia/drivers/virt/tegra/tegra_hv_pm_ctl.c:330:57:
warning: incorrect type in initializer (different base types)
13. kernel/nvidia/drivers/virt/tegra/tegra_hv_pm_ctl.c:389:27:
warning: incorrect type in initializer (different base types)
To fix above sparse warnings we are making below changes :-
1. use the __poll_t data type when we are using polling framework.
2. pass __iomem type pointer to io framework.
Bug 3528414
Jira ESLC-6572
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Change-Id: I371e0bdc435d60623bc1405a9383bf45b6274f90
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2673587
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit
Change the type of ptr to void __iomem * from void *
as ioremap_cache expects the return type to be __iomem *
This fixes the following sparse warning:
tegra_gr_comm.c:243:34:
warning: incorrect type in assignment (different address spaces)
Bug 200434802
Change-Id: I296cc8048da649e84961239cb37bcd99ffe153a7
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1848879
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This patch increases the timeout for the wait_event from 250ms to 500ms.
Bug 1653184
Bug 1653182
Change-Id: I339f9d2eef20dcec8cd0a240900ab8af5c710c59
Signed-off-by: Aniruddha Banerjee <aniruddhab@nvidia.com>
Reviewed-on: http://git-master/r/1462093
Reviewed-by: Nitin Sehgal <nsehgal@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Timo Alho <talho@nvidia.com>
Tegra graphics virtualization (host1x syncpoint and gpu) is now
exposed to client drivers (nvhost and nvgpu). These interfaces
rely on a communication framework to communicate with the server
driver that actually implements the back-end routines.
Bug 1509608
Change-Id: I5277f4b024953772a2215d33afa178162f5f9232
Reviewed-on: http://git-master/r/440120
Reviewed-on: http://git-master/r/1198193
Signed-off-by: Aniruddha Banerjee <aniruddhab@nvidia.com>
Reviewed-on: http://git-master/r/1314828
GVS: Gerrit_Virtual_Submit
Reviewed-by: Timo Alho <talho@nvidia.com>
Create merge commit for drivers/misc/mods
from kernel/nvidia to merge it to kernel/nvidia-oot
Merge remote-tracking branch 'origin/dev/ldewangan/nvidia-mods-dev-main' into nvidia-oot-mods-dev-main
Bug 4038415
Change-Id: I5fd8da6cd996b0fc2199aab17e9fecd200411e8b
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Create merge commit for drivers/gpu/host1x-nvhost
from kernel/nvidia to merge it to kernel/nvidia-oot
Merge remote-tracking branch
'origin/dev/ldewangan/nvidia-host1x-nvhost-dev-main'
into nvidia-oot-host1x-nvhost-dev-main
Bug 4038415
Change-Id: If4433f8710cb112c3372abd2ebad45ea88a02b3e
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
[1] The DLA firmware configures the DEST and MASK registers during
the initialization.
[2] In OOT, the DLA KMD is accidentally setting the interrupts. This
will result in enabling additional interrupts that the firmware
does not handle (like NVDLA_GENERIC_INTR_FAULT_CRITICAL).
[3] This commit fixes the issue by avoiding the interrupt settings
at the DLA KMD.
Bug 3960841
Change-Id: Ied77ac7564ae3b3202b9cceaf08ad3c7da9f947c
Signed-off-by: Arvind M <am@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2861253
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
The syncpt interface APIs in the host1x-nvhost driver slightly differ
from those in the legacy nvhost driver because instead of passing the
platform device structure for the host1x device, the platform device
structure for the host1x client device is passed.
By aligning the APIs so that we pass the platform device structure for
the host1x in all implementations, we can simplify the PVA driver and
directly use the APIs in the NVIDIA display driver.
The NVIDIA display driver requires some additional syncpt interface APIs
and so implement these as well.
Bug 3713048
Change-Id: I507e6fd066e6e22c0c47c20ba0dd3be5fa033c59
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2813827
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
With Linux v6.1, if CONFIG_PCI_P2PDMA is enabled, then mapping the
syncpt shim causes a kernel paging request fault. The fault occurs when
dma_map_sg_attrs() is called in by nvhost_syncpt_unit_interface_init(),
which is attempting to map the syncpt shim MMIO space.
The function dma_map_sg_attrs() calls iomm_dma_map_sg() and since
upstream Linux commit 30280eee2db1 ("iommu/dma: support PCI P2PDMA pages
in dma-iommu map_sg") was added this now calls is_pci_p2pdma_page(). The
function is_pci_p2pdma_page() requires that there is a 'struct page'
associated with the sg, but this is not the case and so deferencing the
'struct page' pointer returned by sg_page() results in a paging fault.
Using dma_map_sg_attrs() to map MMIO that is not associated with valid
page structures is not guaranteed to work. Therefore, fix this by using
dma_map_resource() to map the syncpt shim instead.
Bug 3871422
Change-Id: I2b08a3b78be0850bff44e62bfc93c8d095eb82a2
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2818417
(cherry picked from commit 97f1282f2959c208effebf93cc5061d6e7fa6c55)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2819086
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Drivers, such as the PVA and DLA driver, that call
nvhost_syncpt_unit_interface_init() during probe are missing a call to
clean-up the DMA mappings this function may create if the driver probe
fails or if the driver is removed. The function
nvhost_syncpt_unit_interface_init() may make a call to
dma_map_sg_attrs() and we need to ensure that dma_unmap_sg_attrs() is
called if the probe of the driver fails or if the driver is unloaded.
Add a new function, nvhost_syncpt_unit_interface_deinit(), that calls
dma_unmap_sg_attrs() if needed for drivers to call.
Bug 3800349
Change-Id: I62a4e19cd42878dac54fa623509440596ffdf17f
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2801280
(cherry picked from commit cee12fb989186611aa9deb5ada45831ab5f783aa)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2801934
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
When building the host1x-nvhost driver as an external module, the driver
source is now copied into a common location with all the other external
modules. Therefore, we can now use the 'srctree.nvidia' path for finding
the necessary header files for Host1x. Update the include search paths
to use 'srctree.nvidia' when building the driver.
Bug 3817518
Change-Id: I443dd4cb6d01c4e9be8f3c02550b1050d0bcfd28
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2785956
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
1. Replace nvhost print functions with PVA driver's private
implementation with similar functionalities.
2. Change syncpoint from host managed to client managed so that
syncpoint max value is tracked inside PVA driver. This change is needed
because upstream host1x driver doesn't allow decrement of max value.
3. Various minor changes for adapting to upstream kernel APIs.
Bug 3662478
Change-Id: I16eff6c06c51afe0f274598e1273404924d18684
Signed-off-by: Nan Wang <nanwa@nvidia.com>
Signed-off-by: Abhinaya Agrawal <abhinayaa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2710684
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Both host1x and nvhost expose APIs that deinitialize the debugfs
and remove debugfs files/directories that were created. At present,
debugfs_remove() is inovked to do this. However,
debugfs_remove_recursive() should instead be used to ensure that
all files within a debugfs are recursively removed before the
directory is removed.
Bug 3662478
Change-Id: Idb7d1458c02f57f6d656a7bfe1df3adf5e0497aa
Signed-off-by: Abhinaya Agrawal <abhinayaa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2714042
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Omar Nemri <onemri@nvidia.com>
GVS: Gerrit_Virtual_Submit