Add NULL checks for the private device data ptr
returned by v4l2_get_subdevdata for sensor/CCI/PHY/flash
subdevs.
CRs-Fixed: 3605325
Change-Id: I146857a944988655f75327046bebd9b87154939b
Signed-off-by: Shravan Nevatia <quic_snevatia@quicinc.com>
(cherry picked from commit 8eaa13f96deb4d940c25cb6043a06f0b7235966a)
Currently, CESTA hw clients vote directly in util layer using clk crm
api, this change will enable CESTA hw clients to vote using mmrm api when
appropriate. This change affects setting the clk rate as well as
registering and unregistering a hw client with mmrm interface.
CRs-Fixed: 3385745
Change-Id: I5a9ad0e515e153dbbb937cab3a951d05677c817b
Signed-off-by: Atiya Kailany <quic_akailany@quicinc.com>
(cherry picked from commit 61b72dfada00da024e0bfe7449a4c6d845b492d2)
This change removes some dead checking code for
lock function.
CRs-Fixed: 3612969
Change-Id: I8f43ab6021ed6122d37d14b06f4dac1f7e48e6c8
Signed-off-by: Depeng Shao <quic_depengs@quicinc.com>
(cherry picked from commit eea20d5fb340d847ec8ec50554b4334cd964ce47)
Issue:
- In standby mode, aux sensor is streamed-off at flush only if
stream-off command has already been received.
- If flush happens before stream-off command, the sensor is never
streamed off. This causes the next config command to fail.
Fix:
In standby mode, stream off sensor at flush regardless of the
stream-off status.
CRs-Fixed: 3537642
Change-Id: I15956d51dae4a30cdcabbe9d0ed59857c028218e
Signed-off-by: Shravan Nevatia <quic_snevatia@quicinc.com>
(cherry picked from commit d5c922710cea5c19a9bcabda946842ba47d920a5)
This change add missing calls to put cpu buf in few scenarios.
CRs-Fixed: 3578162
Change-Id: Iab6aa0324b5072390b38df296c7acee00f5102a1
Signed-off-by: Vikram Sharma <quic_vikramsa@quicinc.com>
Add dt-bindings entry for CAM_CPAS_SHDR_FUSE feature.
Read fuse value and store it.
CRs-Fixed: 3609762
Change-Id: I9fdd9e8ba2cf4648cca3dedba567853764344241
Signed-off-by: Dharmender Sharma <dharshar@qti.qualcomm.com>
Configure IFE FD OUT port to secure or non-secure
based on whether the user space wants to use
hardware FD or software FD for secure camera
use cases.
CRs-Fixed: 3572316
Change-Id: I8f5f1506a01ba2aaf9c533edbdc64c5c6250cb2f
Signed-off-by: Vijay Kumar Tumati <quic_vtumati@quicinc.com>
(cherry picked from commit db520c5c3fb5e585eceb1d4bc4d58a0b799b2c08)
This change is to enable CRE driver and fix compilation issues due to
undefined variables. Also added bazzal support for cre.
CRs-Fixed: 3609762
Change-Id: Ife0910d27535f97d792991ad192f896dc1927c71
Signed-off-by: Dharmender Sharma <quic_dharshar@quicinc.com>
The file is supposed to be included only from the userspace
drivers and not from the kernel space drivers. The other
files included in the camera drivers are sufficient for
referencing the necessary symbols.
CRs-Fixed: 3562596
Change-Id: Ie8f54d07767b1c12b36f381c0f951b15953d9e7c
Signed-off-by: Vijay Kumar Tumati <quic_vtumati@quicinc.com>
(cherry picked from commit 8f51e330a824ec89b32d60ae501ac3edaba7ed2c)
This change dumps important csid registers and clock info
during sw reset timeout.
CRs-Fixed: 3583444
Change-Id: Iac8f45343058766012c19b8d61fa9e541e8a2b76
Signed-off-by: Stark Lin <quic_starlin@quicinc.com>
Need to pause watch dog before internal recovery because the recover
may take a long time. if don't pause watch dog here, SOF freeze may
be triggered. After recovery, need to start watch dog again.
CRs-Fixed: 3588849
Change-Id: I5209cbc1b71c7f9a68dd3ee6097da1eb6facbb40
Signed-off-by: mingpan <quic_mingpan@quicinc.com>
(cherry picked from commit b02ec3ea0706ea6b578162ec58af432d61be9cda)
This change adds input core type to hw idx support
for sfe2, ife hw manager needs the hw idx to notify
sfe2 of the overflow event.
CRs-Fixed: 3602081
Change-Id: I94f43e80ddad1689508c1709b1c134fedbcb034b
Signed-off-by: Depeng Shao <quic_depengs@quicinc.com>
(cherry picked from commit 8dde5b8efdd0ee5f12347762c2e90f2c05bdd41f)
We already reserve the space for unlock cmd during loading the
data to CCI queue, so we don't need to validate the queue before
loading unlock cmd to the queue.
CRs-Fixed: 3603432
Change-Id: Ie1acee0c09446d5a60a0f80e1393800600306412
Signed-off-by: Depeng Shao <quic_depengs@quicinc.com>
(cherry picked from commit f9ca5a4b9a0b5a6dfec4d8881d0e183068596bf9)
This change adds camnoc interface changes and CPAS version change for
Cliffs camera. It also add support for ife, csid and sfe.
CRs-Fixed: 3609762
Change-Id: Icddfd38330022b8ebc7f785ba3c97cc055e70d74
Signed-off-by: Dharmender Sharma <quic_dharshar@quicinc.com>
Enabling last consumed address support to handle delay in bufdones.
CRs-Fixed: 3273866
Change-Id: I25df0ac7a81b696188519db8df08c66a238e1644
Signed-off-by: Yash Upadhyay <quic_yupadhya@quicinc.com>
(cherry picked from commit 8bdd7e9d45f7ff51a893bca833343e0fce1efd65)
When I2C sequential write is applied, first register's delay parameter
is used instead of the last one in the sequential queue.
CRs-Fixed: 3566036
External Impact: No.
Change-Id: I0aa6480d7b577fdb697bc28b61aed428d5cae8fb
Signed-off-by: Yulei Yao <quic_yuleiy@quicinc.com>
(cherry picked from commit e2ebd508d879607b2dadb1d223c1ad7338989bf2)
This change parses FCG configurations from UMD, handles it
in its corresponding blob handler, then writes exact FCG configs
to the hardware.
During the prepare stage, all FCG update values will be temporarily
stored in req_isp and then utilized by the config function later.
At the end of the blob handler with FCG prepared, a dummy hw update
entry is created for further usage and the size of such entry is based
on the number of reg val pairs and the size of cdm reg random header.
During applying the req in activated state, an algorithm is implemented
to pick exact FCG prediction to be used in SFE/IFE/TFE usecases.
During the config stage, based on the number of skipped frames before,
the exact FCG configurations are passed to SFE/VFE top and then
written into kmd_buf and picked by the CDM. If the number of skipped
frames reaches the maximum that FCG supports or no recorded skipped
frames before, current configuration will be used instead and FCG
entry will be skipped. If the hardware supports multi context like TFE,
wr_sel will be programmed right before the FCG config of each context.
In order to retrieve cpu address of FCG related hw update entry,
a slight change is made in packet parser to pass those addresses
when adding hw update entries.
CRs-Fixed: 3487116
Change-Id: I1db957885933edcbfabc6ce90d72902f4c518118
Signed-off-by: Haochen Yang <quic_haocyang@quicinc.com>
(cherry picked from commit 55213f81a4bd9a847692c00e657e722c1d4ed903)
This change adds structs in uapi to carry update values
for SFE/IFE/MC_TFE FCG configurations.
CRs-Fixed: 3487116
Change-Id: Ia3202ccf9649375725b8ee1b8f721347d1399a88
Signed-off-by: Haochen Yang <quic_haocyang@quicinc.com>
(cherry picked from commit 989c22e0b775faaaa72479cab3bbac629203381b)
This change moves the set parameter under lock
context to make sure all the cmds are atomic.
This change also move the unlock at the end
of writing data, then we don't need to get
inflight word count and write back to execute
word count to fix underflow issue.
CRs-Fixed: 3589051
Change-Id: I1c16a204e41e6af22a23e9249c82f541e7e6e21a
Signed-off-by: Depeng Shao <quic_depengs@quicinc.com>
(cherry picked from commit dda071b3e2e76a2d698a40c8829da0627bd80da2)
With MUP update moved to per request structure, at streamon
when we issue the MUP using AHB we end up using an incorrect
MUP value.
CRs-Fixed: 3584759
Change-Id: I75d1c81c8f74731cc17a45d0363979bd8cd2d77b
Signed-off-by: Karthik Anantha Ram <quic_kartanan@quicinc.com>
(cherry picked from commit 015f2d278a93012bc98a3f22a2e25a5cb8f5a851)
When SOF timestmp of sync link is later than link, the value of
link->sof_timestamp - sync_link->sof_timestamp would be negative,
but sync_frame_duration is always positive. In this situation, the
value of sync_link_sof_skip would be incorrectly set to true.
CRs-Fixed: 3576909
Change-Id: I9bf26d217e0e9c317ca27d592cec148f075681bc
Signed-off-by: mingpan <quic_mingpan@quicinc.com>
(cherry picked from commit 85dcf379b53e89452cddbce67ff9fb62e895ea38)
This change adds sfe hw id 2 as valid hw id, then
sfe 2 info can be returned to userspace correctly.
CRs-Fixed: 3587713
Change-Id: I01825040837be4e1df204d7fe1c27887af3900e5
Signed-off-by: Depeng Shao <quic_depengs@quicinc.com>
(cherry picked from commit 9668c0f7a7963d6a6a43a6bb2352aa5b76201a83)
There is no need to explicitly reset the slave CSID,
issuing a reset to master (both HW & SW) will be propagated
to the slave CSID. This avoids the handling of additional
reset_ack irq from slave, and any associated handling.
CRs-Fixed: 3580847
Change-Id: I9f787619c8322b7c3f96430762f4197af19e51fd
Signed-off-by: Karthik Anantha Ram <quic_kartanan@quicinc.com>
(cherry picked from commit 7356076769c8f381f6980f26e7a12f06a66af268)
Currently, userland can only choose whether to allocate memory as
cached/uncached if it's a protected buffer, ubwc_p buffer, etc.
This change provides some more granularity in terms of heap selection.
One could now force an allocation from the system heap or
try a dedicated heap. The change also provides heap capability info
to userland as part of the query caps call.
CRs-Fixed: 3584481
Change-Id: Id4c92fd64d975f761e7dd4cecca8453dd09b039f
Signed-off-by: Karthik Anantha Ram <quic_kartanan@quicinc.com>
Currently, SOF timestamps are collected in bottom-half
routines. This may lead to a problem if bottom-half
execution is delayed, as it will then print frame N+1's
SOF timestamp instead of frame N; this will lead to two
duplicate SOF timestamps.
To fix this, SOF timestamps are read in top-half.
Some refactoring is done to enable SOF timestamps
to be read from vfe top half routine, as SOF timestamp
register values belong to CSID register space.
CRs-Fixed: 3485788
Change-Id: Ie13cf97072ab3f0688b835a4973e2ff27969e7ad
Signed-off-by: Li Sha Lim <quic_lishlim@quicinc.com>
Kernel panic might be caused by improper register offset which
is not memory aligned during write or read operation, this change
adds a validation for the offset to avoid accessing invalid address.
CRs-Fixed: 3542219
Change-Id: I8761c8d416890bd4571be8a64118036c0173d303
Signed-off-by: Stark Lin <quic_starlin@quicinc.com>
Removed the 20ms delay in the camera sensor driver during sensor probe.
Change-Id: I9a51c3d0b15d6c77196d00b9bfbf6a8dc76d63be
CRs-Fixed: 3244380
Signed-off-by: ridhshah <quic_ridhshah@quicinc.com>
This change fixes kw issues such as possible memory leak
and value is never used after assignment.
CRs-Fixed: 3574742
Change-Id: I757e055dbeeb308e4c115727774f183f8aae41be
Signed-off-by: Stark Lin <quic_starlin@quicinc.com>
In case SOF interrupt is not received by the camera driver, we can
recover the missing SOF timestamp for the frame at epoch using the
previous and current SOF timestamp from CSID.
CRs-Fixed: 3232845
Change-Id: Id41860e125c26f2175c5180713c9b3c41741491b
Signed-off-by: Chandan Kumar Jha <quic_cjha@quicinc.com>
Signed-off-by: Pranav Sanwal <quic_psanwal@quicinc.com>
Add format measure info to print HBI and VBI from csid.
CRs-Fixed: 3235284
Change-Id: I55148143624c492d2e220cf2e34012ba03f80630
Signed-off-by: Alok Chauhan <quic_alokc@quicinc.com>
Take the clock blob value into consideration during tfe init phase.
Set default clock in absence of clock blob from UMD.
CRs-Fixed: 3247771
Change-Id: I6d5b17b69066fa42293bcb8192c833cb57be0206
Signed-off-by: Ayush Kumar <quic_ayushkr@quicinc.com>
Add multiple MIDs support for TFE. This will help to parse
request dump during PF issue.
CRs-Fixed: 3206699
Change-Id: I0f6f82a1c217fde9a4f5628913bf8f5b43e4c2ee
Signed-off-by: Alok Chauhan <quic_alokc@quicinc.com>
Correct the packet format for RS stats configuration
during acquire time.
CRs-Fixed: 3206699
Change-Id: Ibcc615416603d427da0c41e8a2c2d519664367c8
Signed-off-by: Alok Chauhan <quic_alokc@quicinc.com>