Commit Graph

30 Commits

Author SHA1 Message Date
Mikko Perttunen
c8025c218b gpu: host1x: Wait prefences outside MLOCK
The current submission opcode sequence first takes the engine MLOCK,
and then switches to HOST1X class to wait prefences. This is fine
while we only use a single channel per engine and there is no
virtualization, since jobs are serialized on that one channel anyway.
However, when that assumption doesn't hold, we are keeping the
engine locked while not running anything on it while waiting for
prefences to complete.

To resolve this, execute wait commands in the beginning of the job
outside the engine MLOCK. We still take the HOST1X MLOCK because
recent hardware requires register opcodes to be executed within some
MLOCK, but the hardware also allows unlimited channels to take the
HOST1X MLOCK at the same time.

Jira HOSTX-4687

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Change-Id: I783cbc7f1bbd7415fbf0e61163935186b2ba0a44
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2911124
Reviewed-by: Santosh BS <santoshb@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-29 15:08:46 -07:00
Mikko Perttunen
1b89a8395f gpu: host1x: Syncpoint interrupt sharding
Support sharded syncpoint interrupts on Tegra234+. This feature
allows specifying one of eight interrupt lines for each syncpoint
to lower processing latency of syncpoint threshold
interrupts.

Jira HOSTX-4710

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Change-Id: Idfcb04e97c944b8e1c26a8f62e8393180692eb30
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2898521
Reviewed-by: Santosh BS <santoshb@nvidia.com>
Reviewed-by: Johnny Liu <johnliu@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-05 07:36:31 -07:00
Johnny Liu
03fd3f1188 gpu: host1x: Enable general interrupts for actmon
Host1x general interrupts include actmon-related interrupts, axi
timeout interrupts, and illegal access interrupts. This change enables
actmon-related interrupts only.

Bug 3788919

Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Change-Id: Iea1f1622a11afa72f70f8d10efebd857a51cc4e2
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2889825
Reviewed-by: Mikko Perttunen <mperttunen@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-28 03:32:38 -07:00
Mikko Perttunen
a9aeb2991d gpu: host1x: Add reg_write job command
Add a job command to allow inserting engine register writes into
the job opcode sequence. This allows TegraDRM to insert a method
to enable gathering of engine execution timestamps.

Bug 3829397

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Change-Id: I80f3c4c4f7ecc7dee0444eca06564cafd8442f75
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2891348
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-26 20:08:13 -07:00
Johnny Liu
fa8cf02e87 gpu: host1x: Add actmon registration interface
Provide the actmon registration interface for host1x clients. The
registration process will create the debugfs for the actmon associated
with the host1x client, and initialize the actmon registers.

Bug 3788919

Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Change-Id: I313bf52a5eda1663e26c2579788a873ca4081459
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2886696
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-19 10:49:34 -07:00
Mikko Perttunen
ff2271fec3 gpu: host1x: Assign syncpoints to channels on virtualized systems
The code to write the syncpoint channel assignment register
incorrectly skips the write if hypervisor registers are not available.

The register, however, is within the guest aperture so remove the
check and assign syncpoints properly on virtualized systems.

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Change-Id: I9a0c8ed42a56c445d392e1ed2b670091be6654fb
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2833919
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Santosh BS <santoshb@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-03 12:36:26 +00:00
Mikko Perttunen
684ae650bf gpu: host1x: Fix mask for syncpoint increment register
On Tegra186+, the syncpoint ID has 10 bits of space. To allow
using more than 256 syncpoints, fix the mask.

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Change-Id: I30a220432e6299a91ad667ad4289c444293c1e63
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2833918
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Santosh BS <santoshb@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-03 12:36:26 +00:00
Mikko Perttunen
e0a90be04b gpu: host1x: Support for running as guest
Add support for running as a guest system under a hypervisor, using
Host1x HW's virtualization capabilities.

