Commit Graph

2046 Commits

Author SHA1 Message Date
Peng Liu
216ab9426c devfreq: podgov: use cycles/sec to estimate load
GPU clock may change within the period of time defined by smooth. Thus
the result of averaging load percentages within smooth window has less
meanning. New method keeps track of active GPU cycle count per time
unit, and average load is average active cycle count divided by
current GPU clock (total cycle count per time unit).

Bug 1963732

Change-Id: I88cfb998f9bcfa0d6d0397f653f8e3096d4b3eed
Signed-off-by: Peng Liu <pengliu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2033266
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-04 05:18:03 +00:00
Timo Alho
7641694f0a devfreq: add core kernel directory to include path
Add include path pointing to core kernel repository in order for the
drivers to include "governor.h" and possibly other local header files
from there.

Bug 2246029

Change-Id: Ic4e31e51c6ef6fa8b2f9ef6ce19e4ae87f90a1f3
Signed-off-by: Timo Alho <talho@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1774215
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2023-04-04 05:18:03 +00:00
Timo Alho
6ab5d16908 devfreq: add Makefile and Kconfig for Nvidia governors
POD_SCALING, WMARK_ACTIVE, and WMARK_SIMPLE devfreq scaling governors
were moved to linux-nvidia repository. Add corresponding Kconfig and
Makefile for them.

Bug 200427621

Change-Id: Ib6e9416c11c5a6938c472ebf2d9480d85ddd473d
Signed-off-by: Timo Alho <talho@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1770155
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-04 05:18:03 +00:00
Joseph Lo
164daa17cc devfreq: wmark: active: add GPL module license
Add GPL module license to able to use the symbols that are exported by
"EXPORT_SYMBOL_GPL".

Bug 200299507

Change-Id: I127507b86392ebc20f5d04a747c528e788d87294
Signed-off-by: Joseph Lo <josephl@nvidia.com>
Reviewed-on: http://git-master/r/1478916
Reviewed-on: https://git-master.nvidia.com/r/1551729
(cherry picked from linux-4.9 commit aa85b2d73b55496faabf0deae896d021bda7d8c8)
Reviewed-on: https://git-master.nvidia.com/r/1770154
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Timo Alho <talho@nvidia.com>
Tested-by: Timo Alho <talho@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-04 05:18:03 +00:00
Stephen Warren
1aeace4daf Fix include paths for in-tree builds
Some source files include header files using <> even though the header
file is not in a directory typically in the system include path. This
works when compiling the kernel with an O= option (which stores built
files outside the source tree) because the kernel adds various extra
source paths to the system include path. However, this doesn't happen when
building in-tree, so the source must be fixed to use "" for "local" files.

Similarly, fix one usage of "" where no path was specified in the ""
filename, whereas the header was in a relative directory to the source.
Again, with O= I believe this works because the kernel added the file's
location into the include path, but doesn't for in-tree builds.

Note: Parts of the original commit apply to source that has been moved
to linux-nvidia.git; see change Icf4f94b671e73c0a889bb996edc3f15d5fbde98b
for that part of the original rel-28 change.

Bug 1978388

Change-Id: I907c88a4822b309a33c031ec21dd215047ea3e94
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1544318
Reviewed-on: https://git-master.nvidia.com/r/1545674
Reviewed-on: https://git-master.nvidia.com/r/1546976
(cherry picked from linux-4.9 commit cc6281afdbe059734d53f54020f1ead0b5cf3659)
Reviewed-on: https://git-master.nvidia.com/r/1770153
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Timo Alho <talho@nvidia.com>
Tested-by: Timo Alho <talho@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-04 05:18:03 +00:00
Peter Boonstoppel
297a2218f1 devfreq: stop podgov polling when disabled through sysfs
The pod governor allows scaling to be enabled/disabled through
sysfs. In the current implementation the devfreq_monitor keeps polling
periodically even when scaling is disabled. This patch disables the
timer when scaling is disabled.

NVGPU-20

