For NSys, we're interested in having detailed information on what task
waits on a particular prefence or requests a particular postfence.
This is implemented by adding two extra fields, 'task_syncpt_id' and
'task_syncpt_thresh' to 'struct nvhost_task_fence', to record the task
this particular fence is associated with.
To avoid race conditon in pva_submit (similar to what was fixed in
0c2065fd669926536f79fd9e8ec33f33cbdcae2e), PVA task memory management
is changed to use simple kref-based scheme, much like it's done in DLA.
Finally, this patch renames syncpoint fields of 'task_fence' to 'syncpt_id'
and 'syncpt_thresh' to match the same field names in other events, which
is intended to simplify Python scripting.
JIRA DTSP-1662
JIRA DTSP-682
Signed-off-by: Dmitry Antipov <dantipov@nvidia.com>
Change-Id: I4c55efcae15eb80a0d950882d6ff6e5ac706ab20
Reviewed-on: https://git-master.nvidia.com/r/1978175
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
Reviewed-by: Shridhar Rasal <srasal@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This reverts commit c49670d23c368245670556b54ff83cc6b4edb96b.
The original commit was reverted because it exposed DLA UMD driver to
include kernel headers directly.
Since then, DLA UMD driver has been fixed to use headers from
user-space code. And hence restore this commit.
Bug 200471393
Change-Id: I221f56c5d12bd3db79568398a95baa61ffcd8101
Signed-off-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1980599
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This is causing Android builds to fail
This reverts commit 965ceca35c92eba011163f4c637b3b9e0f073f1a.
Change-Id: I84a98d129d25e33d1828033ab48a60102252b516
Signed-off-by: Sharif Inamdar <isharif@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1959908
- Xavier has different SKUs based on which different engines are enabled
or disabled based on fuse setttings.
- This patch probes engines only if they are actually enabled in SKU by
reading SKU INFO.
- This makes sure that we dont access engines if they are enabled
inadvertently in DT
Bug 200428527
JIRA VFND-5075
Change-Id: I4d3a4c84452237fdab0426980282cd9c39cc2a28
Signed-off-by: Deepak Bhosale <dbhosale@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1784306
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Damian Halas <dhalas@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mikko Perttunen <mperttunen@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>
- Update TODO's
A. FW_VERSION was added for backward compatibility for legacy firmware.
As firmware ver <0.6.0 is expected not to be used in future, so remove
checks, macro and TODO comment it.
B. MAX_GRID_SIZE is not expected to managed through nvhost as that
indirectly managed in nvmap, so remove TODO comment.
C. Adding runtime checks in timeout for abort handler would add
few cycles.
- Send gos region if it fails in second attempt
A. GoS region fetch may fail for first poweron during device boot
GoS region may not be invoked/fail in second attempt
Explicitly attempt again if it failed in previous attempts
B. Mark invalid error for max num grids
C. Add more comments for future changes for GoS handling
Jira DLA-798
Change-Id: Idfd6ed2f76cbc1f6dc7ad465edbf1db0e49181c4
Signed-off-by: Shridhar Rasal <srasal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1756614
Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
- GoS table available only after all devices
registeres with host.
- GoS table required to send to falcon with
every poweron.
- Currently, GoS id fetched during task submit
data fill and before actual task submit.
- Engine is powered on just before task submit
- considering all these, it is necessary to fetch
GoS table before first task submit fill.
- so poweron engine to fetch table first
Jira DLA-673
Change-Id: Ibf31df8ed1a8b46792dde0ffb438f416335f5e09
Signed-off-by: Shridhar Rasal <srasal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1683293
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
- Add API to get GoS id and offset for given
syncpoint, this should help simplify code and
error reporting.
- report error in case of issue in get GoS
- Ignore GoS enabled error as GoS checkout is
not done on all platforms
- Re-order gos enable flag update in probe
Jira DLA-673
Change-Id: Ica1ab27524ad4727171ba23306e1603313ee9b94
Signed-off-by: Shridhar Rasal <srasal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1683292
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
nvdla driver implemented a legacy PD implementation via
nvhost_domain_init(). There is a proper generic power domain provider
implementation for Tegra186 and later so this is unnecessary. Hence
remove all reference to it. While at it convert the module
initialization to use module_platform_driver() macro.
Bug 1853511
Change-Id: Ia2757d144fdd029ff3564aec79e79553252ed995
Signed-off-by: Timo Alho <talho@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1695842
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
- Postfences should be ready for user before response from engine.
- this helps to avoid race between task complete, response to user and
user waiting on fence.
- So update postfence prior to register notifier and command submission.
- minimize engine poweron window by moving poweron call just before submit.
this should help to get better power number.
Jira DLA-724
Change-Id: I9df0a125574a95def9b85390e1e9fa008450aa24
Signed-off-by: Shridhar Rasal <srasal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1653440
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
1. introduce TEGRA_NVDLA_TRACE_PRINTK Kconfig flag and set to 'n'
by default
2. control trace_printk using the flag
3. prevents allocation of extra kernel memory with trace_printk
presence
Bug 200350221
Change-Id: Iaa644f196fcc9a44f1b0744a55a0a0a1a585653d
Signed-off-by: Arvind M <am@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1672074
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
- Currently, trace, debug, GCOV region selected based on isolate
contexts status. As MMIO mode needs these regions features enabled,
move region selection based on submit mode.
- Disable region selection for channel mode submission as there is
known issue within it.
- Make default print logging as error
- Move firmware debug prints under DLA driver print logging instead
device logging.
Change-Id: I06e6b9be5ea597830c12f7476be6edd74d304617
Signed-off-by: Shridhar Rasal <srasal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1654976
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
- It is possible that, user can submit task without syncpoint or syncfd.
However, kernel task-cleanup path requires minimum one syncpoint fence.
Set fence counter to 1, if user don't set it.
- Now queue framework manages syncpoint refcounts through queue alloc and
release. Skip dealing with it again in task submission and complete path.
- Remove un-necessary debug prints from queue abort which also does update
syncpt min.
Jira DLA-718
Change-Id: I6f8313d3b0f4802ef8b45bf55b28ca3f27bb1ea1
Signed-off-by: Shridhar Rasal <srasal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1654953
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Emulator tasks execute on CCPLEX in DLA UMD thread but
these tasks need synchronization between other tasks
runing on DLA engine or some other engines.
Synchronization between DLA and other engines is through
sync point as NvMedia layer does not support semaphore.
This requires assigning and incrementing sync point
value for emulator tasks too.
This change adds an IOCTL to increment sync point
max value and report it back to UMD so that DLA UMD
can communicate it to other engines.
Jira DLA-677
Change-Id: I1c4ce66868e8ab7315f37c0a6b62e1f5335a1c3a
Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1643572
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mitch Harwell <mharwell@nvidia.com>
Tested-by: Mitch Harwell <mharwell@nvidia.com>
Reviewed-by: Ken Adams <kadams@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
linux-t19x kernel repo is now collapsed into linux-nvidia repo.
So remove references to srctree.t19x that points to "kernel/t19x"
folder that should not be used anymore.
Bug 200363166
Change-Id: I091eee3066a7a975cb28a051a8fa036374b672a4
Signed-off-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1601029
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>