Make mc-hwpm module oot. Below are the reasons why
making a fresh copy in nvdia-oot folder -
- hwpm is introduced from T234 onwards
- mc-hwpm is dependent on mc driver. nvidia-oot
uses upstream mc driver. Hence mc-hwpm should also
use upstream mc driver.
- Thats why porting changes needed in mc-hwpm driver
to be incompatible with upstream mc driver
Bug 3728991
Change-Id: I2d7347d968895e080fa79d100b4c50c094ced1e3
Signed-off-by: Puneet Saxena <puneets@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2781118
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Port the downstream nvpmodel driver to the OOT project.
The following items summarize the change:
- Original bwmgr APIs are removed
- Clock cap for other clocks except for EMC is removed since userspace
nvpmodel service will handle clock cap for other clocks
Bug 3779573
Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Change-Id: Ib297dfed808dad03d1450860c24156da1a84b4ca
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2773538
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Enable APE sound card with following changes:
- Add DAI link DTSI files and enable OOT machine driver.
- Some of the AHUB drivers are present in v5.15, however
these are not feature complete yet. Use OOT driver
versions for now and enable these by using OOT specific
compatibles.
- ADSP is disabled for now as it is not required for L4T production
releases. There are dependencies on AGIC and ADMA patches which
are not yet upstreamed. This will be taken up when this becomes
a requirement.
- Add 'nvidia,ahub-i2s-id' property to I2S devices. Presently
this is being used to identify I2S instances and thus add
few mixer controls from machine driver.
Bug 3583581
Change-Id: I8ce7cab1997c6464d1b30fc19f840e11ed877b21
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2774943
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Add alternative function to initialize clocks instead of
nvhost_module_init() to fix "failed to get reset" issue.
Also, remove other failing nvhost functions as the nvhost driver
exists only for backward compatibility.
Bug 3583641
Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
Fixes: 198a0ba027 ("crypto: tegra: Add support for SE on host1x to OOT")
Change-Id: Id6a5ecf7900643b13518e1c9cf657aac99a6bd5d
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2782949
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
in linux below patches remove the support for QUEUE_FLAG_DISCARD
and QUEUE_FLAG_SECERASE.
commit 70200574cc229f6ba038259e8142af2aa09e6976
Author: Christoph Hellwig <hch@lst.de>
Date: Fri Apr 15 06:52:55 2022 +0200
block: remove QUEUE_FLAG_DISCARD
Just use a non-zero max_discard_sectors as an indicator for discard
support, similar to what is done for write zeroes.
The only places where needs special attention is the RAID5 driver,
which must clear discard support for security reasons by default,
even if the default stacking rules would allow for it.
commit 44abff2c0b970ae3d310b97617525dc01f248d7c
Author: Christoph Hellwig <hch@lst.de>
Date: Fri Apr 15 06:52:57 2022 +0200
block: decouple REQ_OP_SECURE_ERASE from REQ_OP_DISCARD
Secure erase is a very different operation from discard in that it is
a data integrity operation vs hint. Fully split the limits and helper
infrastructure to make the separation more clear.
we are fixing below compilation error using this patch.
nvidia-oot/drivers/block/tegra_virt_storage/tegra_hv_vblk.c:921:22:
error: ‘QUEUE_FLAG_DISCARD’ undeclared (first use in this function);
did you mean ‘QUEUE_FLAG_DEAD’?
921 | blk_queue_flag_set(QUEUE_FLAG_DISCARD, vblkdev->queue);
| ^~~~~~~~~~~~~~~~~~
| QUEUE_FLAG_DEAD
nvidia-oot/drivers/block/tegra_virt_storage/tegra_hv_vblk.c:921:22:
note: each undeclared identifier is reported only once for each function
it appears in nvidia-oot/drivers/block/tegra_virt_storage/tegra_hv_vblk.c:928:23:
error: ‘QUEUE_FLAG_SECERASE’ undeclared (first use in this function);
did you mean ‘QUEUE_FLAG_NOMERGES’?
928 | blk_queue_flag_set(QUEUE_FLAG_SECERASE, vblkdev->queue);
Bug 3733730
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Change-Id: I47ad13be833fdd7ec7f0d2127699e28311fbeb83
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2784741
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
in Linux v5.18 the following upstream commit removes
genhd.h and now only blkdev.h is needed.
commit 322cbb50de711814c42fb088f6d31901502c711a
Author: Christoph Hellwig <hch@lst.de>
Date: Mon Jan 24 10:39:13 2022 +0100
block: remove genhd.h
Using this change we are fixing below compilation
error while upgrading the stable kernel.
/dvs/git/dirty/git-master_linux/out/nvidia/kernel-nvidia-oot/
nvidia-oot/drivers/block/tegra_virt_storage/tegra_vblk.h:9:10:
fatal error: linux/genhd.h: No such file or directory
9 | #include <linux/genhd.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
Bug 3733730
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Change-Id: Ib110b749ca48fed092fcadb9a6ab47d81cc25397
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2784497
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
The ivc.h is not protected for multiple inclusion and so
it is generating error for multiple definition when included
from the source code.
Add wrapper header to protect the multiple inclusion of the ivc.h.
This will make the OOT driers to compile against all core kernel
which does not have proper ivc.h fix.
Change-Id: Ibe85da017d60f525b05d04cd6a5ea15c5b312057
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2784877
Reviewed-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
PEQ and MBDRC are sub blocks of OPE module. So far, these sub blocks
were not represented by separate device nodes in DT. This has changed
now where PEQ and MBDRC are children of OPE block. For now the driver
structure is maintained as it is and explicitly parse PEQ and MBDRC
nodes to create corresponding regmap interfaces. With this there is
flexibility now to create separate device drivers for PEQ and MBDRC
if necessary in future.
Bug 3583581
Change-Id: I16ceb9b1a30b4ddb1a57fdef28db20c554c58b03
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2783022
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
The struct 'snd_dmaengine_dai_dma_data' no more has 'slave_id'
member in newer kernels. This presently causes build failure
in GVS for 'linux-stable'.
Remove access to this member to fix build issue with OOT driver.
Also upstream ADMA driver does not depend on it anymore, so
commit 32de4745e20a ("dmaengine: tegra210-adma: Override ADMA FIFO
size") needs to be backported to avoid related functional issue.
Bug 3583581
Change-Id: Ib865bdc5d2b2ceb9d57511c3618e5fe607acab09
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2776075
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Following drivers are upstreamed (and present in v5.15) but not yet
feature complete:
tegra186_dspk.c
tegra210_admaif.c
tegra210_ahub.c
tegra210_dmic.c
tegra210_i2s.c
To use these drivers, device nodes in DT can use OOT specific
compatibles. Update compatibles in drivers to facilitate this.
Bug 3583581
Change-Id: I1a9e31fc5f1b2d2539f644a413ba0c06c6da2110
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2774435
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
All build errors have been now addressed by previous commits in the
series. Now enable OOT drivers build. To do so, update top level
makefile to include drivers path and update the internal makefile
to build individual drivers.
Some of the AHUB drivers are already upstreamed and are part of
v5.15 core kernel. But presently the drivers are copied to provide
full feature set. To differentiate core modules from OOT modules
the *.ko files here use "oot" string.
Bug 3583581
Change-Id: I21d51c542ed4ed7dddf7cf8d8202ebc496049fff
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2774434
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
tegra_adma_dump_ch_reg() is implemented by downstream ADMA driver only
which is not upstreamed yet. This causes build error with Kernel OOT
because upstream ADMA driver is used. Disable this call temporarily
until future is decided for this helper.
Bug 3583581
Bug 3798682
Change-Id: Ifb625509fe8354e65f40d4047e4e80ef6a5e287f
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2774433
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Add config based header inclusion for AHC driver. The ASRC and ARAD
drivers are not POR for L4T releases and also AHC driver is not yet
up with Kernel OOT. For now, ensure ASRC and ARAD functionality
without dependency on AHC driver. Later if there is a requirement
test functionality with AHC module.
Bug 3583581
Change-Id: I5e586886ae91b1dcaa9e3aa945364dc21a23f281
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2774432
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This is inspired from following upstream commit:
------------------------------------------------------------------------
commit 189364872fba07291db7f68fe0161f97e5b61bb1
Author: Takashi Iwai <tiwai@suse.de>
Date: Mon Aug 2 09:28:09 2021 +0200
ASoC: tegra: Use managed buffer allocation
As the standard buffer allocation helper supports WC pages now, we can
convert imx-pcm-rpmsg driver to use that. This allows us to remove
lots of superfluous code.
Acked-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20210802072815.13551-10-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
------------------------------------------------------------------------
Above is required to avoid build errors related to non existent
callbacks in 'snd_soc_component_driver' structure.
Bug 3583581
Change-Id: Id1a930db0e41a51be35813aed67183974d1eec57
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2774431
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
OOT drivers cannot directly access private headers of core kernel.
This is a standard policy adopted by kernel distributors and to
workaround this problem copy headers to OOT path. Update the usage
references as well.
Bug 3583581
Change-Id: I1b99e17c60294a1cb257eb5b80837faa896d3f8d
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2774429
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Kernel OOT POR is for Tegra234 and later. BW manager code for legacy
chips causes build error with Kernel OOT and Tegra234 uses interconnect
based BW requests. Since Tegra194 (and earlier) support is not needed,
remove the legacy code.
Bug 3583581
Change-Id: I04c6ca0bc58dad4de9daa6ab65b04ee01553724d
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2774428
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
snd_soc_of_parse_daifmt() is removed from later kernel versions and this
causes complilation error. Use asoc_simple_parse_daifmt() helper to
parse DAI format.
asoc_simple_canonicalize_platform() has a different signature now and
thus update the helper usage accordingly.
Bug 3583581
Change-Id: I9a99fc71849ddf460040f980aea7d4b9f8f80011
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2774427
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
WARNING: modpost: /home/mbhardwaj/kernel_only/out/
embedded-linux-generic-release/nvidia/kernel-rt_patches-nvidia-oot/
nvidia-oot/drivers/virt/tegra/tegra_hv.o (.exit.text+0x34): Section
mismatch in reference from the function cleanup_module() to the
function .init.text:tegra_hv_cleanup()
The function __exit cleanup_module() references a function __init
tegra_hv_cleanup(). This is often seen when error handling in the
exit function uses functionality in the init path. The fix is often
to remove the __init annotation of tegra_hv_cleanup() so it may be
used outside an init section.
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Change-Id: Ie3fb2875c0acc732d5673e7618593e67e412851f
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2784195
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Kernel OOT model is a combination of core kernel (coming from mainline)
and NVIDIA kernel modules which are built out of tree using core kernel
headers. With this new model no additional patches will be accepted in
core kernel (for downstream use) unless it comes via upstream path.
Audio drivers upstream is WIP and the upstream drivers are not feature
complete yet. Tegra234 is soon switching to kernel OOT model and it is
expected to have all the features.
Given above, copy kernel-5.10 ASoC drivers to nvidia-oot and enable
these on Tegra234. In parallel, work on making upstream drivers
feature complete. Once a driver is 100% upstreamed, get rid of OOT
version.
Upstream version of Tegra PCM driver and CIF header file are used
and rest of the drivers are copied to nvidia-oot.
Note: This just copies required ASoC drivers to nvidia-oot and does
not ensure build sanity. It will be tracked in subsequent commits.
While copying the git history is pulled as well.
Bug 3583581
Change-Id: I25a28d8ecb8d77772895c357e9e7fcbe0e541118
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Make sure to call pm_runtime_enable() before the
of_platform_populate() which will ensure ahub runtime
resume would be called to enable ahub clock before accessing
any ahub modules registers in modules probe. Calling
of_platform_populate() in parent driver probe results in all
of its child device probe to be completed before it exits the
parent probe call.
The issue caught during MVC child device probe tries to access a
register in probe call which depends on the ahub clock that gets
enabled during AHUB RPM resume. But ahub RPM resume not called as
pm_runtime_enable() in ahub parent driver happens after the
of_platform_populate(). This was observed when drivers were built
as part of kernel image.
Bug 3752938
Change-Id: Ifeb4085961d89877f79ff521adb6dfdf4e51907c
Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.10/+/2762027
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
commit a4e37950c9e9b126f9cbee79b8ab94a94646dcf1 upstream.
The kcontrol put callback is expected to return 1 when there is change
in HW or when the update is acknowledged by driver. This would ensure
that change notifications are sent to subscribed applications. Update
the AHUB driver accordingly.
Fixes: 16e1bcc2caf4 ("ASoC: tegra: Add Tegra210 based AHUB driver")
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Suggested-by: Jaroslav Kysela <perex@perex.cz>
Suggested-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/1637219231-406-12-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit d6202a57e79d102271d38c34481fedc9d4c79694 upstream.
The kcontrol put callback is expected to return 1 when there is change
in HW or when the update is acknowledged by driver. This would ensure
that change notifications are sent to subscribed applications. Update
the DSPK driver accordingly.
Fixes: 327ef6470266 ("ASoC: tegra: Add Tegra186 based DSPK driver")
Suggested-by: Jaroslav Kysela <perex@perex.cz>
Suggested-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/1637219231-406-11-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit a347dfa10262fa0a10e2b1970ea0194e3d4a3251 upstream.
The kcontrol put callback is expected to return 1 when there is change
in HW or when the update is acknowledged by driver. This would ensure
that change notifications are sent to subscribed applications. Update
the DMIC driver accordingly.
Fixes: 8c8ff982e9e2 ("ASoC: tegra: Add Tegra210 based DMIC driver")
Suggested-by: Jaroslav Kysela <perex@perex.cz>
Suggested-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/1637219231-406-10-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>