Change-Id: I6842585afec48dbc9a2fe5aee96867c68612a127
Signed-off-by: Peter Boonstoppel <pboonstoppel@nvidia.com>
Reviewed-on: https://git-master/r/1485185
(cherry picked from linux-4.9 commit 96ebb9e97b84092a852274f90e214d3976944b78)
Reviewed-on: https://git-master.nvidia.com/r/1770152
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Timo Alho <talho@nvidia.com>
Tested-by: Timo Alho <talho@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-04 05:18:03 +00:00
Peter Boonstoppel
3c30f1e47b devfreq: Clean up podgov parameter initialization
Remove support for VIC
Remove checks for chipid
Remove unused througput parameters

Jira NVGPU-20

Change-Id: I806c5689df12ff742f1be577a25ecc1b194e5075
Signed-off-by: Peter Boonstoppel <pboonstoppel@nvidia.com>
Reviewed-on: https://git-master/r/1484197
(cherry picked from linux-4.9 commit 50ea795ac3224693b237445f2edd6d7296369576)
Reviewed-on: https://git-master.nvidia.com/r/1770151
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Timo Alho <talho@nvidia.com>
Tested-by: Timo Alho <talho@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-04 05:18:03 +00:00
Peter Boonstoppel
5007383f9f devfreq: Use devfreq timers for podgov
The pod governor used to rely on being invoked from nvgpu on every
gk20_busy/idle() call. This was done originally for load-tracking
purposes. This change refactors the code to instead rely on devfreq's
internal polling loop for calling the governor periodically. It also
removes the idle timeout from the podgov code, since devfreq will keep
polling even when the GPU is idle.

Jira NVGPU-20

Change-Id: I767b74c250d199e3cd5f7e249a49736836a54c0d
Signed-off-by: Peter Boonstoppel <pboonstoppel@nvidia.com>
Reviewed-on: https://git-master/r/1484196
(cherry picked from linux-4.9 commit 5a0a5adcd0bd6fabbff9818ed6adba79cd8242ef)
Reviewed-on: https://git-master.nvidia.com/r/1770150
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Timo Alho <talho@nvidia.com>
Tested-by: Timo Alho <talho@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-04 05:18:03 +00:00
Deepak Nibade
d63c243547 devfreq: don't set last_scale for same freq
In nvhost_pod_estimate_freq(), we have *freq = 0
in case we decide to keep same frequency
In that case we set *freq as current frequency and
then set last_scale timestamp

This can result in keeping same frequency for
long duration due to less delta from last_scale

To fix this, return immediately in case *freq
is zero and do not set last_scale timestamp

Bug 200255163

Change-Id: Ie13bf54e2415c4016a101b9ea12a9abda83240fd
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1265185
Reviewed-on: http://git-master/r/1506359
(cherry picked from linux-4.9 commit be5331c94ebe9044cb67e3f622db517bfb7e28d4)
Reviewed-on: https://git-master.nvidia.com/r/1770149
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Timo Alho <talho@nvidia.com>
Tested-by: Timo Alho <talho@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-04 05:18:03 +00:00
Timo Alho
52f91e7e3e devfreq: tegra: use soc/tegra/chip-id.h for soc header
The soc tegra headers are unified and moved all the content of
linux/tegra-soc.h to the soc/tegra/chip-id.h to have the
single soc header for Tegra.

Change-Id: I4c45721243574f5d9e533360538790a94eaa57de
Signed-off-by: Timo Alho <talho@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1770148
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-04 05:18:03 +00:00
Konsta Holtta
79d16144f0 devfreq: remove throughput hints from podgov
The CONFIG_TEGRA_THROUGHPUT-dependent throughput hint feature is dead,
so remove the code from podgov that used it.

Bug 1853519

Change-Id: Icb36eb0b2baa98757b3ce419080b43978384bbc9
Signed-off-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-on: http://git-master/r/1454591
(cherry picked from linux-4.9 commit 96fcf87d98618ddf9a1e23a017294d201040859b)
Reviewed-on: https://git-master.nvidia.com/r/1770147
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Timo Alho <talho@nvidia.com>
Tested-by: Timo Alho <talho@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-04 05:18:03 +00:00
Deepak Nibade
625f652f89 devfreq: set current freq in case no change required
API scaling_state_check() returns 0 in case no change
in frequency is required
In nvhost_pod_estimate_freq(), we set *freq to 0
in case scaling_state_check() returns 0

