1. Add mechanism(s) to trigger syncpoint fence scan when
syncpoint increment UMD called. Following methods are added.
- METHOD-1: Check fence expire in user context when syncpoint
increment UMD API is called.
- METHOD-2: Add tasklet based mechanism that schedule tasklet to scan for
syncpoint fence expiry. This also improve signaling latency.
METHOD-1 is enabled by default, to enable METHOD-2 define MACRO
"HOST1X_EMU_SYNC_INC_TASKLET".
2. Add interface "host1x_syncpt_fence_scan()" that can be called from
client interrupt handler to initiate syncpoint fence scan.
Jira HOSTX-5527
Change-Id: I4d5a0ba9fd67042d824a1df2794b316831001dc4
Signed-off-by: amitabhd <amitabhd@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3267144
Reviewed-by: Raghavendra Vishnu Kumar <rvk@nvidia.com>
Reviewed-by: Sanif Veeras <sveeras@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Leslin Varghese <lvarghese@nvidia.com>
Fix v4l2-compliance VIDIOC_G/S_PARM failure.
Below is the function call sequence starting from
ioctl.
doioctl(VIDIOC_G_PARM)
vidioc_g_parm
tegra_channel_g_parm
v4l2_g_parm_cap
v4l2_subdev_call_state_active
v4l2_subdev_call
v4l2_subdev_call_wrappers.pad.get_frame_interval
call_get_frame_interval
check_frame_interval
check_state
In file: v4l2-subdev.c check_state() function
failed at check:
(!state || !state->pads)
Which caused the function to return -EINVAL=-22.
struct v4l2_subdev contain a member
active_state which should be initialized to
overcome the failure. To fill active_state
call v4l2_subdev_init_finalize in
tegracam_v4l2subdev_register().
This failure is seen in K6.8 because in earlier
kernel, v4l2_subdev_call() was called instead of
v4l2_subdev_call_state_active() in
v4l2_g_parm_cap(). And v4l2_subdev doesn't contain
active_state member in earlier kernel.
Bug 4449673
Change-Id: Id0fbcf9476cf6d194b721f85790e95580ff4007d
Signed-off-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3281759
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Praveen AC <pac@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
- dce-client-ipc.c is a common file used by HVRTOS as well to
register as a DCE client.
- We need to refactor existing register function due to certain
HVRTOS restrictions at init time.
1) Register function will be called at init time from HVRTOS.
2) HVRTOS doesn't allow any mutex acquire calls or wait calls
during INIT phase.
JIRA TDS-16581
Change-Id: I1b3a9587c1e237c2cca8214a3acce9ff34d98cc0
Signed-off-by: anupamg <anupamg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3280251
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Arun Swain <arswain@nvidia.com>
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com>
+ Add the following data validation checks based on
gaps identified when inspecting code for
SHR-9320:
+ FSYNC: Add check to ensure existence of generators
property before parse
+ FSYNC: Add check to ensure generators in default
group adhere to LCM rule
+ CDI: Add check to ensure reg_len / dat_len do
not exceed 2 bytes
+ CDI: Ensure err is set before jumping to err_probe
+ CDI: Jump to err_probe if IOExpander i2c-bus read
fails
+ CDI-TCA: Return error if reg_len or dat_len
out of expected range
+ FuSaCap: Ensure isp/vi-max-channels validated
+ VI: Add check for vi-mapping index found (this was
already caught in existing code, but error message
was non-specific)
+ camera_common: Add check for err that was set but
never read
+ RTCPU: Add debug prints for properties not found
Jira CAMERASW-30537
Change-Id: I9953029f594c0153d6c335913944fb8906adedd9
Signed-off-by: kevixie <kevixie@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3280557
Reviewed-by: Vincent Chung <vincentc@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Mohit Ingale <mohiti@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Fix for: Sparse defects
Sparse defect stated that "iovmm_debugfs_info" was not declared. Should it be static?
and symbol 'nvmap_max_handle_count' was not declared. Should it be static?
-Since iovmm_debugfs_info is only used in nvmap_debug.c, hence it can be
made static.
-Since nvmap_max_handle_count is only used in nvmap_handle.c, hence it can be
made static.
Bug 4513982
Change-Id: Ifb12f14c07e56c340d926f6a4a3f858a762d71fb
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3274000
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
This patch ensures that the Maximum Payload Size (MPS) and Maximum Read Request Size (MRRS) settings of the root port associated with r8168 ethernet endpoint are properly configured after overwritten by kernel when pcie_bus_perf is enabled.
Bug 4607316
Change-Id: I7f7b83f74e4ac2104345bd568d9d2e7c03a1441e
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3273562
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Issue: on resume the mac set speed is not called due
to which the data transmissions are not happening in
alternate suspend resume cycles.
This is because the oldlink status is not set to 1 during
the successful resume, in set_speed_work_func retries
Fix: set oldlink to 1 once setspeed is successful in
function set_speed_work_func, so that next time
ether_adjust_link will call the set speed after resume
Bug 4891730
Change-Id: Iadb426f2cada99387ce180dfa2d0c9ee57e7ccd5
Signed-off-by: Bibhay Ranjan <bibhayr@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3260342
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
- dce-os-worker.c/.h module exposes functionality which allows
DCE KMD clients to wait/signal events.
- The current abstraction of this module has following drawbacks
which this change attempts to address:
* Name: dce-os-worker is a misnomer
- Rename to dce-wait-cond.c/.h and make it a dce-kmd core file.
- Rename functions accordingly.
* dce-os-worker module initializes data structures from tegra_dce
which makes it ineligible for re-use.
- dce-client-ipc can re-use this module as it uses exact
same functionality.
- But this module is tied with DCE-KMD core such that it has
functions that operate on fixed known inputs.
- dce_os_work_cond_sw_resource_init/deinit()
Inits/Deinits most but not all condition var resources
from tegra_dce. Eg. dce-client-ipc resources
are not initialized.
- Move this function to new core file:dce-waiters.c
- All other functions require msg_id as input and can only
operate on DCE_WAIT* resources making it ineligible
to be used by other clients like dce-client-ipc.
- Refactor these fucntions to operate on
individual wait conditions so that all DCE-KMD
core modules can reuse them.
- Additionally, this change will also remove unused functions
and macros from dce-os-cond.c/.h
- dce-client-ipc will also switch to use dce-wait-cond interface
for client ipc waits.
- Make dce-os-cond.h a common file and move OS specific impl
to dce-os-cond-internal.h
JIRA TDS-16581
Change-Id: Ie8c6ec724e48cde66917fab4aa43e7da464ef8fb
Signed-off-by: anupamg <anupamg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3258562
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com>
Reviewed-by: Arun Swain <arswain@nvidia.com>
- dce-client-ipc.c has linux specific export symbols that
are required to be exported to linux kernel module client.
- We'll be using dce-client-ipc.c as a core DCE-KMD file and
also be compiling it for HVRTOS.
- This change will add DCE_EXPORT_SYMBOL() as wrapper
to EXPORT_SYMBOL. This will be OS agnostic macro.
- For HVRTOS it will be empty.
JIRA TDS-16126
Change-Id: I45fbf3b8b61321c64f88a0c64a07dbe4935296b7
Signed-off-by: anupamg <anupamg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3258496
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com>
Reviewed-by: Arun Swain <arswain@nvidia.com>
- This is a follow-up CL to address a comment in
I55594d8e34c3b572129119d1f7240cde76cf37bd
- This change will remove below simple static wrappers
from dce-ipc.c and directly call the corresponding OS functions.
- _dce_ipc_get_next_write_buff()
- _dce_ipc_get_next_read_buff()
JIRA TDS-16126
Change-Id: Ie8c08ace75f3c6e14e803c6aeccdf43a0c27f3fa
Signed-off-by: anupamg <anupamg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3257965
Reviewed-by: Arun Swain <arswain@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com>
- This change will remove linux nuances from dce-client-ipc.c
file and make it a core DCE-KMD file agnostic to OS.
- To do that, dce-client-ipc module will repalce linux specific
nuances for work queue related functionality with
dce-os-work module.
- Further to support existing dce_client_ipc asyn callback function
we need to make worker queue more generic by allowing clients
to pass any data of their choice as data param to the
callback function.
- Also take this opportunity to make following functions static:
- dce_resume_work_fn()
- dce_bootstrap_work_fn()
JIRA TDS-16581
Change-Id: I741b8675dd67ef932ee462e16cad016cbe8b7e2c
Signed-off-by: anupamg <anupamg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3257808
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com>
Reviewed-by: Arun Swain <arswain@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
- This is pre-req to make dce-client-ipc.c a core file and use
it for HVRTOS as well.
- dce-client-ipc.c uses worker queues today to manage async events.
But instead of using existing dce-os-work abstraction it
directly uses linux structs/calls.
- Current dce-os-work abstraction cannot be used as is for
dce-client-ipc.c as it only allows scheduling work
to system hipri work queue. But dce-client-ipc creates
and schedules work to a new worker queue.
- To allow dce-client-ipc.c use exising dce-os-work abstraction,
we need to make it more generic such that work can be scheduled
either to a new queue or existing system hipri work queue.
- This CL will update worker queue abstraction to make it more generic
and start using it for usecases which use default sys hipri WQ.
- There will be a follow-up CL for dce-client-ipc to start using
this abstraction.
- Further, this change will also make WQ and work structs
opaque and make dce-os-work.h a common header.
JIRA TDS-16126
Change-Id: I4d8a274a277f6dc08dc67847c1e3a3e35fb839b0
Signed-off-by: anupamg <anupamg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3257738
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com>
Reviewed-by: Arun Swain <arswain@nvidia.com>
This change includes below -
1. For T23x, CEC engine is moved to AON partition. As AON partition
does not powergate, skip all powergate/unpowergate calls for t23x.
2. The clock on which CEC engine operates, 32k/rtc_clk, it is always
running clock in AON partition. So skip clock enable/disable APIs.
3. This change also skips calls to TEGRA DC engine which is not available
from T23x.
4. RX Buffer size is increased to 64 depth from 1 depth. So new register is
provided to program depth so that interrupt gets triggered when certain
depth is filled. By default it is 64 depth so program it to 1 depth
to match old behavior.
5. When tegradc is absent, read physical address from SPARE register which
will be populated by UEFI.
6. This change also adds new register definitions in header file which
needs to program when adding support for CEC SC7 wakeup.
7. Timing registers updated for T23x as per HW guidelines.
8. Some initialization code is changed for T23x.
9. Add devicetree binding documentation.
bug 200727002
Change-Id: I71c2d323632c61e4c4b82bcdbca9e72179761224
Signed-off-by: Prafull Suryawanshi <prafulls@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2523595
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Shu Zhong <shuz@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
Add genpd/pm_runtime support to handle power domains
in Tegra Display driver. Also updated CEC and HDA_DC
drivers to add pm_runtime calls.
Added new APIs in CEC and SOR drivers to abstract
calls to pm_runtime and tegra_powergate APIs based
on specific Kernel version. Guarded powergate_id
with CONFIG_TEGRA_POWERGATE since its not needed
when pm_runtime APIs are used, and the powergate IDs
are defined in tegra_powergate.h which is not used
in K5.9.
Removed pm_runtime autosuspend setting since display
driver doesn't assign PM suspend/resume hooks at
present. Suspend/resume calls are linked to platform
device callbacks.
Removed pm_runtime_enable() call in dc_common probe
since there's logically no need of power-domains
in dc_common and also there is no power-domains node
in display_hub node in device-tree. Same with DSI.
All the power-domains handled by each DC are listed
in "power-domains" and "power-domain-names" properties
under respective dc nodes in device tree.
bug 200601926
Change-Id: I0fc9d21ff56185a69de6e0663b5932a93cf40e2b
Signed-off-by: Naveen Kumar S <nkumars@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2358953
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: automaticguardword <automaticguardword@nvidia.com>
Reviewed-by: Shu Zhong <shuz@nvidia.com>
Reviewed-by: Ujwal Patel <ujwalp@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
This change fixes below follow-up issues with the earlier fix
to access_ok() API done as part of
https://git-master.nvidia.com/r/c/linux-nvidia/+/2361042:
1. Definition of VERIFY_READ and VERIFY_WRITE have been removed
after K4.14. Hence, used them only for kernel versions < K5.4.
2. Changed access_type parameter of tegra_cec_access_ok() API
to bool. WRITE or READ will be chosen based on the bool value.
3. In the last CL, VERIFY_WRITE was changed to VERIFY_READ in
two access_ok() calls by mistake. Corrected them in this CL.
4. Defined access_type variable with attribute __maybe_unused
since gcc doesn't seem to consider a variable as used if only
passed as function parameter.
bug 200601926
Change-Id: I9f3540cd028280ca679b4b69d5b4a72aa943b2ae
Signed-off-by: Naveen Kumar S <nkumars@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2394585
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: automaticguardword <automaticguardword@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Shu Zhong <shuz@nvidia.com>
Reviewed-by: Ujwal Patel <ujwalp@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
Fix build linux-5.7-rc5 errors including following:
- change timespec to timespec64. replace getnstimeofday
with ktime_get_ts64
- replace usage of macro FIELD_SIZEOF with sizeof_field in ethtool.c
nvethernet and eqos files.
- support 2 arguments for of_get_phy_mode call
bug 200617764
Change-Id: I46067d7d36d08ee9556b2722e9ccec707b8853d4
Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2347244
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
There are two type of temp WARs in the nvidia repo:
1) Some functions are defined in driver files that depend on
CONFIG_TEGRA_GRHOST_NVCSI. So these function call should
have dependency protection in the header file.
2) The powergate header file is adding an unnecessary define
check for tegra194-powergate.h and this broke two places
that were referring one of the defines in it.
So this change fix the WARs above by:
a) Removing those temp WARs by adding dummy NOP functions for
those platofrms that don't have CONFIG_TEGRA_GRHOST_NVCSI.
b) Removing the define check in tegra194-powergate.h and the
version check when referring TEGRA194_POWER_DOMAIN_DISP.
Bug 2284925
Change-Id: Iad86bfe20f2981b3d31bccf5f51184799fe7e289
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1803439
GVS: Gerrit_Virtual_Submit
Reviewed-by: David Bang <dbang@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
drivers inside platform tegra and nvdisp
point to display repo.
changing that to nvidia/
Bug 200295104
Change-Id: I91e0356555c251df3eae98218a69f4bc7e3cd208
Signed-off-by: Ishan Mittal <imittal@nvidia.com>