- 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>
- add debugfs to enable firmware gcov and dump gcov data
- on request for enabling gcov, allocate gcov region and inform
firmware about gcov PA
- gcda debugfs dumps gcda data stored by firmware
Change-Id: Ibca37048120eba21aa5f1d4936bd4ae5254fdddf
Signed-off-by: Shridhar Rasal <srasal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1586783
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Update all Kconfig files and Makefiles to rely on the kernel overlay
feature. In particular, don't include any Kconfig files or Makefiles
from other overlays. -I directives in CFLAGS are not yet cleaned up.
Bug 1978395
Change-Id: I5ee70b91c5137dd8b36e0adb56a0763fbf2cb123
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1561188
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
CV cluster clamping is currently owned partly by nvhost and partly by the
client modules in their poweroff sequences. This leads to a mismatch in
ref counts if the client specific finalize_poweron() call doesn't work.
nvhost side ends up retrying to boot the device three times at which point
we are left with a mismatch in the cluster clamp ref counts.
To fix this, move out cluster clamping back to nvhost which allows us to
maintain consistent state for the ref count.
Bug 200352108
Change-Id: I9ccc71035934ccc147b8d8a8995afd060af333e8
Signed-off-by: Sai Gurrappadi <sgurrappadi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1572788
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
The CV cluster needs to be clamped before/after a rail gate/ungate
sequence. Since there is no way to hook into the CV power domain's
poweroff/poweron functions, track references to the CV domain explicitly
by having client CV modules get/put references to the CV cluster.
The first client module to poweron will result in the CV cluster clamp
getting disabled and the last client module to poweroff will result in the
clamp getting set. This will ensure that any subsequent CV rail gating
sequence happens with the clamps in place.
Jira HOSTX-194
Change-Id: Ic65176e15c1a487a020712a02147cbfc3f2f83c3
Signed-off-by: Sai Gurrappadi <sgurrappadi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1517643
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This change adds support for allocating channels for queues and
submitting tasks through them. This is useful in cases where
direct MMIO cannot be used for task submission (e.g. virtualization).
JIRA PVA-443
Change-Id: Iae819d03d1d378059310b67ebc2e5af4690d5c80
Signed-off-by: Arto Merilainen <amerilainen@nvidia.com>
Reviewed-on: http://git-master/r/1481833
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This change modifies code to support to determine if an allocation
has been done from the CVNAS or DRAM. This information is needed
primarily for PVA since it needs to choose the port that is used
for DMA accesses.
JIRA PVA-457
Change-Id: I99305f8940a2c07eadd65999ee175185b257713c
Signed-off-by: Arto Merilainen <amerilainen@nvidia.com>
Reviewed-on: http://git-master/r/1488003
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Shridhar Rasal <srasal@nvidia.com>
Reviewed-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com>
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Currently releasing of the buffers goes through the rb tree,
releases buffers and goes to the next node. However, if the
buffer has been released, rb_next() will point to a released
memory address.
Since rb_tree() might get rebalanced after removal of a node,
rb_next() pointer may no longer be the correct next node. In
order to overcome the issue, this change adds a separate list
for traversing through the nodes sequentically.
JIRA HOSTX-214
Change-Id: I7ab5fd547dec0d3b8d66361bad9f1412ff875b7e
Signed-off-by: Arto Merilainen <amerilainen@nvidia.com>
Reviewed-on: http://git-master/r/1483987
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sai Gurrappadi <sgurrappadi@nvidia.com>
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com>
Reviewed-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Tested-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
- pass task timeout parameter from user to engine for book keeping
of task runtime
- as stack framesize crossing limit of 2048 bytes, reduce number of
maximum task can be submitted in one go.
Jira DLA-374
Bug 200302518
Change-Id: I99d3706d9d80ac0201529d68c0a959cdd22a1488
Signed-off-by: Shridhar Rasal <srasal@nvidia.com>
Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Reviewed-on: http://git-master/r/1468355
Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
Reviewed-by: Inamdar Sharif <isharif@nvidia.com>
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
- User needed to set minimum one postaction as syncpoint, this
limitation has been removed in enhancement in KMD.
- Don't allow user to set queue resume and suspend at same time.
Change-Id: I5d780d4941040211809f72ec770fc4db853551c6
Signed-off-by: Shridhar Rasal <srasal@nvidia.com>
Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Reviewed-on: http://git-master/r/1478966
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
GVS: Gerrit_Virtual_Submit
- Enhance KMD to add multiple postactions of type syncpoint and syncfd
while task submit only a syncpoint was assigned to given task as
a postaction. This was limiting to user to submit a task with
multiple types of actions like, syncpoint, syncfd.
To overcome limitation: added fence counter for type syncpoint and syncfd,
registered fence counter with nvhost for syncpoint completion notifier,
and for individual postaction respective fence sent back to user.
- Timestamp semaphore as a separate preaction is not supported
by engine, However timestamp semaphore preaction can be inserted
as semaphore preaction. In that case, engine ignore timestamp
data and validates semaphore value.
- add debug messages for buffer pin failure paths
Jira DLA-273
Jira DLA-375
Change-Id: I26882d0d61f46bed3c3cace99901ba7c506b9977
Signed-off-by: Shridhar Rasal <srasal@nvidia.com>
Reviewed-on: http://git-master/r/1470472
Reviewed-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Fence type as syncfd is between user and kernel. Kernel translates
syncpoint as syncfd before sending back postactions.
For engine, syncfd is same as syncpt/gos action, so send syncfd actions as
as syncpt/gos.
Jira DLA-273
Change-Id: I750f112544d2c28bdc14f03f5e823503b09a18ad
Signed-off-by: Shridhar Rasal <srasal@nvidia.com>
Reviewed-on: http://git-master/r/1469528
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
Reviewed-by: Inamdar Sharif <isharif@nvidia.com>
GVS: Gerrit_Virtual_Submit