And as a result of this, update_devfreq() will just
keep setting minimum frequency instead of keeping
same frequency - and this results in huge
performance degradation

To fix this, set *freq to current frequency in case
scaling_state_check() returns 0 as estimated
frequency

Bug 200255163

Change-Id: Ia8fe54dfd48b0898cc1dd53d821b1c95865b1f57
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1261281
(cherry picked from linux-4.9 commit 624718566201ce9c0b9780be6f29dc2ae9082b09)
Reviewed-on: https://git-master.nvidia.com/r/1770146
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Timo Alho <talho@nvidia.com>
Tested-by: Timo Alho <talho@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-04 05:18:03 +00:00
Deepak Nibade
8a5e6773ed devfreq: remove FREQ_DONTSCALE return if same freq
In nvhost_pod_estimate_freq(), we return
GET_TARGET_FREQ_DONTSCALE if new frequency is same
as current frequency

And based on this return value, update_devfreq()
will just return without actually calling target()
function

But it is possible that target() function has freq
clipping of its own, and skipping target() itself
will break this

Hence in case we find new frequency same as current
frequency, do not return GET_TARGET_FREQ_DONTSCALE
Instead just return 0

Note that we still return GET_TARGET_FREQ_DONTSCALE
if governor itself is disabled, and this is
required in perf measurement cases

Bug 200245796

Change-Id: I55a3a344982c5b5441ba011cd0dd254947e89e5c
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1251841
(cherry picked from linux-4.9 commit c6417ac88eb43501b8bf6d5351059ac2dadaf2c0)
Reviewed-on: https://git-master.nvidia.com/r/1770145
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Timo Alho <talho@nvidia.com>
Tested-by: Timo Alho <talho@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-04 05:18:03 +00:00
Mikko Perttunen
ed2d152576 devfreq: wmark: fix compilation on kernel 4.4
The watermark devfreq governors were not building
on kernel 4.4 due to a missing include of module.h
Add the include.

JIRA HOSTX-50

Change-Id: Ieebf5cd0bf6a0737e501423c1f182de5838f31a3
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Reviewed-on: http://git-master/r/1189446
(cherry picked from linux-4.9 commit e397f5ebd40c9f5114efdd0f6da7e189e51203a6)
Reviewed-on: https://git-master.nvidia.com/r/1770144
GVS: Gerrit_Virtual_Submit
Reviewed-by: Timo Alho <talho@nvidia.com>
Tested-by: Timo Alho <talho@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-04 05:18:03 +00:00
Shridhar Rasal
a55c8f34e2 devfreq: wmark: active: init average target freq
- initializes average target freq parameter of active watermark
  governor parameter to current frequency set during start and
  resume from suspend.

Bug 200165367

Change-Id: I56b43ea371c77e95285944433615660400da94ea
Reviewed-on: http://git-master/r/936632
Signed-off-by: Shridhar Rasal <srasal@nvidia.com>
Reviewed-on: http://git-master/r/1160862
(cherry picked from linux-4.9 commit 331b1f92e097209b3afd9ab92fe5337152c604e2)
Reviewed-on: https://git-master.nvidia.com/r/1770143
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Timo Alho <talho@nvidia.com>
Tested-by: Timo Alho <talho@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-04 05:18:03 +00:00
Arto Merilainen
a18f6421d2 devfreq: Improvements watermark active policy
This patch modifies wmark active policy to...
- track average frequency requirement
- not scale too often - there is now 50ms hysteresis.

Bug 1625576

Change-Id: I18afc5249a4821f62a0a58cdccd163e11763c841
Signed-off-by: Arto Merilainen <amerilainen@nvidia.com>
Reviewed-on: http://git-master/r/719594
Reviewed-on: http://git-master/r/1160010
(cherry picked from linux-4.9 commit d451a28402cfee5bf393b44674b4a50a4321a131)
Reviewed-on: https://git-master.nvidia.com/r/1770142
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Timo Alho <talho@nvidia.com>
Tested-by: Timo Alho <talho@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-04 05:18:03 +00:00
Arto Merilainen
29440602f3 devfreq: Improve wmark_active initialization
The wmark_active governor initialization assumes that the device
frequency is the lowest possible frequency when the governor is
started or resumed. However, this may not be correct if the
governor was suspended/stopped before the clock had been slowed
down.

