Commit Graph

7 Commits

Author SHA1 Message Date
Kartik Rajput
84236d8fce gpu: nvgpu: Fix compilation issues with Kernel-6.5
Upstream commit "7e3f926bf453"

[rcu/kvfree: Eliminate k[v]free_rcu() single argument macro]

Removes the single-argument kvfree_rcu() and kfree_rcu() macros. Code
that would have previously used these single-argument kvfree_rcu() and
kfree_rcu() macros should instead use kvfree_rcu_mightsleep() or
kfree_rcu_mightsleep().

Use kfree_rcu_mightsleep() instead of kfree_rcu() if using Kernel-6.5 or
newer.

Bug 4276500

Change-Id: I1adb4125c83019ea6c0e7d37175716ee7ed659cc
Signed-off-by: Kartik Rajput <kkartik@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2978710
(cherry picked from commit 2ede069c81db420c2d5fbd00bee4030fd943f3f7)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/3037021
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Tested-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-18 09:12:03 -08:00
Mikko Perttunen
6953c61a1b gpu: nvgpu: linux/host1x: Allocate syncpoints from GPU pool
On systems with GPU syncpoint pools, pass the flag to allocate
from it.

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Change-Id: I184196f1876e59e492a2cc71d7f190416ce9061f
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2826199
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Sanif Veeras <sveeras@nvidia.com>
Reviewed-by: Arto Merilainen <amerilainen@nvidia.com>
Reviewed-by: Raghavendra Vishnu Kumar <rvk@nvidia.com>
2022-12-17 11:42:47 -08:00
Mikko Perttunen
5c8e511e48 gpu: nvgpu: linux/host1x: Execute fence callback in non-atomic context
Due to changes in the host1x driver, dma_fence callbacks will be
executed in interrupt context instead of workqueue context as
previously. To allow for that, this patch effectively moves the
workqueue step into nvgpu so that the in-nvgpu fence callback gets
executed in workqueue context.

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Change-Id: I7bfa294aa3b4bea9888921b79175a8fc218d8e3f
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2785968
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-10-27 11:54:31 -07:00
Jon Hunter
34f478fca6 gpu: nvgpu: Add host1x support for Tegra234
Add support for the upstream host1x driver in NVGPU for Tegra234.

Bug 3724727
Bug 3752030

Change-Id: I529b731ea3feb3c8c435e7433772af82004ea208
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2759207
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sagar Kamble <skamble@nvidia.com>
Reviewed-by: Alex Waterman <alexw@nvidia.com>
GVS: Gerrit_Virtual_Submit
2022-08-12 15:51:50 -07:00
Sagar Kamble
e083bd0df2 gpu: nvgpu: fix syncpt increment logic in host1x syncpt_set_minval
On host copy engine PBDMA interrupt, channel is aborted as part of the
recovery and its syncpt value is set to the max threshold.

Syncpoint may then get incremented by PBDMA (incr cmd gets processed)
after this interrupt is handled leading to syncpoint value becoming
greater than the max threshold.

Again while unbinding the channel, syncpoint value is incremented until
it reaches max threshold. Since syncpoint value is already greater than
max threshold, host1x version of nvgpu_nvhost_syncpt_set_minval will
loop for entire u32 range until it reaches max threshold and this
will hang the channel unbind.

nvgpu_nvhost_syncpt_set_minval can ensure the syncpoint value is greater
than or equal to max threshold. Hence update the check for syncpoint
value from not equal to less than.

Bug 3681100

Change-Id: I96e7a1f53d4037e9ed858a2e90dd5a8d17ed6bb0
Signed-off-by: Sagar Kamble <skamble@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2742604
(cherry picked from commit f246facd01)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2742603
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
GVS: Gerrit_Virtual_Submit
2022-07-14 09:09:37 -07:00
Konsta Hölttä
a28612220a gpu: nvgpu: return -ENOSYS if no host1x
The callers of nvgpu_get_nvhost_dev() expect that if all goes well,
nvhost and syncpoint support exists. Thus if the device tree entry is
not found, return -ENOSYS instead of 0.

Bug 3394386

Change-Id: I4617aa2cfc240ade53294c26b3e8c2ce50b66913
Signed-off-by: Konsta Hölttä <kholtta@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2608549
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2021-10-11 12:29:09 -07:00
Jon Hunter
8c94013c4d gpu: nvgpu: Add host1x support
Add support for the upstream host1x driver with the 'Host1x/Tegra UAPI'
series [0] applied. The host1x support is only enabled if the kernel
configuration variable CONFIG_TEGRA_HOST1X_NEXT is set. Please note that
the initial implementation only supports Tegra194.

[0] https://patchwork.ozlabs.org/project/linux-tegra/list/?series=206532

Bug 3156385

Change-Id: If531a8b866b48ba5a2af021756a4b5d158b8d59a
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2429981
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Sagar Kamble <skamble@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: automaticguardword <automaticguardword@nvidia.com>
GVS: Gerrit_Virtual_Submit
2020-12-15 14:13:48 -06:00