In effect this involves not touching apertures other than the 'vm'
aperture, and channels and syncpoints other than those that are
assigned to the VM.

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Change-Id: Ideec5b0b9a692aa3ee6b4a0240c5755c983cb7bd
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2811837
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-03 12:36:26 +00:00
Mikko Perttunen
a351c7681e gpu: host1x: Timestamp syncpoint wait completions
Collect CLOCK_MONOTONIC timestamps in the interrupt handler when
a syncpoint wait completes, and report it back in dma_fences and
syncpoint wait UAPI.

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Change-Id: I9f783833698df7d96c99c9ffef3205aa82adceb5
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2801167
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-03 12:36:25 +00:00
Mikko Perttunen
25f41bc212 gpu: host1x: External timeout/cancellation for fences
Currently all fences have a 30 second timeout to ensure they are
cleaned up if the fence never completes otherwise. However, this
one size fits all solution doesn't actually fit in every case,
such as syncpoint waiting where we want to be able to have timeouts
longer than 30 seconds. As such, we want to be able to give control
over fence cancellation to the caller (and maybe eventually get rid
of the internal timeout altogether).

Here we add this cancellation mechanism by essentially adding a
function for entering the timeout path by function call, and changing
the syncpoint wait function to use it.

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Change-Id: I4600544afe21efdd3f7d06362bd124130ddec3db
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2786637
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-03 12:36:25 +00:00
Mikko Perttunen
33a40367c0 gpu: host1x: Rewrite syncpoint interrupt handling
Move from the old, complex intr handling code to a new implementation
based on dma_fences. While there is a fair bit of churn to get there,
the new implementation is much simpler and likely faster as well due
to allowing signaling directly from interrupt context.

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Change-Id: I81c47fa1946679813f90e3fd8e1d1e9d6342143e
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2786635
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-03 12:36:25 +00:00
Mikko Perttunen
303267d828 gpu: host1x: Implement job tracking using DMA fences
In anticipation of removal of the intr API, implement job tracking
using DMA fences instead. The main two things about this are
making cdma_update schedule the work since fence completion can
now be called from interrupt context, and some complication in
ensuring the callback is not running when we free the fence.

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Change-Id: I25f7f5a6cad24a00563eed79e0e17b1df1eadcdc
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2786636
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-03 12:36:25 +00:00
Mikko Perttunen
a31d614845 gpu: host1x: Add mlock release code for NVENC/NVJPG
Add definitions to allow mlock releasing on recovery for NVENC/NVJPG
on Tegra234.

Bug 3778105

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Change-Id: Iea33063b0d71add9fe816d93c96401087a12a657
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2772958
(cherry picked from commit e5f17c5842af24bde32e74d6eb2a61b0d90cae3d)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2772920
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Tested-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-03 12:36:25 +00:00
Mikko Perttunen
7ef97475c0 gpu: host1x: Initialize syncval in channel_submit
During the refactoring of channel_submit, assignment of syncval
was moved but it is also used in channel_submit. Add this assignment
back to channel_submit as well.

Bug 3724727

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Change-Id: I11acff0a5d28ddaf35648cdb3be0e638b996d5c1
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2745958
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: Brad Griffis <bgriffis@nvidia.com>
2023-04-03 12:36:25 +00:00
Mikko Perttunen
951a3d1efa gpu: host1x: Add MLOCK release code on Tegra234
With the full-featured opcode sequence using MLOCKs, we need to also
unlock those MLOCKs in the event of a timeout. However, it turns out
that on Tegra186/Tegra194, by default, we don't need to do this;
furthermore, on Tegra234 it is much simpler to do; so only implement
this on Tegra234 for the time being.

Bug 3724727

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Change-Id: Icc15ae705844cd26ae3f1d1146ff20f1d9b7a14d
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2745956
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: Brad Griffis <bgriffis@nvidia.com>
2023-04-03 12:36:25 +00:00
Mikko Perttunen
4354d2bf92 gpu: host1x: Rewrite job opcode sequence
For new (Tegra186+) SoCs, use a new ('full-featured') job opcode
sequence that is compatible with virtualization. In particular,
the Host1x hardware in Tegra234 is more strict regarding the sequence,
requiring ACQUIRE_MLOCK-SETCLASS-SETSTREAMID opcodes to occur in
that sequence without gaps (except for SETPAYLOAD), so let's do it
properly in one go now.