This patch modifies the governor to read the frequency during
governor initialization and resume.

Change-Id: I38d3256102b344bc8818c5623a015843678a8ce5
Signed-off-by: Arto Merilainen <amerilainen@nvidia.com>
Reviewed-on: http://git-master/r/733007
Reviewed-on: http://git-master/r/1160009
(cherry picked from linux-4.9 commit 32e2561dffc5d7390fa4fd503651da9013403ecb)
Reviewed-on: https://git-master.nvidia.com/r/1770141
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Timo Alho <talho@nvidia.com>
Tested-by: Timo Alho <talho@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-04 05:18:03 +00:00
Arto Merilainen
6135535c12 devfreq: Add Active Watermark governor
This patch adds a new watermark governor that actively alters the
watermark values based on the current frequency and target load.

The governor takes target load as a given property (80% by default)
and every time when the governor re-estimation is triggered, the
governor checks the current load and calculates the next frequency
that would push the device as close this target load as possible.

At this point also the watermark values are updated so that next
time the interrupt should come when the load change is significant
enough to cause frequency change to either next or previous
frequency.

Change-Id: I860a0bc984d55628a0e560652a93306616b080cf
Signed-off-by: Arto Merilainen <amerilainen@nvidia.com>
Reviewed-on: http://git-master/r/598801
Reviewed-on: http://git-master/r/1160008
(cherry picked from linux-4.9 commit e55ba2a709574ce4f01ca2f8211393c795b75dad)
[talho: removed Kconfig and Makefile changes from the patch]
Signed-off-by: Timo Alho <talho@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1770140
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-04 05:18:03 +00:00
Arto Merilainen
526edececa devfreq: Add debugfs interface to simple watermark
This patch adds support to tune low and high watermark values in
debugfs.

Change-Id: I82056a5c1baa29df9e0389fda7d2bc2cc1771978
Signed-off-by: Arto Merilainen <amerilainen@nvidia.com>
Reviewed-on: http://git-master/r/1160007
(cherry picked from linux-4.9 commit 69b139a5024dbe04daf9d22ac2a6493251846f12)
Reviewed-on: https://git-master.nvidia.com/r/1770139
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Timo Alho <talho@nvidia.com>
Tested-by: Timo Alho <talho@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-04 05:18:03 +00:00
Arto Merilainen
dcc3e906a0 devfreq: Rename watermark governor
This patch renames watermark governor from "watermark" to
"wmark_simple". This allows having more complex watermark
based scaling algorithms available.

Change-Id: If6a5653300f964173e6581bf256f7bf65041beb9
Signed-off-by: Arto Merilainen <amerilainen@nvidia.com>
Reviewed-on: http://git-master/r/598799
Signed-off-by: Shridhar Rasal <srasal@nvidia.com>
Reviewed-on: http://git-master/r/1160006
(cherry picked from linux-4.9 commit a47423f57343b9609341065350e399ada5d767d0)
[talho: removed Kconfig and Makefile changes from patch]
Signed-off-by: Timo Alho <talho@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1770138
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-04 05:18:03 +00:00
Ishan Mittal
7471ea5dc2 devfreq: governor_pod_scaling: Fix build errors
MODULE_LICENCE was not declared
exit function didnt have an explicit return

linux/module.h wasn't included because of which
module_exit was throwing errors.
Added the statement to do the same.

Bug 200199306

Change-Id: Ib9e3a6f832b75095b9465dbe236a1f1c3606563f
Signed-off-by: Ishan Mittal <imittal@nvidia.com>
(cherry picked from linux-4.9 commit be9e41d39b8f9b6bbd716ea7a26ea7fdec54bad7)
Reviewed-on: https://git-master.nvidia.com/r/1770137
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Timo Alho <talho@nvidia.com>
Tested-by: Timo Alho <talho@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-04 05:18:03 +00:00
Deepak Nibade
b69d69ec4d devfreq: compare previous_freq only if podgov disabled
In update_devfreq(), we currently get target frequency,
compare it with previous_freq, and set it only if
new freq is different one

