For PDAF Clients, userspace can allocate a bigger buffer than
the WM Client configuration, in this case stride of the Client
should be updated properly to get proper data from WM Client.
CRs-Fixed: 3555900
Change-Id: Ie2b369b59a14f19100932d912167537cab266e0d
Signed-off-by: Ayush Kumar <quic_ayushkr@quicinc.com>
For legacy SHDR, report bubble even if request is applied
after SOF so that both master and slave context goes to
bubble state in legacy SHDR or SHDR without SFE target.
CRs-Fixed: 3555900
Change-Id: I64e38d14ba3472fa1d298882d6b09a2f14e0d576
Signed-off-by: Ayush Kumar <quic_ayushkr@quicinc.com>
In Type3 usecase, PDAF ports can come as part of IPP config. This will
cause failure during out pdaf acquire resources.
Handle PDAF ports acquire during this usecase as pdlib resource.
CRs-Fixed: 3546181
Change-Id: I9d42e499c87961f5ceec995245e6b599d6015de7
Signed-off-by: Alok Chauhan <quic_alokc@quicinc.com>
This chages is to support blob to update TFE WM dimensions.
This is required as 3A lib allocates max buffer for pdaf ports
but per request dimension can differ from buffer dimension.
CRs-Fixed: 3546181
Change-Id: I98bffa9ef00a7fa2bb543cb0c89f7920ed6780c5
Signed-off-by: Ayush Kumar <quic_ayushkr@quicinc.com>
This change is added to support buffer alignment for TFE
WM in x and y axis. This change is required in SHDR usecase to
align short exposure frame with long exposure frame.
CRs-Fixed: 3538642
Change-Id: I9a3d35d0884bfbd6f62034b207e5784fdf2f7430
Signed-off-by: Ayush Kumar <quic_ayushkr@quicinc.com>
Handle internal recovery in case of csid and bus overflow.
Handle frame size error detection for pixel and line count
mismatch as fatal errors.
Fixed csid side error reproting to hw_mgr layer.
CRs-Fixed: 3532076
Change-Id: Id4f572caf6774797396d70d7a20a4f54fc1b9ea9
Signed-off-by: Pranav Sanwal <quic_psanwal@quicinc.com>
This commit adds support to disable acquired TFE WM clients if the client
is not configured.
CRs-Fixed: 3531808
Change-Id: Ie3be423dfd2ab35031677563d66fd811090148fe
Signed-off-by: Ayush Kumar <quic_ayushkr@quicinc.com>
This change add support to program dual tfe configurations in
SHDR to create sync between two TFEs. This change is required
if MUP bit is used in SHDR mode.
CRs-Fixed: 3508184
Change-Id: I270f7fd8e3cac1f1e50c5f16e7cba2c5e9c2b74f
Signed-off-by: Ayush Kumar <quic_ayushkr@quicinc.com>
This change is to add support for error inducement in TFE HW.
CRs-Fixed: 3426117
Change-Id: I19a5e095bc84fa88c308640a1d490162698bb45f
Signed-off-by: Ayush Kumar <quic_ayushkr@quicinc.com>
In overlap SHDR, epoch irq from TFE need to configure in such
a way that request should be apply at epoch of shorter exposure frame
before start of the next frame of long exposure to make sure that
new settings should apply properly in time.
CRs-Fixed: 3396382
Change-Id: I1ddc3ce95c6d404a3f76a27cc58083e11b03bace
Signed-off-by: Ayush Kumar <quic_ayushkr@quicinc.com>
This change add support for activate and deactivate ISP device in the
link when dual trigger mode in the link is set.
CRs-Fixed: 3374385
Change-Id: Ib6d25ab295d613fa5cd3edf1780362476920d74d
Signed-off-by: Ayush Kumar <quic_ayushkr@quicinc.com>
Add support to skip HW operations (power/CCI) for
sensor nodes with "hw-no-ops" property. These nodes are
dummy entries since CSID reads data from a different sensor.
CRs-Fixed: 3150840
Change-Id: I6ceb3f9d2ea4f16abb9d5d2a6b89d5cb1d95c614
Signed-off-by: Shravan Nevatia <quic_snevatia@quicinc.com>
(cherry picked from commit 3deec40a9a58296f6f43d3cfe15b092e5a16c28b)
Add validation checks in CRE, ICP and TFE drivers
to avoid OOB and null ptr access issues.
CRs-Fixed: 3248380
Change-Id: Ic2c6bd41e34605a3291e6f50fe0fe94a0ab30523
Signed-off-by: Nirmal Abraham <quic_c_nabrah@quicinc.com>
(cherry picked from commit a63bcb668392e1271ab0d2f53a54736a54325828)
While we lookahead and merge the continuous reg settings to
burst, the packed setting len with uint8 data type may happen
overflow if the continuous reg setting count is larger than 255,
then some reg settings missed and lead to some sensor issues,
so modify the data type of len to avoid it.
CRs-Fixed: 3678429
Change-Id: I51a153d2340b84dd874ecd7bef6b3df1356611b0
Signed-off-by: chengxue <quic_chengxue@quicinc.com>
(cherry picked from commit aadcb5e66d37f556c570621e3b15e834601f074b)
When CCI drains its payload cmds in QUEUE because
of CPU scheduling delays from SW Driver side then
next successive transaction will endup in NACK ERROR.
To Fix this issue, Updating payload cmds to CCI QUEUE
is moved to Threaded irq so that Scheduling delays can
be minimized and avoid NACK Error.
CRs-Fixed: 3562709
Change-Id: I577a6531d692a4f202651e2dd5d4cf0684259b75
Signed-off-by: Lokesh Kumar Aakulu <quic_lkumar@quicinc.com>
(cherry picked from commit bcdafbc3c3afcbed75c2c469f26d8c483d0430d1)
This change limit the resolution for the single camera based on fuse.
Acquire will fail in case width is greater than the supported width.
CRs-Fixed: 3679491
Change-Id: I4f3e8dfdbe80aee994ca66f12bbbcdc7cda77676
Signed-off-by: Dharmender Sharma <quic_dharshar@quicinc.com>
Introduce Threshold IRQ and compose dynamically
allocated buffer with CCI BURST WRITE Commands
and finally write to the CCI HW register and
manage Threshold Interrupts in optimized way. So,
that SW Driver latencies will not affect the I2C
BURST WRITE functionality.
CRs-Fixed: 3562709
Change-Id: I5749ba3b61e28d8f2c1075f46f470f5a9c5bd6b5
Signed-off-by: Lokesh Kumar Aakulu <quic_lkumar@quicinc.com>
(cherry picked from commit 1e4f481db9076c766b7300bb65364a13a61247c1)
Add changes for cpas for raveline camera .
Create target specific header files for raveline.
CRs-Fixed: 3318758
Change-Id: Ib1bd54975a97bc4b09293cf8a82a1c3bbbeecb31
Signed-off-by: Pranav Sanwal <quic_psanwal@quicinc.com>
(cherry picked from commit fc03d26be204900d7e19054915b52fbd3353444f)
Integer pointer passed as a parameter to function
cam_irq_controller_register_dependent is used as an
array iterating over num_registers. This might corrupt
or misinterpret adjacent memory locations causing out
of bound access issues.
This change fixes this issue by passing an array of
size num_registers as a parameter to
cam_irq_controller_register_dependent. Also, initializes
struct dma_buf_map to 0.
CRs-Fixed: 3658797
Change-Id: I18260c9be4df77716f00c3f5980aeb506e35dcdc
Signed-off-by: Shivakumar Malke <quic_smalke@quicinc.com>
In case of null pointing addresses in payload at bufdone irq handling,
will lead to crash. This change will do proper sanity to avoid null
pointer access.
CRs-Fixed: 3634649
Change-Id: I4b988101001dfafdd4250eb75377d03a3a8474c2
Signed-off-by: Yash Upadhyay <quic_yupadhya@quicinc.com>
(cherry picked from commit 75ef1aef5d3b740a15eef8f5b60a453568ca5721)
In Mix SHDR use case, Camera switch to video mode is failing.
Reason is FCG configurations support not enabled for Cliffs.
So to fix this issue enabled FCG configuration for Cliffs.
CRs-Fixed: 3672728
Change-Id: I6cbc5db1d02c07bb4df422c4b07d6b7eca1df3c6
Signed-off-by: Dharmender Sharma <quic_dharshar@quicinc.com>
This change adds missing mutex unlock when the command descriptor
is not valid during configuring stream settings.
CRs-Fixed: 3663869
Change-Id: I891699141f8c1c1b6cdbafb0068d5c8117dacdf8
Signed-off-by: Haochen Yang <quic_haocyang@quicinc.com>
(cherry picked from commit 3a6161b01d7c7c5540d7019b70903dc60e9a84bc)
This commit add change to get correct port id or resource outport
for page fault if mid value is same for two or more ports.
CRs-Fixed: 3593650
Change-Id: If09a515ea37c5b89787945c9d0d8f1e3903bca55
Signed-off-by: Ayush Kumar <quic_ayushkr@quicinc.com>
(cherry picked from commit 8f675ac9d2534e09b7f0a4b8d82dbb1dc2df6feb)
This change fixes possible out-of-bounds access while updating
cre_bus_rd by adding check if the port index is proper.
CRs-Fixed: 3595684
Change-Id: I10f2f7174f9df75118dbb1efed60e870ac2ac97f
Signed-off-by: Abhilash Kumar <quic_krabhi@quicinc.com>
(cherry picked from commit 410038d0ec8a80e7ed2d04ed9bd98f60a0d5de12)
Currently format defined for AI port is not proper. Correct
the format for AI port.
CRs-Fixed: 3640786
Signed-off-by: Alok Chauhan <quic_alokc@quicinc.com>
Change-Id: If7b3323a9732a6834434fe2226da841d8383b6f3
(cherry picked from commit 7c1e2d4468835b55ada86932120e9a2fea3b999e)
Remove the function call, is getting clock rates with mutex locked
in interrupt context.
CRs-Fixed: 3615675
Change-Id: I838fbd0b211e454de812b7631a1bb8072072ec75
Signed-off-by: Shadul Shaikh <quic_shaduls@quicinc.com>
(cherry picked from commit a42bed83fbfd0dff1940ce7b221ee3370f1e917e)
This change is to fix the value of min hbi in csid
path cfg1 register.
CRs-Fixed: 3184294
Change-Id: I2db440d8edf29844ee87067f79465089b81c205e
Signed-off-by: Ayush Kumar <quic_ayushkr@quicinc.com>
(cherry picked from commit 9784b390cdcd1c518fe1ce85af12bd02390149e7)
Though cci_ctrl is not NULL its content is handled by user,
who could set cci_info to NULL. A NULL pointer check is placed
before accessing it to avoid any null pointer derefernce.
CRs-Fixed: 3095084
Change-Id: I6f50d4ba38efd9b5c0eb0d14e3d958ff94c11554
Signed-off-by: Rajat Goel <quic_rajgoe@quicinc.com>
Signed-off-by: Shadul Shaikh <quic_shaduls@quicinc.com>
(cherry picked from commit 81c7a070db15aea8a2d7835a68840ac31f4586fb)
Rate limit the error log which is printed while SOF/EOF notification
to CRM fails to avoid excessive logging. Change few failure log
prints from CAM_DBG to CAM_WARN_RATE_LIMIT to identify the exact
cause of the error.
CRs-Fixed: 3467116
Change-Id: I4257ae17adc1e8a82f1ef39c2473089412193f52
Signed-off-by: Nirmal Abraham <quic_c_nabrah@quicinc.com>
(cherry picked from commit 6f7c3ec4cfd4483bdea78bb666a05fa2d61c07d7)
Correct path data type incase if voting from TFE lite
during cpas start.
CRs-Fixed: 3509972
Change-Id: If2a0949f09a3ca6bd5afdca1f4b6c9202adf6334
Signed-off-by: Alok Chauhan <quic_alokc@quicinc.com>
(cherry picked from commit 5df6eed6590a1355dabe8b676aca6b67c033d239)
Add list to track request while configuring and processing in
multi-context environment. This will avoid looping over wrong
context and accessing invalid request list.
CRs-Fixed: 3426117
Change-Id: I987abc7685a11a596cd3d2ba14ff2b141358d618
Signed-off-by: Ayush Kumar <quic_ayushkr@quicinc.com>
(cherry picked from commit 9e3f7d8a57c6ead740bb1261f461a38ae35bd57a)
Currently the max TFE contexts supported is 4.
To support AUX session, 6 contexts are required.
This change increases max TFE contexts to 6.
CRs-Fixed: 3526893
Change-Id: Ia0b8cf4394bdfc70f4cf8d55315516daa4c991d8
Signed-off-by: Shivakumar Malke <quic_smalke@quicinc.com>
(cherry picked from commit 5395a795408973adb997a1486922800d5ace89bf)
Fix loop range to hw_dev_cnt-1 to deal with out of range issue.
CRs-Fixed: 3660771
Change-Id: I5d8b76e44af04207ed4b68208474620fa9cb1b86
Signed-off-by: jinguiw <quic_jinguiw@quicinc.com>
(cherry picked from commit ead659d4bf783c37ff17af1bb4bc87edb4e64938)
Add the CSIPHY_DNP_PARAMS macro to specify dummy PHY
settings. These settings will not be applied to HW
and can be used to pad the settings arrays.
CRs-Fixed: 3642100
Change-Id: I42859598996d6190b23111e8ac655bb34e174238
Signed-off-by: Shravan Nevatia <quic_snevatia@quicinc.com>
(cherry picked from commit b78027078dd6654f96f6d0472ebab09c6e1b088b)
* changes:
msm: camera: isp: Correct sync mode of HW in Dual TFE usecase
msm: camera: isp: Fix crash if PPI hw is not present
cam: tfe: Correct master select and halt mode
* changes:
msm: camera: tfe: Add out of sync error handling
msm: camera: tfe: Add PDAF support in tfe 770 header
msm: camera: common: update msm-mmrm dependency to camera-kernel
msm: camera: tfe: Add TFE and TFE LITE header file for 770 HW
msm: camera: isp: Add support for PDAF HW
msm: camera: tfe: Remove hardcoding of shift values
msm: camera: isp: Add support for CSID 770
msm: camera: tfe: Add support for TFE LITE HW
msm: camera: tfe: Add MUP support for TFE HW
Increase count of maximum number of TFE HW supported and
corrected WM composite group number.
CRs-Fixed: 3426117
Change-Id: I4cf91bb92772c5be5a56783228c694fedf6c5ec7
Signed-off-by: Ayush Kumar <quic_ayushkr@quicinc.com>
Some ISP hardware id instances are disabled on some target skus.
Cpas driver has fuse information based on the dtsi entries.
ISP hw driver queries the cpas driver whether hw instance is
supported or not. If ISP hardware is supported on the target then
continue the isp hardware probe.
CRs-Fixed: 3509972
Change-Id: I4c57407e510c2dfcb764069b736a91a36523c3b3
Signed-off-by: Alok Chauhan <quic_alokc@quicinc.com>
This commit takes care of enabling Wm configurations for each
client only if io buffers are allocated.
CRs-Fixed: 3508184
Change-Id: I3af729742475a7ef5428fcda6c936e0c8799fdf9
Signed-off-by: Ayush Kumar <quic_ayushkr@quicinc.com>
In case of error reported on req 0, regdump not triggering since
last dump err req id default value is 0.
Hence initialising with max value of uint64_t.
CRs-Fixed: 3503342
Change-Id: If370da47d824efbf881e6560cea27efa9d6a6c0d
Signed-off-by: Pranav Sanwal <quic_psanwal@quicinc.com>
LCR PD port is configured wrongly to line based mode instead
of frame based mode. Correct the configuration for LCR PD port
to set right mode.
CRs-Fixed: 3478317
Change-Id: I336782ccd4aaca48fafd173e71819c159d1bf509
Signed-off-by: Alok Chauhan <quic_alokc@quicinc.com>
Sync mode is always master if any resource is acquire from
previously acquired HW. This change is to set correct value of
sync mode depend upon the usecase and acquired hw index.
CRs-Fixed: 3426117
Change-Id: I841105b4c14af6b8da589a7d74a5532ce6244e81
Signed-off-by: Ayush Kumar <quic_ayushkr@quicinc.com>
Fix crash during CSID init/deinit sequence due to accessing
invalid ppi hw interface pointer incase if PPI hw is not
present in device.
CRs-Fixed: 3478317
Change-Id: I4a97105800d07407ecddd6611c10f4e481c133d7
Signed-off-by: Alok Chauhan <quic_alokc@quicinc.com>
Correct master select and halt mode for single TFE in
IPP and PPP path.
CRs-Fixed: 3478317
Change-Id: I4697bb54b106b2459049d884303234315fd48fa7
Signed-off-by: Alok Chauhan <quic_alokc@quicinc.com>
Program the PPP path based on core config value which is coming
from user space at acquire Hw.
CRs-Fixed: 3426117
Change-Id: I606dae35acb12a00fc835b00713a2610eb10ff01
Signed-off-by: Ayush Kumar <quic_ayushkr@quicinc.com>
This change adds support for RT CDM in TFE driver. For RT CDM,
mem base should be with respect to the base address of the TFE
wrapper. The first address the RT CDM can access is the base
address of TFE wrapper.
CRs-Fixed: 3426117
Change-Id: Ic5ca099e737b23fb2061678af5e7a85b65836763
Signed-off-by: Ayush Kumar <quic_ayushkr@quicinc.com>
This change adds fixes for all tfe issues faced during CSIM
validation. Adds required shift values in TFE header files.
Correct format for pdaf ports.
CRs-Fixed: 3426117
Change-Id: I3bf9c44e1ce108aa6247fea867d2b5161705b6bb
Signed-off-by: Ayush Kumar <quic_ayushkr@quicinc.com>
problem:
Need to handle continuous out_of_sync_frame error that
may come due to mup/VC mismatch.
solution:
Handle the scenario by counting error occurences for a fixed
threshold since HW dosent generate SOF when this error comes
and triggering recovery.
Reset the count after the subsequent SOF is received.
CRs-Fixed: 3419224
Change-Id: Ifd44dc753385ae8cb8ce4b4cb283cd07aa8b2a44
Signed-off-by: Pranav Sanwal <quic_psanwal@quicinc.com>
This commit adds TFE and TFE LITE header file for titan
version 770 hardware.
CRs-Fixed: 3374385
Change-Id: I34c5227bc51e7911f584e219f5608af3dfcab9f8
Signed-off-by: Ayush Kumar <quic_ayushkr@quicinc.com>
This change add support for:
- PDAF HW support handling in CSID and TFE driver
- CSID PPP halt mode handling
- Add support for new TFE PD ports (LCR, PD_PREPROCESSED
PD_PARSED).
CRs-Fixed: 3387396
Change-Id: I56dc109138607fe7b342760a5c977e4126fe1676
Signed-off-by: Alok Chauhan <quic_alokc@quicinc.com>
Problem Description:
Hardcoded shift values may vary with targets.
Solution:
Add support for reading shift values from target specific
header file to avoid hardcoding in tfe_bus and tfe_core files .
CRs-Fixed: 3390902
Change-Id: I7960e72f6b15c13c07cacc28a83fc27e7f452d8d
Signed-off-by: Stuti Saxena <quic_stutsaxe@quicinc.com>
This commit adds support for TFE LITE HW.
CRs-Fixed: 3374385
Change-Id: I4a7eb792243fba07467060cb242f98638658d0ad
Signed-off-by: Ayush Kumar <quic_ayushkr@quicinc.com>
This change add support for MUP in TFE HW. Also enable
interrupt if case of mup mismatch and add error bit in
header file to remove hardcoded values.
CRs-Fixed: 3350436
Change-Id: I5556fa3f8ab47fea16fe92007303eb68a5b80943
Signed-off-by: Ayush Kumar <quic_ayushkr@quicinc.com>
NRT2, NRT6 and NRT7 do not support urgency value 0x1003. So updating
urgency QOS setting to 0x1030 based on the SPT recommendation.
CRs-Fixed: 3660302
Change-Id: I245884672e26fe439eaf289d717bc1bfe845c7d0
Signed-off-by: Dharmender Sharma <quic_dharshar@quicinc.com>
Bus layer just read the consumed address from one port per group,
sometimes, this port isn't requested by userland, so it can't
match with any requested resources. This change reads consumed
address from other port which in same composite group if the buf
done event can't match any requested resources.
CRs-Fixed: 3590441
Change-Id: I1590e9a53ef7eff1df65682ae4ca77b011d1af39
Signed-off-by: Depeng Shao <quic_depengs@quicinc.com>
(cherry picked from commit 3ec040334581d347916871429de9374555656e4d)
Add TPG mux select logic in CPAS. To select form which TPG CSID should
get the data, TPG_MUX_SEL register has to be programmed. This change
adds the logic to write this register on CPAS driver.
CRs-Fixed: 3081144
Change-Id: I86560f802a04e88ceca4efa276e853029d8417d3
Signed-off-by: Ayush Kumar <quic_ayushkr@quicinc.com>
(cherry picked from commit 323f7225a0e814b2be33cd89109ae6b3ac8c3490)
On current scheme, we put validation inside IO function, it's hard
to block subsequent accessing when facing invalid address and may
increase the number of cycles to do the register accessing as well.
This change limits the validation to only for the reg dump, we can
take following up operations when accessing wrong address for read
rather than printing uncertain logs.
CRs-Fixed: 3589725
Change-Id: I7d38a3ddb6c3f8e2915070f3c24629754abf76d7
Signed-off-by: Stark Lin <quic_starlin@quicinc.com>
(cherry picked from commit 159f8889a51178a92186e66e24e39bfdb01e87ee)
Based on HW team's recommendation, we should restrict to 1:1
mapping in between IFE and SFE hw index. This change makes
sure IFE acquire resource from the hw idx what SFE has
acquired.
CRs-Fixed: 3618217
Change-Id: I493f3519887a3a214e23cf8e70d2a1550213ee84
Signed-off-by: Depeng Shao <quic_depengs@quicinc.com>
This change adds shutter notification event in event record too
which can be dumped at the time of recovery.
CRs-Fixed: 3616617
Change-Id: I4eb57da6faf7ed3dc0a0a4a407fb669078db2a25
Signed-off-by: Vikram Sharma <quic_vikramsa@quicinc.com>
Even if smart Qos is enabled disabled smart_qos_info is accessed which
causes the kernel panic. This change add few check before accessing the
smart_qos_info.
CRs-Fixed: 3650729
Change-Id: Idb8cd892f47aec60290ab3d6c7853a60558840a0
Signed-off-by: Dharmender Sharma <quic_dharshar@quicinc.com>
CRE is not calling cpas stop during release causing
cpas handle to not release. it leads to next time acquire
failure.
Handling release properly with this fix.
CRs-Fixed: 3081144
Change-Id: I40cc22ac86934bc53171f19652a0fee381ee5d67
Signed-off-by: Dharmender Sharma <quic_dharshar@quicinc.com>
This change is returning error for the cases
when platform device misses some data for
device or sub device. Adding Null pointer
checks resolves this issue.
CRs-Fixed: 3608850
Change-Id: If8fc3fc7c93bb2b95087674165dca8c1c13d54f6
Signed-off-by: Sourabh Soni <quic_soursoni@quicinc.com>
Adds checks to confirm CSID frequency greater than
CSIPHY frequency, TFE frequency greater than CSID
frequency. Also TFE frequency should be such that
it can accommodate PHY data rate .
CRs-Fixed: 2847155
Change-Id: I5d3dcc53a6f27129f4b82cba1254445f58f6d0cf
Signed-off-by: Shravya Samala <quic_shravyas@quicinc.com>
Signed-off-by: Shardul Bankar <quic_sharbank@quicinc.com>
Signed-off-by: Gaurav Jindal <quic_gjindal@quicinc.com>
Signed-off-by: Alok Chauhan <quic_alokc@quicinc.com>
On overflow dump the AB and IB votes, tfe clock,
CSID clock and respective bus path data for acquire
time and addr_status registers.
CRs-Fixed: 3118430
Change-Id: Ia38eb4350e8e38562b6d22769b38637480da0b9d
Signed-off-by: Pranav Sanwal <quic_psanwal@quicinc.com>
We need to check if the packet is valid before using it.
CRs-Fixed: 3605421
Change-Id: Ide4e005ba46690c1cac02cb77a2d9aaa497b15df
Signed-off-by: mingpan <quic_mingpan@quicinc.com>
(cherry picked from commit 0156c0475a4c6c042eb84fcfbc14b3e837e0cb4c)
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)
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: I7261e4b9af2984fd78d5dc43bfbec6c090ad647b
Signed-off-by: Vijay Kumar Tumati <quic_vtumati@quicinc.com>
(cherry picked from commit b0009248708dfe13cb0fea22b43c542520db446f)
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 validates cmd_buf in IFE/TFE before submitting
BL to CDM when debugfs(enable_invalid_cmd_check) is enabled.
CRs-Fixed: 3616889
Change-Id: I5418661ff092fb15d04ab7dda6f3b59742a232a8
Signed-off-by: Karthik Dillibabu <quic_kard@quicinc.com>
(cherry picked from commit 7528980860a33e0d800915c64005965862b80982)
Bus port to MID mapping is wrong so updating correct MID mapping to the
respective bus ports.
CRs-Fixed: 3609762
Change-Id: I1d369319d3d5688e21ffb4873643d3cb5ac1467c
Signed-off-by: Dharmender Sharma <quic_dharshar@quicinc.com>
This commit add change to get correct resource outport
for page fault if mid value is same for two or more ports.
CRs-Fixed: 3609762
Change-Id: Ic48e71d1d3956b04240c136507c868f971ec1ad6
Signed-off-by: Dharmender Sharma <quic_dharshar@quicinc.com>
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>
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 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>
Take ceiling value while calculating width for PD10 format.
CRs-Fixed: 3201748
Change-Id: Ib2b722a5e7637b9eb247fba14b512f5338a79836
Signed-off-by: Alok Chauhan <quic_alokc@quicinc.com>
Currently, the 'mm/slab.h' header is used to access a private kernel
structure. With Bazel, private headers are not available.
Refactor the code to avoid the use of the private header.
CRs-Fixed: 3535645
Change-Id: I3b442f0a7b2b70fbf638d3f505c47de88b14c5e6
Signed-off-by: Soumen Ghosh <quic_soumeng@quicinc.com>
Removing CONFIG_SPECTRA_CUSTOM config. Which is not
required for mainline build.
CRs-Fixed: 3535645
Change-Id: I6952370f223ac628eef8e35fe3992e81e48e9fdd
Signed-off-by: Soumen Ghosh <quic_soumeng@quicinc.com>
This change retrieves CAM_FW_PAS_ID from ICP node in
DTSI instead of hardcoding by macros when loading firmware.
It provides forward compatibility for 2 ICP instances
with their own fw pas id.
CRs-Fixed: 3550697
Change-Id: I0bff4d01edebcf028e48dba25d65378adbd42ad6
Signed-off-by: Haochen Yang <quic_haocyang@quicinc.com>
Move the read of consumed addr to bus top half, as the tasklet
may delay and cannot readout the consumed addr in time.
CRs-Fixed: 3543220
Change-Id: I89a00ce0596747b79f3b5e0f66c72e760711829b
Signed-off-by: Pranav Sanwal <quic_psanwal@quicinc.com>
This change removes an unused variable and its declaration.
CRs-Fixed: 3394193
Change-Id: I45561570fd501ba0314e5b43dfe4a6f138fe641f
Signed-off-by: Atiya Kailany <quic_akailany@quicinc.com>
While release sHDR RDI buffer, the ref count of buffer tracker still
larger than 1 lead to page fault, we needn't add buffer tracker ref
count for RDI input io config, only add buffer tracker ref count for
output buffer.
CRs-Fixed: 3561743
Change-Id: I3f1f9f7827c340b688be6aa58fba9340dd0876ad
Signed-off-by: chengxue <quic_chengxue@quicinc.com>
There is a fairly high probability of crashing the device when
encountering SFE BUS error, this change fixes the issue.
CRs-Fixed: 3566948
Change-Id: I0049000766de4923632447c8aecfd15b20627c16
Signed-off-by: Stark Lin <quic_starlin@quicinc.com>
Added code to avoid clk bw update and wait for config done for every
request when cam_presil_mode is enabled.
CRs-Fixed: 3321317
Change-Id: I64b06a081d4c80757aef4903459d58dba85bfb5f
Signed-off-by: Suraj Dongre <quic_sdongre@quicinc.com>
Signed-off-by: Mukund Madhusudan Atre <quic_matre@quicinc.com>
Currently sync_device structure size allocated is nearly 424kb
which is leading to more than accepted page size order.
Sync table row which is array of 2048 is accounting
nearly 90% of total size of sync_device. To fix this
sync_table_row is made pointer based and allocated memory.
CRs-Fixed: 3558545
Change-Id: I0c8093c91ac7fec9f52613012b139192b827b8d9
Signed-off-by: Shravya Samala <quic_shravyas@quicinc.com>
Reset apply map for all devices for the bubbled request for it
to be re-applied correctly.
CRs-Fixed: 3560153
Change-Id: I48e40b6edbfaa6ea60b8d8fb4155e8a612ab3c76
Signed-off-by: Karthik Anantha Ram <quic_kartanan@quicinc.com>
On signaling the synx handle, mark the row as signaled.
CRs-Fixed: 3565287
Change-Id: I88f0d6a8455eecf62ffb084c0a540179d41fa64c
Signed-off-by: Karthik Anantha Ram <quic_kartanan@quicinc.com>
In situations where there are multiple flush requests,
a double-free of buffer tracker occurs when the sync
callback which operates in a workqueue contexts interrupts
an ongoing flush request operation. This change provides
the fix to prevent it from happening.
CRs-Fixed: 3554278
Change-Id: I675b22b76c0f10fcf1808dc3fe0bc48ebd19a2e4
Signed-off-by: Li Sha Lim <quic_lishlim@quicinc.com>
Free allocated memory in case of error scenario during
cdm interrupt handling.
CRs-Fixed: 3555034
Change-Id: Id0bcdd3a0ce4b78ffb13aa1655f886f808a8b4a0
Signed-off-by: Chandan Kumar Jha <quic_cjha@quicinc.com>
The value of macro CAM_ISP_BW_CONFIG_V3 should be 3,
but the current value is 2, we need to update it.
CRs-Fixed: 3558398
Change-Id: Iab07cc08434e31c22890f5f1311e9010ecd460d6
Signed-off-by: mingpan <quic_mingpan@quicinc.com>
When encountering errors on vfe bus, there is no need to set
a param to mark all the error out ports, using existig member
res_id is enough to deal with cases. Thus removing the newly
added member out_port_id of struct event_info to avoid burdensome
code.
CRs-Fixed: 3506350
Change-Id: I44a10b578a867a73509f1458ae182ceb7373b4a3
Signed-off-by: Stark Lin <quic_starlin@quicinc.com>
This change constructs a framework of ISP IRQ injection which
adds support for HW err IRQ simulation.
CRs-Fixed: 3430944
Change-Id: I9552d0aa8b4672bfa04bfc78714d87b72140ad9a
Signed-off-by: Stark Lin <quic_starlin@quicinc.com>
This change adds bring up sequence header and
driver support for SM8750.
CRs-Fixed: 3557518
Change-Id: I6daddb5bca67032a5bfd3bc30bbd3d076f8599a4
Signed-off-by: Wang Kan <quic_wkan@quicinc.com>
This change removes some dead code and fixes memory leak
issues and mismatched labels.
CRs-Fixed: 3394193
Change-Id: Ieb6f0d56cddc58be4caea6f0aece63a793a08c07
Signed-off-by: Atiya Kailany <quic_akailany@quicinc.com>
Currently, cesta hw client rates are being set through mmrm, camera
passes clk rate required and voting happens on mmrm side. This reverts that
funtionality and allows camera to use qcom_clk_crm api to vote directly
in util layer without passing to mmrm.
CRs-Fixed: 3385745
Change-Id: I0b9c6f6f3fc3c7d1513abd7ccf1d2d7180851c61
Signed-off-by: Atiya Kailany <quic_akailany@quicinc.com>
This change updates CSIPHY header for SM8650.
Modify some register values for short channel
from 80Msps to 1Gsps.
CRs-Fixed: 3557454
Change-Id: I0fee8747baec55c6712d4a803bfc421320b57626
Signed-off-by: Wang Kan <quic_wkan@quicinc.com>
Remove data rate settings from common register array.
This change is to avoid re-programming same registers,
with different values.
CRs-Fixed: 3554020
Change-Id: Ia397f669ba97c73a73c3a31fb80b5c233cdb5dd5
Signed-off-by: Wang Kan <quic_wkan@quicinc.com>
Remove restriction that we can only configure streamon/streamoff
from cslpacket once. streamoff packets should not be rejected
when last request to flush.
Change-Id: I0691540f01181fa9f2d6a216537d5f55256d8815
CRs-Fixed: 3524017
Signed-off-by: zhaocao <quic_zhaocao@quicinc.com>
This change updates the injecting delay logic to
support different delay value, e.g. 0,1,2. It also
support multi EOF applied devices in case multi
devices need to be applied at EOF.
CRs-Fixed: 3521003
Change-Id: I929d4211674a1376125dd5f8e55950da9ab3ed6b
Signed-off-by: Depeng Shao <quic_depengs@quicinc.com>
While dumping information about already acquired IFE hw manager contexts,
we are iterating over IFE out resource list and SFE out resource list. Use
of 'max_ife_out_res' and 'max_sfe_out_res' has scope of reaching out of
bound and access unallocated memory.
This change makes use of number of IFE and SFE out resources stored in the
IFE hw manager context to iterate and dump the information properly and
thus solving the out of bounds access.
CRs-Fixed: 3550510
Change-Id: Ifeb7702209958f067a601ca591bb273820e98e1c
Signed-off-by: Abhilash Kumar <quic_krabhi@quicinc.com>
Reinitialize active list only after the flush call to the
respective driver's HW layer.
CRs-Fixed: 3546603
Change-Id: Ib0a5cb208147d2c81717188e89acb5eba474b454
Signed-off-by: Karthik Anantha Ram <quic_kartanan@quicinc.com>
setting value to reset controller, which issues the sync reset to all,
CSID registers and also sends reset to bus.
CRs-Fixed: 3550726
Change-Id: I897d3db876149337864c9889fb99d89d9df3ac43
Signed-off-by: Soumen Ghosh <quic_soumeng@quicinc.com>
When the camera subsystem is powered on (titan_top), async reset
is issued thereby ensuring clean state for all CSIDs. At the
start of the use-case, issuing a sync global SW reset is
redundant, and can be avoided. At the end of the use-case, issue
a SW sync global reset thereby ensuring all SWI registers are
wiped out for the CSID and all connected cores. The sync global
reset also ensures the rx decoder is also reset.
CRs-Fixed: 3545161
Change-Id: I0f5e25bad8508f72b2a0395df4dafc368f71243c
Signed-off-by: Karthik Anantha Ram <quic_kartanan@quicinc.com>
Currently, lowest clk voting level supported is LowSVS, this
change will add support to a lower voting level, LowSVS_D1.
CRs-Fixed: 3480799
Change-Id: Ibdfe9d1d05aa45439a537cebe828cceea83f39d4
Signed-off-by: Atiya Kailany <quic_akailany@quicinc.com>
If a buffer is already mapped to a device or a context bank,
do not try to map it again. This causes inconsistency between
the number of times it is attached and detached.
CRs-Fixed: 3510467
Change-Id: I1cfa5bc68edae1147562c3bbf3609c278d837bcd
Signed-off-by: Vijay Kumar Tumati <quic_vtumati@quicinc.com>
Use MINK API for all the targets that support domain ID and
use legacy API for all other targets. In addition, use a
target based macro to not compile the MINK API for the
older targets where those APIs are not defined.
Change-Id: I0d8f05df6ca8126db1e3ad8456fe78aa77a33ebf
CRs-Fixed: 3529425
Signed-off-by: Vijay Kumar Tumati <quic_vtumati@quicinc.com>
This change removes icp dev type info when
logs have icp ctx string. Because icp string
includes dev type info.
CRs-Fixed: 3542004
Change-Id: Ib7464b3937aaddf0efc27d731865a1631e8cf9cc
Signed-off-by: Wang Kan <quic_wkan@quicinc.com>
This change changes csiphy datarate default channel from std to short.
CRs-Fixed: 3534590
Change-Id: I52cb37fc89c770795fc1fbec57c91eeb6ab379f7
Signed-off-by: Wang Kan <quic_wkan@quicinc.com>
Due to the scheduling delay, the top half was getting delayed for
buff-done events. 2 different requests buff-done is merged due to
top half delay and we incremented 2 times deferred ack due to merger
of buff-done events. This check will prevent duplicate deferred
ack increments.
CRs-Fixed: 3477436
Change-Id: If6bbd460a0a1025758f330f26eaf1099de2daa38
Signed-off-by: Chandan Kumar Jha <quic_cjha@quicinc.com>
Currently, in_interrupt() is used to determine task context.
in_interrupt() would return 0 if the execution is in task context;
a spin lock is obtained with bh disabled. Since the bh's are disabled,
the preempt count/soft_irq disable count would increase.
When we attempt to release the lock, the same in_interrupt() API
would now return non-zero, failing to release the lock.
The change uses appropriate preempt API to determine execution context.
CRs-Fixed: 3509317
Change-Id: I43f981bf3a2d4c238cebc4b29fa8a9aa0a8e0df3
Signed-off-by: Soumen Ghosh <quic_soumeng@quicinc.com>
This change to add the camera internal LLCC staling mode enum,
rather than using direct kernel LLCC enum.
CRs-Fixed: 3523216
Change-Id: I81b5f0b84a2dd429061cc45bcaea198d909b2364
Signed-off-by: Soumen Ghosh <quic_soumeng@quicinc.com>
All the IRQs are masked out at the start of the stop sequence.
When unsubscribing for respective IRQ controllers, only clean up
internal data structures without impacting the mask registers.
CRs-Fixed: 3535921
Change-Id: I7f05867f07fcfabe065269734c67c5e11e0a9fe2
Signed-off-by: Karthik Anantha Ram <quic_kartanan@quicinc.com>
When ois get stop op code and the state is not in start,
we need return directly and don't set state to config.
This change also adds ctrl mutex init when ois i2c
component bind.
CRs-Fixed: 3520698
Change-Id: I0041f9aa3af250d449f7b757791ef684fa1b385f
Signed-off-by: Wang Kan <quic_wkan@quicinc.com>
Config different channel settings according to the flag
including short and standard channel.
CRs-Fixed: 3441333
Change-Id: I90ae6f941debcd63ecad1e24363997c19bad59ca
Signed-off-by: Wang Kan <quic_wkan@quicinc.com>
For sHDR usecase, we may enter bubble applied substate, then
isp trigger bubble recovery again, we need isp to apply default
setting in this case. This change adds notify frame skip interface
for bubble applied substate to apply the default settings.
CRs-Fixed: 3533564
Change-Id: Ie82aa73786902328b21909ba958d0a225ed49916
Signed-off-by: Depeng Shao <quic_depengs@quicinc.com>
This change fixes below issues:
1. When we handling hw err irq, hw info of vfe and sfe should be dumped
based on res_id. However, the res_id that passed to handle_hw_err
function was invalid, which results the dump operation fail to execute.
2. If the error that SFE RD encountering is not the type of violation,
it will return a NULL pointer of ctx and causing fail to notify hw mgr.
3. When facing multiple errors on different out ports, it's only able to
notify hw mgr to handle one of them and ignore the rest, which results
failing to respond to all the errors.
CRs-Fixed: 3446685
Change-Id: I6861a3e7565e4aff2ebd2e5fbf589f406e65f517
Signed-off-by: Stark Lin <quic_starlin@quicinc.com>
This change creates a sysfs entry(subparts_info) which
has info about number of IFEs, IFE-LITEs, SFEs & CUSTOM,
whose values are populated in their respective drivers.
Also, validates whether a particular IFE, SFE and CUSTOM
is supported or not. Based on this, probe of IFE, SFE and
CUSTOM drivers will happen accordingly.
CRs-Fixed: 3482745
Change-Id: Iff6e79a7793b14b1f368f215020617f10dbd4bb5
Signed-off-by: Karthik Dillibabu <quic_kard@quicinc.com>
Add a goto label to fine-grain situations where
buffer tracker list is to be freed, and when it
doesn't, where the submitted packet request id
is less than or equal to request that was last
flushed, as this call will cause null pointer
access.
CRs-Fixed: 3507867
Change-Id: I1b909473baf7a227bbd649e4c883daa485602cd9
Signed-off-by: Li Sha Lim <quic_lishlim@quicinc.com>
The function cam_mem_mgr_release can unmap buffers when in use.
This change with cam_mem_put_cpu_buf prevents unmaping the buffers in use.
CRs-Fixed: 3489559
Change-Id: I3a0d7ee0d3e86a2a315bc44e15ca298e71d62ffd
Signed-off-by: illa lakshmi soujanya <quic_illa@quicinc.com>
This change will allow clients voting through mmrm to use the new mmrm
api and vote according to their drv_type. This change affects
registering, unregistering and setting the clk rate to sw and
hw clients.
CRs-Fixed: 3385745
Change-Id: I11f76a0de3ba0d8d969093725d4c528afef51373
Signed-off-by: Atiya Kailany <quic_akailany@quicinc.com>
The function cam_mem_mgr_release can unmap the buffers when in use.
This change prevents unmapping the buffers when in use.
CRs-Fixed: 3489559
Change-Id: I2e72e795d39ac15abfa56c19043c419a03686966
Signed-off-by: Shivakumar Malke <quic_smalke@quicinc.com>
If no valid axi BW request is found in 6 continuous requests, the axi
bw vote will remain unchanged, causing BW reduction fail to execute,
and error axi vote log will be printed per request. We need to vote
current request even it's zero to do reduction in this case.
CRs-Fixed: 3507989
Change-Id: Ibf81bc7098ae2599c0fc3d31537c58e18e781704
Signed-off-by: Stark Lin <quic_starlin@quicinc.com>
This change fixes a known issue:
Operands in a bitwise operation have different size.
CRs-Fixed: 3523401
Change-Id: Ic7ef67a5bc5413c137fee7693efb2d7ad53ceb50
Signed-off-by: Stark Lin <quic_starlin@quicinc.com>
Now isp state monitor is moved into dbg_monitors, but some function
is still using isp state monitor in struct cam_isp_context. we should
use isp state monitor in dbg_monitors and need to remove isp state
monitor from struct cam_isp_context.
CRs-Fixed: 3514701
Change-Id: Ib993f25234654ad5be74617d6ddb82355ece33bc
Signed-off-by: mingpan <quic_mingpan@quicinc.com>
On v980, context-based IPPs are introduced, per TFE hw. This
change programs the IPP_IRQ_COMP_CFG0 register, which has
information on how the IPP ctxt paths from CSID (post CAMIF)
are mapped to the ctxt paths in TFE.
Since this information can change dynamically, per frame basis,
this is programmed by UMD through command buffer. This change
provides the support for it.
CRs-Fixed: 3321317
Change-Id: I845bba4b7fd09eeb42821b5b7f1cbc6022abe631
Signed-off-by: Li Sha Lim <quic_lishlim@quicinc.com>
Signed-off-by: Gaurav Jindal <quic_gjindal@quicinc.com>
Signed-off-by: Mukund Madhusudan Atre <quic_matre@quicinc.com>
Signed-off-by: Suraj Dongre <quic_sdongre@quicinc.com>
RC value is getting modified during CPAS start in error
scenario. Handle return value which helps to retain
the original rc value.
CRs-Fixed: 3477436
Change-Id: I7006c60c1c5903c85f18f6eb385859b43b0cedc9
Signed-off-by: Chandan Kumar Jha <quic_cjha@quicinc.com>
Add support to allocate IPP1/2 resources and handle corresponding
configuration. Add support to skip camif and cfg1 register
programming so that the cmd buffer settings could take effect.
CRs-Fixed: 3321317
Change-Id: I959666aa14618741148320a50e53f252882b6874
Signed-off-by: Mukund Madhusudan Atre <quic_matre@quicinc.com>
Address the inconsistency in a function prototype
across multiple kernel versions.
Change-Id: Ib5d3c3df74a89a019b0f1f858746888ce0101512
CRs-Fixed: 3509086
Signed-off-by: Vijay Kumar Tumati <quic_vtumati@quicinc.com>
Signed-off-by: wasikhan <quic_wasikhan@quicinc.com>
Dump cpas vote info when CRM dump request, just like
cam_req_mgr_dump_state_monitor_info.
CRs-Fixed: 3441303
Change-Id: Ic5c2e671a27593ef1c25fa650c2148dd88c9968f
Signed-off-by: mingpan <quic_mingpan@quicinc.com>
When crm close, call free link which free in_q.
The in_q ptr is null. It will result in null
in_q ptr deref when call notify trigger. So need
add spin lock to protect req data.
CRs-Fixed: 3488142
Change-Id: I25101f00e07bd56f1449085f2c6ce3ce3141adc3
Signed-off-by: Wang Kan <quic_wkan@quicinc.com>
Use SCM 7 call during the process shutdown. This is to
workaround a race condition between the close of camera FD
and the invoke driver FD that leads to a device crash.
Additionally, keep the Domain ID clocks on only during
protect or unprotect operations.
CRs-Fixed: 3509086
Change-Id: Ic091aa737df10bb2b41190c2f850c31fd17af9b2
Signed-off-by: Vijay Kumar Tumati <quic_vtumati@quicinc.com>
Add support to pre-process acquire information for csid ipp
paths, and make sure correct resource is acquired. Add support
to have destination mask consolidated for camif resource in vfe.
Add hw context id info for vfe output resource acquire. Add
support for exceptions in context config for certain bus ports.
CRs-Fixed: 3321317
Change-Id: I5a812c29c1aaa72d186d0398a024c0da76ec862b
Signed-off-by: Mukund Madhusudan Atre <quic_matre@quicinc.com>
Signed-off-by: Suraj Dongre <quic_sdongre@quicinc.com>
problem:
scm calls to enable/disable SAFE signal introduced due to HW limitation
in some targets from ife causing overall system delay whenever
camera starts and other HW components also making scm calls.
solution:
prevent redundant SCM calls for SAFE signal.
CRs-Fixed: 3511194
Change-Id: Ib6692d599e9ec9e9182a9e6eb0aef52322cbfdef
Signed-off-by: Pranav Sanwal <quic_psanwal@quicinc.com>
IFE cpas state monitor enhancement by printing ctx id,
hw index, frame id, event id and request id.
CRs-Fixed: 3368290
Change-Id: I41a01382ec2bc6f0c7b9f89c8bb20da42774a65c
Signed-off-by: Wang Kan <quic_wkan@quicinc.com>
Adds support in Multi Context IRQs in CSID Driver.
CRs-Fixed: 3321317
Change-Id: I49e1645b1f655b02e8097158798e23259598b8ee
Signed-off-by: Gaurav Jindal <quic_gjindal@quicinc.com>
In case of multi context supported targets for MC ports,
before configuring the bus related registers, correct context
needs to be configured to update the correct registers in the
respective context domain.
This commit adds support for context selection register
and update the io buffers for each context sequentially.
CRs-Fixed: 3321317
Change-Id: Icd660c2dfa56fad0d349679701a638943a0e833c
Signed-off-by: Gaurav Jindal <quic_gjindal@quicinc.com>
Fix isp log errs and format errs.
CRs-Fixed: 3499636
Change-Id: Ieb5b81b95dea440b1da17cb5bc9be86f75b7c4f6
Signed-off-by: Wang Kan <quic_wkan@quicinc.com>
When check CSID frame size err, is not bus overflow, result in
the err event data don't get error type info and can't transfer
hw err info rightly from ife hw to isp ctx. So first let err
event data get err type info.
CRs-Fixed: 3500372
Change-Id: Ia90a8c28028ae63174d30d2513e6d1f042810d43
Signed-off-by: Wang Kan <quic_wkan@quicinc.com>
This change is to validate session, device and link handle.
Also, checks whether the device handle belongs to
correct session handle or not.
CRs-Fixed: 3496553
Change-Id: I6b86bf7d0908a280e90e085a3b3e1727facdf8c6
Signed-off-by: Karthik Dillibabu <quic_kard@quicinc.com>
in case of back-to-back bubble requests, We do internal recovery.
We don't have locks for list protection in the internal recovery flow.
From the core dump, we had seen that we were handling bubble in one core
but we had done list modification on another core during internal
recovery without list protection, which results in list corruption.
We are accessing the request queue during internal recovery without
any locks which are resulting in list corruption.
We need to use locks to prevent list corruption in the internal
recovery flow.
CRs-Fixed: 3444802
Change-Id: Id72077647795e51e112b030d4fb75d80299c1bed
Signed-off-by: Chandan Kumar Jha <quic_cjha@quicinc.com>
The i2c transfer interface returns the num of message is
processed if there is no issue, this change checks if the
result of i2c transfer is same with the num of message,
the return value is assigned as 0 if they are same.
CRs-Fixed: 3495774
Change-Id: I408038120ac2371f1ed031daa364c2e2563e3606
Signed-off-by: Depeng Shao <quic_depengs@quicinc.com>
It is wrong to use crop_v_en_shift_val and early_eof_en_shift_val
to do AND operation with cfg1, instead, we should use
BIT(crop_v_en_shift_val) and BIT(early_eof_en_shift_val). Besides,
register rup_aup_cmd_addr is not a readable register, so we can't
read it's value from it.
CRs-Fixed: 3500551
Change-Id: Ied566a968b0403498ce859544659f9dbe40ce770
Signed-off-by: mingpan <quic_mingpan@quicinc.com>
Sometimes need to avoid access clock/regulator/icc api, this change
add support bypass clock/regulator/icc wrapper through enable
some debugfs parameters and devicetree.
CRs-Fixed: 3445248
Change-Id: I0546975bf063625b39b771c776813e7dbff84e06
Signed-off-by: zhuo <quic_zhuo@quicinc.com>
In VFE top, currently it is assumed that frame timing
IRQs will be part of status 1 register. Remove that
assumption to support v980 hw as well. Also, when
frame irq debug is enabled in ife hw manager, don't
trigger callback, as we just want to see if frame
reached IFE/TFE or not.
CRs-Fixed: 3321317
Change-Id: I544727d4bec628b9041531015f24bf73e8ae2be1
Signed-off-by: Mukund Madhusudan Atre <quic_matre@quicinc.com>
This change adds support to detect early
unmapping of buffers from UMD, and signal
when the error occurs by sending an error
code to UMD.
At present, buffers are allocated and/or mapped
by UMD, and the following sequence occurs.
KMD prepares packets sent during a config ioctl,
and these packets reside in the mapped buffers;
HW blocks then access these buffers, and may
write output to other mapped buffers(io buffers);
Once HW is done(upon a buf done), KMD signals
this event to UMD;
UMD may free/unmap these relevant buffers.
This change adds support to detect cases where a
free/unmap happens before/while HW is accessing
these buffers.
This feature is enabled by default, but a debugfs
variable disable_buf_tracking is added under smmu
which will enable the user to disable the feature.
Camera server needs to be restarted whenever this
variable is set/unset for changes to take place.
CRs-Fixed: 3382609
Change-Id: I39c3f0c373743c10bc2e6304ffbdc820e3c95970
Signed-off-by: Li Sha Lim <quic_lishlim@quicinc.com>
HWPD is associated with several modules, but only image size violation
displayed in the kernel when an error occur. Now we will pass the error
code of HWPD violation to UMD to help UMD to take necessary action and
dump relevant info.
CRs-Fixed: 3440015
Change-Id: I6483b228a8eeaac3bf54f5f83f8f8deab3da6250
Signed-off-by: Stark Lin <quic_starlin@quicinc.com>
Allocate memory based on what is configured to FW. Avoid
hardcoded allocations, thereby reducing the memory
footprint. The change also updates size check for a SMMU
mapping, if the size of the buffer is beyond the assigned
va range fail the mapping.
CRs-Fixed: 3477543
Change-Id: I3c2e262f57cdfdbd51255679b2405d855d7d5353
Signed-off-by: Karthik Anantha Ram <quic_kartanan@quicinc.com>