Bug 3724727

Change-Id: Ifae148975457d2d275cfae25fcaf735e6529fbd3
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2745964
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: Brad Griffis <bgriffis@nvidia.com>
2023-04-03 12:36:25 +00:00
Mikko Perttunen
994282e792 gpu: host1x: Tegra234 device data and headers
Add device data and chip headers for Tegra234.

Bug 3724727

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Change-Id: Ide1c653abed06fb880b8222cb0a00d65a4886e27
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2745955
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: Brad Griffis <bgriffis@nvidia.com>
2023-04-03 12:36:25 +00:00
Mikko Perttunen
7771d25b9c gpu: host1x: Program interrupt destinations on Tegra234
On Tegra234, each Host1x VM has 8 interrupt lines. Each syncpoint
can be configured with which interrupt line should be used for
threshold interrupt, allowing for load balancing.

For now, to keep backwards compatibility, just set all syncpoints
to the first interrupt.

Bug 3724727

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Change-Id: I7058f9bd38bc59db83ee92613e4e733813db7a46
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2745954
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: Brad Griffis <bgriffis@nvidia.com>
2023-04-03 12:36:25 +00:00
Mikko Perttunen
80828001d5 gpu: host1x: Deduplicate hardware headers
Host1x class information and opcodes are unchanged or backwards
compatible across SoCs so let's not duplicate them for each one
but have them in a shared header file.

At the same time, add opcode functions for acquire/release_mlock.

Bug 3724727

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Change-Id: I06e28af3822b11684aef52e6d0776700beff1c69
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2745950
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: Brad Griffis <bgriffis@nvidia.com>
2023-04-03 12:36:25 +00:00
Mikko Perttunen
9e4475c800 gpu: host1x: Program context stream ID on submission
Add code to do stream ID switching at the beginning of a job. The
stream ID is switched to the stream ID specified by the context
passed in the job structure.

Before switching the stream ID, an OP_DONE wait is done on the
channel's engine to ensure that there is no residual ongoing
work that might do DMA using the new stream ID.

Bug 3724727

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Change-Id: I7705c33417e27d99bb265db13eb3c19960f5a363
2023-04-03 12:36:25 +00:00
Jon Hunter
9edef092b1 gpu: host1x: Update to Linux v5.19-rc1
Update the host1x driver to align with the latest upstream host1x
driver from Linux v5.19-rc1. Please note that the context bus support
is not included, because this needs to be built into the kernel.

Bug 3724727

Change-Id: Ic6fbe001462d160d1bb24f76038dd755c5550690
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2739538
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
2023-04-03 12:36:25 +00:00
Mikko Perttunen
0955b8b8a5 drm/tegra: Add support for secondary syncpoint
Add support for secondary (non-job tracking) syncpoint used for
NVENC slice encoding.

Bug 3589873

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Change-Id: I80204c23486dd476c6b67a3897934f301833c7f5
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2729281
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit
2023-04-03 12:36:25 +00:00
Mikko Perttunen
65b76aee13 gpu: host1x: Merge upstream changes
Merge upstream changes from linux-next, including merged version
of new UAPI.

JIRA LS-128

Change-Id: I32c6745d2c17902e8216e9b376fd74d38a3b5904
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2653092
Tested-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
GVS: Gerrit_Virtual_Submit
2023-04-03 12:36:25 +00:00
Jon Hunter
7171a758d3 UPSTREAM: gpu: host1x: Fix Tegra194 syncpt interrupt threshold
Syncpoint interrupts are not working as expected on Tegra194. The
problem is that the syncpoint interrupt threshold being used is the
global interrupt threshold and not the virtual interrupt threshold.
Fix this by using the virtual interrupt threshold which aligns with
downstream.

JIRA LS-34