But get_target_freq() (nvhost_pod_estimate_freq())
already takes care of such cases in normal conditions
Hence, remove the check with previous_freq in
update_devfreq()

For case when we disable podgov governor, we might still end
up setting max freq all the time
Hence, add a check on previous_freq, and if previous_freq
is already max, do not set it

Bug 200175874
Bug 200161377

Change-Id: I287d37c07ee6214ed48612482211ce0f45088ca4
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1111437
Reviewed-on: http://git-master/r/1113417
(cherry picked from linux-4.9 commit 9c424ce31bedac5db0c2d93e083f20ea89ed1836)
Reviewed-on: https://git-master.nvidia.com/r/1770136
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Timo Alho <talho@nvidia.com>
Tested-by: Timo Alho <talho@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-04 05:18:03 +00:00
Deepak Nibade
fbde18a19c devfreq: get dev status after checking if scaling is enabled
In nvhost_pod_estimate_freq(), we currently have below
sequence
- profile->get_dev_status()
- check if (!podgov->enable)
- check if (podgov->p_user)

But in case we have podgov disabled, we unnecessarily
call profile->get_dev_status()

Hence, do all such checks before calling get_dev_status()

Bug 200161377

Change-Id: I6128803c21bea6c5efefd517ea1c69e4f1b1597e
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/929508
Reviewed-on: http://git-master/r/933703
(cherry picked from linux-4.9 commit b8d1d439d206887c3cf4ff50119647b02efdae0e)
Reviewed-on: https://git-master.nvidia.com/r/1770135
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Timo Alho <talho@nvidia.com>
Tested-by: Timo Alho <talho@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-04 05:18:03 +00:00
Seshendra Gadagottu
efcf59c618 devfreq: tegra: add support for t18x
Extend devfreq support for t18x

Change-Id: I379110f9a1fb0b002b7224374f49a127929a635d
Signed-off-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-on: http://git-master/r/816897
Reviewed-on: http://git-master/r/828639
(cherry picked from linux-4.9 commit 4a43088268a3fe87b6208a77e806b4891226f9ff)
Reviewed-on: https://git-master.nvidia.com/r/1770134
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Tested-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Timo Alho <talho@nvidia.com>
Tested-by: Timo Alho <talho@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-04 05:18:03 +00:00
Sam Payne
23ee901b27 video: tegra: host: move pod_scaling.c
move pod_scaling.c from nvhost to devfreq

bug 1645757

Change-Id: I0e905bf7e14aa264c4235ddfa94536acd5e4c008
Signed-off-by: Sam Payne <spayne@nvidia.com>
Reviewed-on: http://git-master/r/743942
Reviewed-on: http://git-master/r/756665
(cherry picked from linux-4.9 commit 80a8f5a341351c3973aee12fe1615785bcf8d6ee)
Reviewed-on: https://git-master.nvidia.com/r/1770133
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Timo Alho <talho@nvidia.com>
Tested-by: Timo Alho <talho@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-04 05:18:03 +00:00
Laxman Dewangan
cfaad5bd1c devfreq: remove Makefile to prepare for driver integration
The devfreq drivers are available in kernel/nvidia and it
is required to integrate in kernel/nvidia-oot.

Remove Makefile so avoid makefile conflict.

Bug 4038415

Change-Id: If0e81b66271d65c5a6d613d61be0e95d1af503e1
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
2023-04-04 05:15:37 +00:00
Richard Zhao
7a0ea85184 video: tegra: virt: enable gr_comm for oot kernel
- enable config for oot
- add GPL license
- include different tegra hv header for oot

Jira GVSCI-16046

Change-Id: I8358b15cec33fbd5fd98265adc9152d8e335511d
Signed-off-by: Richard Zhao <rizhao@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2866154
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: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Sagar Kamble <skamble@nvidia.com>
Reviewed-by: Aparna Das <aparnad@nvidia.com>
Reviewed-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-03 17:41:13 +00:00
Manish Bhardwaj
4636d2781e kernel: nvidia: fix cert warnings
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>
2023-04-03 17:41:13 +00:00
Manish Bhardwaj
15ef43911c tegra: virt: fix sparse warnings in nvidia repo
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
2023-04-03 17:41:13 +00:00
Antony Clince Alex
d9d3a5e42c virt: tegra_gr_comm: increase waittime to 40 secs
At present, the timeouts are not handled gracefully and it results
in system crash, therefore increase the timetout to 40 as a WAR.

