Commit Graph

1196 Commits

Author SHA1 Message Date
Jon Hunter
6ecfb593db gpu: nvgpu: Don't use strlcpy()
For Linux v6.8, the function strlcpy() has been removed. The function
strscpy() was added in Linux v4.3 and has been preferred over strlcpy().
See upstream Linux commit 30035e45753b ("string: provide strscpy()") for
more details. The Linux checkpatch.pl script warns against using
strlcpy().

The function strscpy() takes the same arguments as strlcpy(), but
returns a type of ssize_t instead of size_t. Update the NVGPU to use
strscpy() instead of strlcpy().

Bug 4448428

Change-Id: I0464b13720de20288a50375b167740ea514ca130
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/3059558
(cherry picked from commit 5a12d5469192620e5c5b9e8828c728c148f10425)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/3062999
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-25 13:54:56 -08:00
Jon Hunter
733f13a8bf gpu: nvgpu: Fix missing headers for Linux v6.8
For Linux v6.8, commit ef175b29a242 ("of: Stop circularly including
of_device.h and of_platform.h") updated the OF headers included by these
header files. This breaks the build for various drivers and so fix this
by including the headers that are actually needed for each driver.

Bug 4448428

Change-Id: I6cb9df4d9b8aad1d358fed02f84c43ba303c8f38
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/3033096
(cherry picked from commit abe31c1527d5bff2f00cee445f4239e3e7eb71d2)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/3062998
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-25 13:54:50 -08:00
Ramalingam C
55668cb82c gpu: nvgpu: allow powergating during bind_context ioctl
Do not check for powergate disablement for bind and unbind of the context
ioctls. As bind and unbind of context is just a sw statemachine related
ops we can ignore even if the power gating is still on. No need to print
the error message.

Bug 4397568

Change-Id: Idc71e12a4188cbc1c94c38032a2f1ed435d278ce
Signed-off-by: Ramalingam C <ramalingamc@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/3034385
(cherry picked from commit 5f1dfe20366637f59b04b8968a527dbc3fac0d9f)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/3035373
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Tested-by: Tushar Kashalikar <tkashalikar@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-20 04:39:27 -08:00
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
Laxman Dewangan
b702c927da nvgpu: Use kstrtobool instead of strtobool
The function strtobool() is implemented inline with
using kstrtobool(). The function strtobool() is removed
from mainline Linux 6.7 with below change.

**
commit 9bf2850c9170b52a6ab052085feced55effa78ef
Author: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

        kstrtox: remove strtobool()
**

Use the kstrtobool() now.

Bug 4346767

Change-Id: I2b22eb4668ae2b3e693b6b3177cc23270f14b557
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/3019995
(cherry picked from commit 475e8e07cf5d22da5721e2ac21b767bfb94a2746)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/3037015
Tested-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-18 09:11:58 -08:00
Laxman Dewangan
3fdada39ff nvgpu: linux: ioctl: Avoid call of mmap_write_{trylock,unlock}
The API mmap_write_trylock() is deleted from core kernel with
following change in Linux 6.6
---
commit cf95e337cb63cfbf5c9ea1a1f64f9818b979e3b3
Author: Hugh Dickins <hughd@google.com>
Date:   Tue Jul 11 21:48:48 2023 -0700

    mm: delete mmap_write_trylock() and vma_try_start_write()
----

Replace the mmap_write_trylock() call with down_write_trylock with
appropriate argument.

Bug 4346767

Change-Id: I076ad51b012c706a4bada3bd303db1802cca34dd
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/3007342
(cherry picked from commit 344c682a2077eb95c7d24ef1c0bf40eda70e524e)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/3036796
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Tested-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-18 09:11:53 -08:00
Jon Hunter
261d4bed13 gpu: nvgpu: Enable -Wmissing-prototypes
The compiler option -Wmissing-prototypes is being enabled globally in
the upstream Linux kernel and this causes build failures for nvgpu. The
build failures occur because either the driver is missing an include
file which has the prototype or because the function is not declared
statically when it should be (ie. there are no external users).

Fix the various build failures and enable -Wmissing-prototypes to
prevent any new instances from occurring.

Bug 4404965

Change-Id: I551922836e37b0c94c158232d6277f4053e9d2d3
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/3027483
(cherry picked from commit e8cbf90db2d0db7277db9e3eec9fb88d69c7fcc7)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/3035518
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-12-15 14:09:44 -08:00
Jon Hunter
cb63633038 gpu: nvgpu: Remove unused function
When compiling NVGPU with the GCC option '-Wmissing-prototypes' the
following error is observed ...

 nvgpu/drivers/gpu/nvgpu/os/linux/nvlink.c:42:5:
  error: no previous prototype for nvgpu_nvlink_train
  [-Werror=missing-prototypes]
   | int nvgpu_nvlink_train(struct gk20a *g, u32 link_id, bool from_off)
   |     ^~~~~~~~~~~~~~~~~~

The function nvgpu_nvlink_train() is no longer used and has not been
used for a long time. Therefore, fix the above by removing this legacy
function.

Bug 4404965

Change-Id: Ib5d13b024a072d20cb569cfa77a86a74274d3fe7
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/3029179
(cherry picked from commit e378ca55059fdf649d3300ae98ba80ac6262c893)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/3035510
Reviewed-by: Alex Waterman <alexw@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-15 11:54:35 -08:00
Jon Hunter
41e6fae71e gpu: nvgpu: Use conftest test for class_create
A test has already been added to the conftest script for checking if the
class_create() function has a module pointer argument or not. So use
the definition generated by conftest to select which version of the
function to use.

Bug 4221847
Bug 4276500

Change-Id: If4b4445b2dfb2ec6556ca8c4ef9931e6b8833357
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/3015846
(cherry picked from commit cf745fa6d89a277dc8fb72454b9a7d26454e8b8d)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/3017318
Reviewed-by: Sagar Kamble <skamble@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-11-16 05:54:23 -08:00
Shardar Mohammed
7a5b01c4af nvgpu: class: remove module * from class_create()
Remove the module pointer from the class_create() based
on following change in core kernel

======
driver core: class: remove module * from class_create()

The module pointer in class_create() never actually did anything, and it
shouldn't have been requred to be set as a parameter even if it did
something.  So just remove it and fix up all callers of the function in
the kernel tree at the same time.

Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
=====

Bug 4276500

Change-Id: Ic98eb87651d4038d8278966e7b3bd39988f55086
Signed-off-by: Shardar Mohammed <smohammed@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2976482
(cherry picked from commit b3b6373c163709a19d880e457199b3b67ca935c2)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/3015724
Reviewed-by: Sagar Kamble <skamble@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Jonathan Hunter <jonathanh@nvidia.com>
2023-11-15 02:54:18 -08:00
shaochunk
7a65a3e636 gpu: nvgpu: support module parameters for devfreq
For POR like safety GPU, we may specify devfreq
timer and governor to keep GPU running with high
performance.

This change supports module parameters for
specifying devfreq governor and devfreq timer.

safety nvgpu module parameter example:
devfreq_timer="delayed" devfreq_gov="performance"

Regarding devfreq timers, a delayed timer can
ensure that the devfreq monitor polls on time.
However, a deferrable timer might potentially
cause a delay in polling time.

Regarding devfreq governors, the default governor
of nvgpu is nvhost_podgov, which scales the gpu
frequency based on GPU load reported by PMU.
Using the performance governor will keep the GPU
operating at a higher GPU frequency,
providing better performance.

Bug 4084478

Change-Id: I9dfef11648203c6af281e980d3a5790b36742414
Signed-off-by: shaochunk <shaochunk@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2978810
Reviewed-by: Divya Singhatwaria <dsinghatwari@nvidia.com>
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-10-23 05:09:38 -07:00
shaochunk
d28dda7149 gpu: nvgpu: configure nvgpu lpwr with module parameters
Support nvgpu lpwr configuration with module
parameter, setting for each lpwr feature
would be profiled with bit operation.

module parameter: lpwr_enable
┌───────┬───────┬───────────────────────────────────────────┐
│  Bit  │ Reset │ Description                               │
╞═══════╪═══════╪═══════════════════════════════════════════╡
│ 0:1   │ 0x0   │ BLCG enablement.                          │
│       │       │ 0b00, 0b01: default platform configuration│
│       │       │ 0b10: disable feature                     │
│       │       │ 0b11: enable feature                      │
├───────┼───────┼───────────────────────────────────────────┤
│ 2:3   │ 0x0   │ ELCG enablement                           │
│       │       │ 0b00, 0b01: default platform configuration│
│       │       │ 0b10: disable feature                     │
│       │       │ 0b11: enable feature                      │
├───────┼───────┼───────────────────────────────────────────┤
│ 4:5   │ 0x0   │ ELPG enablement.                          │
│       │       │ 0b00, 0b01: default platform configuration│
│       │       │ 0b10: disable feature                     │
│       │       │ 0b11: enable feature                      │
├───────┼───────┼───────────────────────────────────────────┤
│ 6:7   │ 0x0   │ FLCG enablement.                          │
│       │       │ 0b00, 0b01: default platform configuration│
│       │       │ 0b10: disable feature                     │
│       │       │ 0b11: enable feature                      │
├───────┼───────┼───────────────────────────────────────────┤
│ 8:9   │ 0x0   │ SLCG enalement.                           │
│       │       │ 0b00, 0b01: default platform configuration│
│       │       │ 0b10: disable feature                     │
│       │       │ 0b11: enable feature                      │
├───────┼───────┼───────────────────────────────────────────┤
│ 10:11 │ 0x0   │ AELPG enablement.                         │
│       │       │ 0b00, 0b01: default platform configuration│
│       │       │ 0b10: disable feature                     │
│       │       │ 0b11: enable feature                      │
├───────┼───────┼───────────────────────────────────────────┤
│ 12:13 │ 0x0   │ MSCG enablement.                          │
│       │       │ 0b00, 0b01: default platform configuration│
│       │       │ 0b10: disable feature                     │
│       │       │ 0b11: enable feature                      │
└───────┴───────┴───────────────────────────────────────────┘

Bug 4084478

Change-Id: I7f1e506fec3196d3b4f90006dc2f4162da6c4990
Signed-off-by: shaochunk <shaochunk@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2978579
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Reviewed-by: Divya Singhatwaria <dsinghatwari@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-10-23 05:09:32 -07:00
Jon Hunter
f2afbafcfd gpu: nvgpu: Use conftest to handle kernel version differences
Instead of relying on kernel version to determine if the 'dev' member of
the 'struct class' is const, add a compile time test to the conftest.sh
script to determine this at compile time for the kernel being used. This
is beneficial for working with 3rd party Linux kernels that may have
back-ported upstream changes into their kernel and so the kernel version
checks do not work.

Bug 4119327

Change-Id: I5b3c886fa4bac7560c2c26534bed9f495d57195b
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2986637
(cherry picked from commit f9d48796dc2a292bb02a90677774a5568f9f1651)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2990696
Reviewed-by: Ankur Kishore <ankkishore@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-10-04 05:49:32 -07:00
Jon Hunter
0fa5fc1583 gpu: nvgpu: Drop version check for DMA BUF namespace
The MODULE_IMPORT_NS macro adds a namespace tag to the module
information. The DMA_BUF namespace is required for Linux v5.16+ kernels
for drivers that use DMA BUF, there is no reason not to populate this
for earlier kernels. Furthermore, some 3rd party kernels prior to v5.16
may require this too and so drop the version check around the DMA BUF
namespace.

The MODULE_IMPORT_NS macro was introduced in Linux v5.4 and so if the
kernel defines this, then add the DMA_BUF namespace.

Bug 4119327

Change-Id: Ic9acfeedce3a783434fe9cc2ded788c522629bbd
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2986636
(cherry picked from commit fd8ed471078450172062ca2a11f13d99ad57e1cb)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2990695
Reviewed-by: Ankur Kishore <ankkishore@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-10-04 05:49:26 -07:00
Jon Hunter
9fab6f05af gpu: nvgpu: Add compilation flag for iosys-map.h
Determining whether the header file iosys-map.h is present in the kernel
is currently determine by kernel version. However, for Linux v5.15,
iosys-map.h has been backported in order to support simple-framebuffer
for early display. Therefore, we cannot rely on the kernel version to
indicate whether iosys-map is present. This is also true for 3rd party
Linux kernels that backport changes as well. Fix this by adding a
compile time flag, that will be set accordingly by the conftest script
if this header is present.

Bug 4119327
Bug 4228080

Change-Id: I303b1060643b18709a236be5e0268d39cf540054
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2974081
(cherry picked from commit 41c1afb165122e98004005b8513d131b492269e9)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2946965
Reviewed-by: Sagar Kamble <skamble@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-09-20 09:40:18 -07:00
Martin Radev
22e1608e72 gpu: nvgpu: support cpu unix timestamps for cpu-gpu correlation
This patch extends the CPU-GPU query interface to also support
CPU UNIX-based timestamps.

Bug 4059666

Change-Id: Iecb937df38d3913559499fed1027a7157ad8d151
Signed-off-by: Martin Radev <mradev@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2973572
Reviewed-by: Sagar Kamble <skamble@nvidia.com>
Reviewed-by: Ankur Kishore <ankkishore@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-09-06 01:58:06 -07:00
Jon Hunter
91ac1541a5 gpu: nvgpu: Remove version check for devfreq support
The soft-depedenency for the governor_pod_scaling_v2 driver was
initially added to ensure this driver is loaded when built as an
out-of-tree module. The driver has now been renamed to
governor_pod_scaling but instead of simply updating the soft-dependency
name a new soft-dependency was added specifically with the new driver
name. This is not necessary and this also breaks frequency scaling
support for kernels for kernel to prior to v5.15. Fix this by removing
this compile time check and legacy soft-dependency.

Bug 4074863
Bug 4223170

Change-Id: Ie3179446896c388ec13b63a1af368149ed4b145c
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2948084
Reviewed-by: Sagar Kamble <skamble@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: Johnny Liu <johnliu@nvidia.com>
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-08-04 12:56:37 -07:00
Johnny Liu
0cc9253351 gpu: nvgpu: remove CONFIG_TEGRA_T23X_GRHOST dependency for EMC scaling
ICC calls to set EMC frequency are incorrectly compiled under the
config CONFIG_TEGRA_T23X_GRHOST. Remove that dependency.

Bug 3997304
JIRA LS-497

Change-Id: Ic5f58fd36622d4e3a86093d59f481a00a48d5ed4
Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2945213
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-07-31 08:57:37 -07:00
Johnny Liu
088bb16dd9 gpu: nvgpu: Migrate to upstream ICC
Transitioning to the Upstream ICC implementation by using
devm_of_icc_get() api which get's interconnect path from the
interconnect property in DT.

Bug 3997304

Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Change-Id: I84dc43e006ecf84ae3260125367fbd36ba35b38a
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2945210
Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-31 08:57:24 -07:00
shaochunk
385baa8eec gpu: nvgpu: Search GPU FW in /lib/firmware/nvidia
In order to conform upstream path, we migrated GPU
firmwares to /lib/firmware/nvidia* for l4t.

Search the GPU fw from both /lib/firmware/nvidia/*
and /lib/firmware/*.

Bug 2975694

Signed-off-by: shaochunk <shaochunk@nvidia.com>
Change-Id: I6c3cadbabd3291d75ecacd8fbb0de80d23566494
(cherry picked from commit 92d0afc571fabbdc144fa25a18931d9250fd78bf)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2934925
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
2023-07-19 06:43:27 -07:00
Prathap Kumar Valsan
321145b37e gpu: nvgpu: Enable raw mode for compression
In raw addressing mode of CBC backing storage, comptaglines are not
required to be allocated or need to programmed in the ptes. Introduce a
flag to detect if the hardware supports raw mode and use that to skip
all the comptagline allocations and respective page table programming.

JIRA NVGPU-9717

Change-Id: I0a16881fc3e897c3c408b30d1835f30564649dad
Signed-off-by: Prathap Kumar Valsan <prathapk@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2908278
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-06-13 00:19:33 -07:00
Dinesh T
c8ceef2d08 gpu: nvgpu: Enable GPU MMIO path
This is adding support for work submit through
GPU mmio for gpu-next.

Bug 3938139

Change-Id: I69c6b2865e5264e485d8ecec4239c759abdd63d5
Signed-off-by: Dinesh T <dt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2903841
Tested-by: Martin Radev <mradev@nvidia.com>
Reviewed-by: Martin Radev <mradev@nvidia.com>
Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-06-10 19:36:06 -07:00
Martin Radev
7d02506275 gpu: nvgpu: update the PMA uapi to have channel id
This patch augments the PMA uapi to have the PMA channel
id:
- PMA_STREAM_ALLOC returns a pma channel id to the client.
- PMA_STREAM_FREE and PMA_STREAM_UPDATE_GET_PUT take a
  pma channel id.

Bug 3944943

Change-Id: I22adfe13d2b693bb952f6c456f23534e86a63ef3
Signed-off-by: Martin Radev <mradev@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2915485
Reviewed-by: Ramalingam C <ramalingamc@nvidia.com>
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-06-08 18:40:06 -07:00
Martin Radev
a55491015c gpu: nvgpu: exit early in cbc debugfs under hv
This patch updates the logic for the cbc debugfs node
to fail early if running under HV. The reason is that
the CBC region is maintained by HV and cannot be accessed
by nvgpu.

This avoids a subsequent null-ptr deref for Linux + HV.

Bug 4131079

Change-Id: I1ac1919efc1c05fb679f19a189184ca00908856f
Signed-off-by: Martin Radev <mradev@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2913160
Reviewed-by: Sagar Kamble <skamble@nvidia.com>
Reviewed-by: Ankur Kishore <ankkishore@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-06-08 18:32:06 -07:00
Martin Radev
78bef566dd gpu: nvgpu: Expose more config info for SM
This patch exposes the following fields to userspace for
each SM, indexed by its global SM index:
- Logical GPC index
- Virtual GPC index
- Local Logical TPC index
- Global Logical TPC index
- Migratable TPC index
- Local SM index

Bug 4115114

Change-Id: Ie596c8f617d46d7b6f1563f7afb210b59f250f3c
Signed-off-by: Martin Radev <mradev@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2909784
Reviewed-by: Rajesh Devaraj <rdevaraj@nvidia.com>
Reviewed-by: Ankur Kishore <ankkishore@nvidia.com>
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-31 01:49:38 -07:00
shaochunk
d6359b5adc gpu: nvgpu: specify devfreq timer through dt
Originally,
nvgpu uses deferrable timer for devfreq polling by default,
this leads to issues below because of unstable polling interval.
 - out of time frequency scaling
 - unstable GPU frequency scaling

This change lets users be able to specify devfreq timer through dt.
If the dt node 'devfreq-timer' equals to 'delayed', then gpu will uses
delayed timer for devfreq polling.

Bug 3823798

Change-Id: Idc0849b4a6b8af52fda8e88f5c831f183b7a27de
Signed-off-by: shaochunk <shaochunk@nvidia.com>
(cherry picked from commit c655a5e058)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2908703
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-05-30 12:16:20 -07:00
Sagar Kamble
878182c1d5 gpu: nvgpu: disable nvgpu rpm if genpd support is not available
GPU is set to always ON state on safety L4T for SMCU to not fault.
However, nvgpu railgating was always enabled. This will lead to
improper GPU railgate/unrailgate sequence as bpmp will not
powergate/ungate the gpu on suspend and resume requests.

Keeping rpm enabled can lead to ACR failure on resume as it expects
the GPU to be reset on every resume.

Disable nvgpu runtime PM when the power domain node for the gpu is
not defined.

Bug 4111746

Change-Id: I9215ea87dbfbf53360003cac5f8a51d39982ace9
Signed-off-by: Sagar Kamble <skamble@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2904335
(cherry picked from commit c066401be7)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2908071
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Mahantesh Kumbar <mkumbar@nvidia.com>
Reviewed-by: Ankur Kishore <ankkishore@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-30 05:19:38 -07:00
Sagar Kamble
278f87e0ce gpu: nvgpu: unregister reboot notifier for pci driver
Below oops is encountered as reboot notifier was not unregistered on
nvgpu unload. On registering new reboot notifier on reload of the
nvgpu module, kernel is not able to access prior freed notifier
buffer. Reboot notifier unregistration was not present in
nvgpu_pci_remove. Add it.

 Unable to handle kernel paging request at virtual address
 Internal error: Oops: 96000004 [#1] PREEMPT SMP^M
 CPU: 0 PID: 997 Comm: modprobe Tainted: G   W   5.10.152-tegra #2^M
 pstate: a2400009 (NzCv daif +PAN -UAO +TCO BTYPE=--)^M
 pc : blocking_notifier_chain_register+0x50/0xf0^M
 lr : blocking_notifier_chain_register+0x3c/0xf0^M
  blocking_notifier_chain_register+0x50/0xf0^M
  register_reboot_notifier+0x2c/0x40^M
  nvgpu_pci_shutdown+0xaac/0x1b00 [nvgpu]^M
  pci_device_probe+0xf8/0x1f0^M
  really_probe+0x104/0x510^M
  driver_probe_device+0x108/0x190^M
  device_driver_attach+0x80/0x90^M
  __driver_attach+0xfc/0x1e0^M
  bus_for_each_dev+0x84/0x100^M
  driver_attach+0x34/0x50^M
  bus_add_driver+0x15c/0x260^M
  driver_register+0x68/0x130^M
  __pci_register_driver+0x78/0x90^M
  nvgpu_pci_init+0x3c/0x74 [nvgpu]^M
  init_module+0x18/0xe9c [nvgpu]^M
  do_one_initcall+0x50/0x310^M
  do_init_module+0x50/0x200^M
  load_module+0x22dc/0x2800^M

Bug 3495440

Change-Id: I4367352c57d4858ee0b8dda7d1181c9d01632791
Signed-off-by: Sagar Kamble <skamble@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2907442
Reviewed-by: Rajesh Devaraj <rdevaraj@nvidia.com>
Reviewed-by: Ramalingam C <ramalingamc@nvidia.com>
Reviewed-by: Ankur Kishore <ankkishore@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-22 02:03:41 -07:00
Santosh BS
54b01e881b gpu: nvgpu: multimedia engine enumeration changes
- Changes to fetch and expose supported multimedia engines to umd
- Unit and litter defines for multimedia engines
- Add functions to get runlist id

Jira NVGPU-9429
Bug 3962979

Signed-off-by: Santosh BS <santoshb@nvidia.com>
Change-Id: I072b4aac803c4a70d3659857cb0d804755c5dbd7
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2900765
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
Reviewed-by: Rajesh Devaraj <rdevaraj@nvidia.com>
Reviewed-by: V M S Seeta Rama Raju Mudundi <srajum@nvidia.com>
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-18 23:40:19 -07:00
Martin Radev
d70c9a708b gpu: nvgpu: expose local-to-logical/physical GPC mappings
Expose the local-to-logical/physical GPC mappings for
devtools needs.

Bug 3944943

Change-Id: I2aa69ccef19627d41f3e2b8dcc9235401ae1f782
Signed-off-by: Martin Radev <mradev@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2900289
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-05-15 06:08:33 -07:00
Martin Radev
789ebda23d nvgpu: Expose HES PM resource
This patch adds the HES profiling resource.

Bug 3944963

Change-Id: Ie7ea4d060cfdc6803262166c1c89d0c2d155c9e3
Signed-off-by: Martin Radev <mradev@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2901996
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Kishan Palankar <kpalankar@nvidia.com>
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
2023-05-12 20:58:19 -07:00
Martin Radev
cad414d310 gpu: nvgpu: Expose NUMA domain id
This patch exposes the NUMA domain id for the
Linux device to userspace. This information is
necessary for userspace to make better utilization
of physical memory allocation and CPU scheduling.

Bug 3972227

Change-Id: I9ad0369076d22531e154074d616e5a23e374a7e9
Signed-off-by: Martin Radev <mradev@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2897294
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-05-10 06:29:32 -07:00
vivekku
bd5ab81ccc gpu: nvgpu: nvs: queue direction update
Changes:
-  update nvgpu_nvs_ctrl_queue to have queue direction as it is required
by gsp scheduler to erase queue individually
- queue direction is updated during ioctl call to create queue and is
used only by gsp scheduler. So no other moduler should be affected by
it.

- need to pass the size of struct which is u32 so downgrading it from
u64 to u32 is intentional, misra C violation 10.3 can be ignored here

Bug 4027512

Change-Id: I6ef6e4b06124e25da3d004a2d8822516c3ac2105
Signed-off-by: vivekku <vivekku@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2881804
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Mahantesh Kumbar <mkumbar@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-08 23:37:56 -07:00
Deepak Goyal
811f8546cf nvgpu: sysfs: remove 'allow_all' from prod build
REG_OPS whitelist can be bypassed using sysfs
/sys/devices/gpu.0/allow_all
Sysfs are privileged, need Root access to set this sysfs.
This node should not be exposed by NVGPU-RM in Linux prod builds.

Bug 4083557

Change-Id: I984212df7a9f2dfeb6759cc502ae485daa1d82d4
Signed-off-by: Deepak Goyal <dgoyal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2893829
Reviewed-by: Sagar Kamble <skamble@nvidia.com>
Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-05 11:49:28 -07:00
Shashank Singh
9512b9f1de gpu: nvgpu: remove user managed addr space capability flag
Remove NVGPU_GPU_IOCTL_ALLOC_AS_FLAGS_USERSPACE_MANAGED and
NVGPU_AS_ALLOC_USERSPACE_MANAGED flags which are used for supporting
userspace managed address-space. This functionality is not implemented
fully in kernel neither going to be implemented in near future.

Jira NVGPU-9832
Bug 4034184

Change-Id: I3787d92c44682b02d440e52c7a0c8c0553742dcc
Signed-off-by: Shashank Singh <shashsingh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2882168
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-05-04 11:39:30 -07:00
Divya
c728f09c18 gpu: nvgpu: add sysfs node for golden img status
- Add a sysfs node "golden_img_status" to show
  if golden_image size and ptr are already initialized
  or not.
- This node helps to know golden image status before
  attempting to modify gpc/tpc/fbp masks.

Bug 3960290

Change-Id: I3c3de69b369bcaf2f0127e897d06e21cb8e2d68e
Signed-off-by: Divya <dsinghatwari@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2868729
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-05-04 11:36:37 -07:00
prsethi
c49ac865de gpu: nvgpu: init golden ctx image during nvgpu poweron
Safety build temporal requirement is that on FECS power up it should go
through entire initialization methods.
init_golden_image callback is being called from devctl/ioctl path and
triggers FECS method 10 and 11. As these methods are part of APP init,
not being called during resume and causing quiesce on safety build.
To fix this issue, calling the callback from poweron API.

Bug 4082813
Bug 4037712

Change-Id: I2d27203d3cb4326ae7d8bd6025693fd61d5237df
Signed-off-by: prsethi <prsethi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2893218
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-05-04 03:14:19 -07:00
Richard Zhao
be7b4aac61 gpu: nvgpu: linux: pci calls vgpu power on for virt dev
VF driver shares same poweron function with legacy vgpu.

Jira GVSCI-15779

Change-Id: I44381f7ebe1cfd6c72ff886aa9f54d54c189a8b6
Signed-off-by: Richard Zhao <rizhao@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2884178
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-05-01 00:24:56 -07:00
Richard Zhao
f9242c032e gpu: nvgpu: linux: add virtual function support
vf probe is called by pci general probe when platform data indicates
it's a virtual device.
vf_linux covers PCIE specific initialization, then call common vgpu
probe.

Jira GVSCI-15779

Change-Id: I47ce1c4807b23363a9062ff0cbc8e08b9c6cdc97
Signed-off-by: Richard Zhao <rizhao@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2884177
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-05-01 00:24:45 -07:00
Richard Zhao
8a411096c9 gpu: nvgpu: linux: vgpu to use dt_node for tegra_gr_comm
For PCIE gpu device, it uses PCIE controller dt node to store nvgpu/vgpu
dt properties, since PCIE endpoint device does not have any
corresponding dt node. So we pass dt_node directly to tegra_gr_comm,
together with EP device since tegra_gr_comm relies on dev_err.

Jira GVSCI-15779

Change-Id: I73c5210e2d8b6a728c74823c1e62fed765776365
Signed-off-by: Richard Zhao <rizhao@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2884176
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Austin Tajiri <atajiri@nvidia.com>
Reviewed-by: Santosh BS <santoshb@nvidia.com>
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-01 00:24:34 -07:00
Richard Zhao
03da61c9ce gpu: nvgpu: vgpu: create vgpu_common file
vgpu_common file contains common functions that could be shared by
legacy vgpu and vf.

Jira GVSCI-15779

Change-Id: Ie301eb29dfceed95bcd96a1024663f31eb7558fd
Signed-off-by: Richard Zhao <rizhao@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2884175
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-05-01 00:24:28 -07:00
Richard Zhao
678df244b9 gpu: nvgpu: vgpu: remove bar1 support
All vgpu supported chips don't support bar1 anymore.

Jira GVSCI-15779

Change-Id: Ia2dc4a69f3cb96df6650e663d2a40302fc826dd2
Signed-off-by: Richard Zhao <rizhao@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2884174
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Santosh BS <santoshb@nvidia.com>
Reviewed-by: Austin Tajiri <atajiri@nvidia.com>
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-01 00:24:07 -07:00
Johnny Liu
4e6be49eee gpu: nvgpu: Correct the name of devfreq governor
Remove the duplicated nvhost_pod_scaling_governor_v2 and switch to the
nvhost_pod_scaling_governor.

Bug 4074863

Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Change-Id: Ia6016cab46e97f04366d6cf14355b2e7e0989df8
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2895568
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-28 08:10:31 -07:00
Martin Radev
924dd58da0 gpu: nvgpu: remove IO_COHERENT flag
This patch removes the IO_COHERENT flag as IO
coherence is the default setting.

Bug 3959027

Change-Id: I9800c2b8b161f7bdc2d6856639dd03488881882d
Signed-off-by: Martin Radev <mradev@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2887630
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-21 11:32:05 -07:00
Martin Radev
81d95456b9 gpu: nvgpu: Rename PLATFORM_ATOMIC to SYSTEM_COHERENT
To support current and future usecases, it would be
beneficial to select the SYSTEM_COHERENT aperture explicitly.

The benefits are:
- platform atomic code is cleaned-up.
- userspace can select the SYSTEM_COHERENT aperture for any
  specific usecases.

Bug 3959027

Change-Id: I6489ebe87fa75cc760930277bad5e0cacca80eb6
Signed-off-by: Martin Radev <mradev@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2864177
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-21 11:31:53 -07:00
Ramalingam C
24475ad46b gpu: nvgpu: pci power management for iGPU-PCIe devices
Use the PCI power management functions for iGPU-PCIe devices.

JIRA NVGPU-9896

Change-Id: I1ac4ae67fa727e0a8e37ed2037d1417c5c19bb17
Signed-off-by: Ramalingam C <ramalingamc@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2886799
Reviewed-by: Rajesh Devaraj <rdevaraj@nvidia.com>
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-14 08:20:47 -07:00
Shashank Singh
21cb70f58d gpu: nvgpu: remove kind control capability
Kind is controlled by nvgpu userspace library so related capability
flags can be removed from kernel and uapi interface.

Jira NVGPU-9832
Bug 4034184

Change-Id: Id2b0a4e1cd784638362116b8d99177467fba998b
Signed-off-by: Shashank Singh <shashsingh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2880391
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: Dinesh T <dt@nvidia.com>
Reviewed-by: Ankur Kishore <ankkishore@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-13 12:21:46 -07:00
Ramalingam C
b2c4cdb25b gpu: nvgpu: sim init for iGPU-PCIe
Implement the sim init for the iGPU-PCIe devices.

JIRA NVGPU-9348

Change-Id: I9088308b96c57bb1cea01959326446ccad0a8c24
Signed-off-by: Ramalingam C <ramalingamc@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2851163
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sagar Kamble <skamble@nvidia.com>
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-10 20:45:50 -07:00
Kishan
c6d5fb348c gpu: nvgpu: Capture thread name for every channel created
This change ensures that in scenarios where GPU enters a bad
state because of the work submitted by a misbehaved thread,
we should be able to capture thread name as part of our
1st set of failure logs.
Changes for QNX env is pending.

JIRA NVGPU-7783

Change-Id: I65d55a6ade749ff91739458e0642ed2dafaae5cc
Signed-off-by: Kishan <kpalankar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2879197
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: Tejal Kudav <tkudav@nvidia.com>
Reviewed-by: Ankur Kishore <ankkishore@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-06 10:12:48 -07:00
Timo Alho
3ff15b69de gpu: nvgpu: fix return value check of MRQ_STRAP
The return value of tegra_bpmp_transfer() API is only for a low level
wire-protocol errors. When checking BPMP-FW response to MRQ_STRAP
request, the return value in the MRQ response payload need to be
checked.

Bug 3744064
Bug 3317279

Signed-off-by: Timo Alho <talho@nvidia.com>
Change-Id: I165431a5d2ed5a09965eb84b7ee09766bb09d091
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2859267
Reviewed-by: Divya Singhatwaria <dsinghatwari@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Tested-by: Divya Singhatwaria <dsinghatwari@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-06 00:41:59 -07:00