Change-Id: I4a3191c12298d4f0af264fd1f89754171a3829e9
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2498820
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-03 12:36:25 +00:00
Jon Hunter
cc5bcef3f6 gpu: host1x: Add upstream host1x driver
Add the upstream host1x driver with the 'Host1x/Tegra UAPI' series [0]
applied. This driver will be built as an external module for use with
the NVGPU driver on upstream Linux kernels.

The following modifications have been made to the series posted upstream
1. Update the Makefile to always build the driver as a module
2. Remove the tests to see if CONFIG_DRM_TEGRA_STAGING is enabled
3. Rename the include/linux/host1x.h to include/linux/host1x-next.h to
   avoid conflicts with upstream headers when building as an external
   module.
4. Rename the include/uapi/linux/host1x.h to
   include/uapi/linux/host1x-next.h to avoid conflicts with upstream
   headers when building as an external module.
5. Rename the module that is built to be host1x-next.ko instead of
   host1x.ko to avoid any depmod conflicts with the upstream driver.

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

Bug 3156385

Change-Id: Ic60299546809097dd0e4a9a7157bce1491d9f794
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2435801
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: automaticguardword <automaticguardword@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2023-04-03 12:36:25 +00:00
Jon Hunter
9953593c5f gpu: Remove unused host1x and tegra-drm drivers
The host1x and tegra-drm drivers located in the linux-nvidia repository
are not referenced by any upper level Makefile and so are never
compiled. Therefore, remove the unused host1x and tegra-drm drivers
from the linux-nvidia repository.

Bug 3156385

Change-Id: I770844f1255541628eb4fc962f1c19866cbae31b
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2435652
Reviewed-by: automaticguardword <automaticguardword@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@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 12:36:25 +00:00
Bitan Biswas
5e5de808d9 iommu: k5.9: remove archdata.iommu accesses
k5.9 build needs below changes:
read archdata.iommu replaced by iommu_get_domain_for_dev
write archdata.iommu removed as alternative implementation used.

k5.9 build error fixed by explicit include of header <linux/iommu.h>

Change-Id: I464fd4144e4317b10aaa5460482f35e46527339a
Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2400862
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-03 12:36:25 +00:00
Deepak Nibade
6bd4b830bf gpu: host1x: keep device powered on during submit
Get pm_runtime reference on device to keep device
powered on during submit

Bug 1704301

Change-Id: I71d4b4dc6317445bc3d1832ffd3bd4c7afadc654
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1029500
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Arto Merilainen <amerilainen@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Shridhar Rasal <srasal@nvidia.com>
2023-04-03 12:36:25 +00:00
Deepak Nibade
1859542c94 gpu: host1x: API to load streamid registers
Define host1x_dev_ops for T186

Add API load_streamid_regs() to load streamid registers
Set this API to host1x_dev_ops.load_regs so that we
set streamid registers during host1x_probe()

Add a static table which includes streamid mappings
for all the clients

Bug 1704301

Change-Id: I7aeefc43776472a7ccf868bfa18c810f3b80b52b
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1023438
Reviewed-by: Arto Merilainen <amerilainen@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Shridhar Rasal <srasal@nvidia.com>
2023-04-03 12:36:25 +00:00
Deepak Nibade
685eb2c8d2 gpu: host1x: add T186 support
Add host1x05 version and fill in the h/w details
in host1x05_info

Add all the hardware accessors for T186
(channel, sync, uclass accessors)

Add hardware support files for host1x channel,
syncpoints, cdma, pushbuffer, interrupt, and debug support

Keep gather filter disabled

Things working with this :
- cdma operations
- basic channel job submit path
- syncpoint support
- syncpoint interrupt mechanism
- debug dump

With this support, below tests pass for VIC client
$nvrm_channel channel_Basic
$nvrm_channel --module=vic

Bug 1704301

Change-Id: I7d97560cb1e3a57733fa0853936b0783c71b7060
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1021434
GVS: Gerrit_Virtual_Submit
Reviewed-by: Arto Merilainen <amerilainen@nvidia.com>
Reviewed-by: Shridhar Rasal <srasal@nvidia.com>
2023-04-03 12:36:25 +00:00