Bug 200775880

Change-Id: I6ea999d0ae59df5f2c995dd0669149e598bb6e9d
Signed-off-by: Antony Clince Alex <aalex@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2604011
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Haley Teng <hteng@nvidia.com>
Reviewed-by: Aparna Das <aparnad@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2023-04-03 17:41:13 +00:00
kdendukuri
33c3cfdf1f virt: tegra_gr_comm: increase waittime to 20 seconds
as we are receiving "tegra_gr_comm_recv: timeout for response!",
increase the waittime to 20 ticks as a WAR.

Bug 2983318

Change-Id: If4e26027e6aba737f6dc3f063eb699b2620f4e62
Signed-off-by: kdendukuri <kdendukuri@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2346682
Reviewed-by: automaticguardword <automaticguardword@nvidia.com>
Reviewed-by: Vipin Kumar <vipink@nvidia.com>
Reviewed-by: Richard Zhao <rizhao@nvidia.com>
Reviewed-by: Haley Teng <hteng@nvidia.com>
GVS: Gerrit_Virtual_Submit
2023-04-03 17:41:13 +00:00
Haley Teng
85c3986920 tegra_gr_comm: retry if tegra_gr_comm_send timeout
Bug 2779333

Change-Id: I337ed034258d298f1c46673be6c2ca4006967e6b
Signed-off-by: Haley Teng <hteng@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2268246
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-03 17:41:13 +00:00
Ketan Patil
7fa087bc72 virt: tegra_gr_comm: fix pointer type
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>
2023-04-03 17:41:13 +00:00
Richard Zhao
bc2c2bcde6 virt: tegra_hv: remove parameter dn from tegra_hv_mempool_reserve()
Device tree node was not used by the function, so remove it to make the
function more common.

Jira EVLR-2364

Change-Id: I0888773fa584eac2c2133c73d9385b700899fdf7
Signed-off-by: Richard Zhao <rizhao@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1647029
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Dennis Kou <dkou@nvidia.com>
Reviewed-by: Nirav Patel <nipatel@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-03 17:41:13 +00:00
Richard Zhao
94f2fb429f video: tegra: virt: remove virt_ctx from tegra_gr_comm
queue index can already index the queues. It also help make the api more
common.

Jira EVLR-2364

Change-Id: I5ba8f03bf8ae9cc8d1a51a6d5c48eef969276ed0
Signed-off-by: Richard Zhao <rizhao@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1646195
Reviewed-by: Damian Halas <dhalas@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Aingara Paramakuru <aparamakuru@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Nirav Patel <nipatel@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-03 17:41:13 +00:00
Aniruddha Banerjee
98755f63ca video: tegra: increase wait_event_timout to 500ms
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>
2023-04-03 17:41:13 +00:00
Terje Bergstrom
a9442ce5b8 video: tegra: virt: Export functions used by nvgpu
Export functions used by nvgpu so that nvgpu could be built as a
module.

Change-Id: I7cf9162a17c3aaf736d20af8eb0ce623d168ff1d
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/1028350
Reviewed-on: http://git-master/r/1198258
Reviewed-on: http://git-master/r/1314837
GVS: Gerrit_Virtual_Submit
Reviewed-by: Aniruddha Banerjee <aniruddhab@nvidia.com>
Tested-by: Aniruddha Banerjee <aniruddhab@nvidia.com>
Reviewed-by: Timo Alho <talho@nvidia.com>
2023-04-03 17:41:13 +00:00
Richard Zhao
97c0fccbcc video: tegra: virt: fix hung task warnings
add timeout for tegra_gr_comm_recv and fix warnings:

INFO: task gk20a:1085 blocked for more than 120 seconds.
      Tainted: G        W      3.18.21-tegra #9
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
gk20a           D ffffffc000085df8     0  1085      2 0x00000000
Call trace:
[<ffffffc000085df8>] __switch_to+0x94/0xa8
[<ffffffc000a91994>] __schedule+0x2ac/0x7d0
[<ffffffc000a91edc>] schedule+0x24/0x74
[<ffffffc000a94940>] schedule_timeout+0x15c/0x258
[<ffffffc000a93ab0>] __down+0x60/0xa4
[<ffffffc0000e3ff0>] down+0x44/0x60
[<ffffffc0004073a4>] tegra_gr_comm_recv+0x5c/0x100
[<ffffffc0004c0d4c>] vgpu_intr_thread+0x5c/0x10c
[<ffffffc0000bf5fc>] kthread+0xf8/0x110

Bug 1728199

(cherry-picked from commit b9af225268aa6ee42d2bf41df8f6b63f55ddffd2)
Change-Id: Ia07f16a50b226824625131d03e8d677382215315
Signed-off-by: Richard Zhao <rizhao@nvidia.com>
Reviewed-on: http://git-master/r/1198256
Reviewed-on: http://git-master/r/1314836
GVS: Gerrit_Virtual_Submit
Reviewed-by: Aniruddha Banerjee <aniruddhab@nvidia.com>
Tested-by: Aniruddha Banerjee <aniruddhab@nvidia.com>
Reviewed-by: Timo Alho <talho@nvidia.com>
2023-04-03 17:41:13 +00:00
Bharat Nihalani
27d4ef0964 video: tegra: virt: fix typo
replace ioremap_cached to ioremap_cache. This should fix the build
break seen due to this symbol.

Change-Id: I574b568493f278aef2afb9c0704ae55b8c60affd
Signed-off-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-on: http://git-master/r/1198249
Reviewed-on: http://git-master/r/1314834
GVS: Gerrit_Virtual_Submit
Reviewed-by: Aniruddha Banerjee <aniruddhab@nvidia.com>
Tested-by: Aniruddha Banerjee <aniruddhab@nvidia.com>
Reviewed-by: Timo Alho <talho@nvidia.com>
2023-04-03 17:41:13 +00:00
Aingara Paramakuru
e33f9d13f4 video: tegra: virt: update comm framework
The following changes have been made:
- remove support for multiple IVC contexts per queue
- add support for mempools (OOB data support)

JIRA VFND-689

Change-Id: I3a1b8b3d204b579b3a5604858e62283df65b4cb3
Signed-off-by: Aingara Paramakuru <aparamakuru@nvidia.com>
Reviewed-on: http://git-master/r/1198248
Reviewed-on: http://git-master/r/1314833
GVS: Gerrit_Virtual_Submit
Reviewed-by: Aniruddha Banerjee <aniruddhab@nvidia.com>
Tested-by: Aniruddha Banerjee <aniruddhab@nvidia.com>
Reviewed-by: Timo Alho <talho@nvidia.com>
2023-04-03 17:41:13 +00:00
Peter Daifuku
413331cd4c host1x virtualization: basic support
- Adds a new host1x pushbuffer queue
- Includes support for virtualized VIC

Bug 1509609

(cherry-picked from commit 5589b0ffdaa4b31e7900d23e5d82d8430c710039)
Change-Id: Ie9b604dc8d8e43166dedb13953c4edac813da18b
Signed-off-by: Peter Daifuku <pdaifuku@nvidia.com>
Reviewed-on: http://git-master/r/1198218
Reviewed-on: http://git-master/r/1314832
GVS: Gerrit_Virtual_Submit
Reviewed-by: Aniruddha Banerjee <aniruddhab@nvidia.com>
Tested-by: Aniruddha Banerjee <aniruddhab@nvidia.com>
Reviewed-by: Timo Alho <talho@nvidia.com>
2023-04-03 17:41:13 +00:00
Aingara Paramakuru
90d91c9462 video: tegra: virt: support IVC reset protocol
As part of the IVC reset protocol, IVC channels need
to be invalidated during init and the interrupt
handler should always handle IVC state changes first.

Bug 1597830

Change-Id: I58807f03c393c7ff0c1140e9180854e2c64c7e24
Signed-off-by: Aingara Paramakuru <aparamakuru@nvidia.com>
Reviewed-on: http://git-master/r/671866
Reviewed-on: http://git-master/r/1198217
Reviewed-on: http://git-master/r/1314831
GVS: Gerrit_Virtual_Submit
Reviewed-by: Aniruddha Banerjee <aniruddhab@nvidia.com>
Tested-by: Aniruddha Banerjee <aniruddhab@nvidia.com>
Reviewed-by: Timo Alho <talho@nvidia.com>
2023-04-03 17:41:13 +00:00
Aingara Paramakuru
983d45ff71 video: tegra: virt: switch to IVC IRQ
Handling IVC notifications using the callback method is
problematic when trying to handle the IVC reset protocol.
The comm framework now handles IVC IRQs locally.

Bug 1566409

Change-Id: I969500dd5599efb15a49ee44a79a7872ecc48e58
Signed-off-by: Aingara Paramakuru <aparamakuru@nvidia.com>
Reviewed-on: http://git-master/r/671865
Reviewed-on: http://git-master/r/1198216
Reviewed-on: http://git-master/r/1314830
GVS: Gerrit_Virtual_Submit
Reviewed-by: Aniruddha Banerjee <aniruddhab@nvidia.com>
Tested-by: Aniruddha Banerjee <aniruddhab@nvidia.com>
Reviewed-by: Timo Alho <talho@nvidia.com>
2023-04-03 17:41:13 +00:00
Aingara Paramakuru
0181342c83 video: tegra: virt: fix crash in tegra_gr_comm_init
The clean-up code did not iterate over the correct queue
elements, resulting in a kernel crash.

Change-Id: I48b3d901ad2cddca77a259c628aced65aa262069
Signed-off-by: Aingara Paramakuru <aparamakuru@nvidia.com>
Reviewed-on: http://git-master/r/592208
Reviewed-on: http://git-master/r/1198194
Reviewed-on: http://git-master/r/1314829
GVS: Gerrit_Virtual_Submit
Reviewed-by: Aniruddha Banerjee <aniruddhab@nvidia.com>
Tested-by: Aniruddha Banerjee <aniruddhab@nvidia.com>
Reviewed-by: Timo Alho <talho@nvidia.com>
2023-04-03 17:41:13 +00:00
Aingara Paramakuru
7328f57280 video: tegra: virt: add virtualization interfaces
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>
2023-04-03 17:41:13 +00:00
Mikko Perttunen
10c73be4bf gpu: host1x-nvhost: Fix invalid NULL check
NULL check in is_valid_pt_ext was negated, making this function
useless. Fix the check.

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Change-Id: I8764bcfceb457bf26ef79ebffdf17526d4174849
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2861958
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Santosh BS <santoshb@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-03 14:06:51 +00:00
Arvind M
8942623b15 gpu: host1x-nvhost: avoid setting flcn irq at boot
[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>
2023-04-03 14:06:51 +00:00
Arvind M
bc86b17fa2 host1x: kmd: enable irq on poweron
[1] Since the irq is not enabled during the power-on, the firmware
    is not communicable state upon module reset.
[2] This commit fixes the issue by enabling irq on power-on.

Bug 3979666
Bug 3975703

Change-Id: I746a9236b390ab2d429df1f4a3f6243745147b65
Signed-off-by: Arvind M <am@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2858111
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
Reviewed-by: Ayush Kumar <ayushk@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
2023-04-03 14:06:51 +00:00
Sanif Veeras
b394e81a9e video:tegra:host: add gpu specific syncpt pool
- Support allocation from the GPU specific syncpoint pool
  after reading from the Device Tree
- Expose an interface for the NvGPU driver to allocate
  the syncpoint from the GPU pool

Jira HOSTX-4515

Change-Id: Ie5cc9ec22c039b958b0c0a1750f959ebbf6c6bee
Signed-off-by: Sanif Veeras <sveeras@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2820453
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Arto Merilainen <amerilainen@nvidia.com>
Reviewed-by: Raghavendra Vishnu Kumar <rvk@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-03 14:06:51 +00:00
Mahesh Kumar
88028eda4b gpu: host1x-nvhost: Align syncpt interface APIs
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>
2023-04-03 14:06:51 +00:00