To provide more peak memory space for camera usecase, utilize
system-movable heap. This will first check in standard system
heap for allocation, if memory is not available, allocation will
happen from system-movable heap. As we can not keep memory from
system-movable heap to stay forever (which will regress memory
power features), need to be careful when allocating from this
heap. All camera userspace allocations' lifetime is at the
usecase boundary, so allocate userspace allocations from
system-movable heap if available, fallback to standard system
heap if not available. kmd internal allocations will most likely
stay forever, so allocate them only from standard system heap.
CRs-Fixed: 3450854
Change-Id: Ic6644dea04cb44bf963b6277205de8502bc34bd9
Signed-off-by: Pavan Kumar Chilamkurthi <quic_pchilamk@quicinc.com>
The cdm release call should be called here only if there
is some other failure after cdm acquire. But since there is
no other failure condition, we are removing it.
CRs-Fixed: 3251362
Change-Id: I2bfad3f00dd95c70377f60d6005214b7892f0359
Signed-off-by: Shardul Bankar <quic_sharbank@quicinc.com>
v980 has different registers for aup and rup and a sync register,
this change adds support to it.
CRs-Fixed: 3321317
Change-Id: I5804bdd6024066760104802ce07ea055b30feefd
Signed-off-by: Ashish Bhimanpalliwar <quic_abhiman@quicinc.com>
when sequential register address present in register setting,
that can be combined as one I2C msg command and save some
Cycles. This lookahead is enabled by default, if it needs
to be disabled then we need to issue below command.
adb shell "echo 0 > /sys/module/camera/parameters/i2c_lookahead_en"
adb shell "echo 0 > /sys/module/camera/parameters/i3c_lookahead_en".
CRs-Fixed: 3418153
Change-Id: I0a63608316fe745e36a25e5206be6681da6aaa76
Signed-off-by: Lokesh Kumar Aakulu <quic_lkumar@quicinc.com>
After device inactive period timeouts, icp hw mgr receives a callback
to deinit the inactive device's clock. The current implementation of
the callback fetches the wrong hw type to deinit. This change will
get the right device type to deinit.
CRs-Fixed: 3449530
Change-Id: I63700d35d62d6096d09d23c933e22da623d087c9
Signed-off-by: Sokchetra Eung <quic_eung@quicinc.com>
Query the CSF version in use from SMMU proxy driver and
use noncontiguous system heap in case of CSF 2.5
instead of the contiguous secure display heap.
In addition, do not lend the buffer in CSF 2.5.
CRs-Fixed: 3424427
Change-Id: I3d5f2402034dd455c304d5726eb9aa8ee2080dcc
Signed-off-by: Vijay Kumar Tumati <quic_vtumati@quicinc.com>
Print CCI master-id & hardware-id on probe.
Print CSIPHY rx & timer clock rates once when clocks are enabled
and also prints on error trigger notification.
Change-Id: I4ecb1c7214d7482b157c3c1647e19743e8d90e17
CRs-Fixed: 3432375
Signed-off-by: illa lakshmi soujanya <quic_illa@quicinc.com>
camera-kernel:
09d6170 Merge "msm: camera: isp: Move IFE FD out port to non-secure" into camera-kernel.lnx.dev.
Change-Id: I102b02058eefb05bcb6e3323126f57558a8e0427
Signed-off-by: hchintal <quic_hchintal@quicinc.com>
Currently, the IFE FD port is configured to be secure by TZ and the
camera software allocates secure buffers to be consumed by EFA FD
module. However, as we are moving to the software based DLFD, this
port needs to be configured as non secure by TZ and camera should
treat so and allocate non secure buffers.
CRs-Fixed: 3443139
Change-Id: I2fcc89d4d61bd944969bfe854584960c10648f6c
Signed-off-by: Suraj Dongre <quic_sdongre@quicinc.com>
Signed-off-by: Vijay Kumar Tumati <quic_vtumati@quicinc.com>
With the update in the synx driver for async wait, clients
are expected to register the callback with no specific
timeout value.
CRs-Fixed: 3434716
Change-Id: Ie9a5a88f9fddc9512b249919c843e2367de7db4e
Signed-off-by: Karthik Anantha Ram <quic_kartanan@quicinc.com>
Dump mem mgr bufq to user buffer.
CRs-Fixed: 3377820
Change-Id: I5be4e245857ccb0602e54546f127793d9f6b03f6
Signed-off-by: Petar Ivanov <quic_pivanov@quicinc.com>
camera-kernel:
bae5295 Merge "msm: camera: sensor: Removing dead code" into camera-kernel.lnx.dev
2f73359 Merge "msm: camera: isp: Move the mup info to per request update data" into camera-kernel.lnx.dev.
Change-Id: Iff9df2c63fc50c9fc11f94708fe052111b719730
Signed-off-by: hchintal <quic_hchintal@quicinc.com>
Sometimes, maybe two continuous mup update request comes too
close, then the mup value will be overridden in CSID side. This
change moves the mup info to per request update data.
CRs-Fixed: 3425088
Change-Id: I90f6608c1bf79180f8d70d9053136c2e9c7fd397
Signed-off-by: Depeng Shao <quic_depengs@quicinc.com>
This change modifies the size checking for fence_cmd_args
when allocating the fence_input_info.
CRs-Fixed: 3350863
Change-Id: I16b2898e867d2af11e32c55cfb4e87316352b642
Signed-off-by: Haochen Yang <quic_haocyang@quicinc.com>
This change will put dma fence no matter what the value
of row->ext_dma_fence is when closing it.
CRs-Fixed: 3423230
Change-Id: Iaf3faad970ad226bebaed41305f70afa9e5858f7
Signed-off-by: Haochen Yang <quic_haocyang@quicinc.com>
The change ensures the dma fence is always signaled prior
to release.
CRs-Fixed: 3423230
Change-Id: I6063b49c23451fc5053dde6436776b8a42d0fd02
Signed-off-by: Karthik Anantha Ram <quic_kartanan@quicinc.com>
Signed-off-by: Haochen Yang <quic_haocyang@quicinc.com>
Add IPE APP path macros to be used in DTSI.
CRs-Fixed: 3434175
Change-Id: Iae584ee3967d80293893308470b3e6bd23c6294f
Signed-off-by: Depeng Shao <quic_depengs@quicinc.com>
This change modifies CAM_ISP_CONTEXT_AEB_ERROR_CNT_MAX to 6.
CRs-Fixed: 3431394
Change-Id: Icb4c737255efc0f9b1eca2626cff5d72ae062775
Signed-off-by: Haochen Yang <quic_haocyang@quicinc.com>
Currently cam_smmu_release_buf_region has a redundant
dma_buf_put, which may cause use after free issue.
Such as when download firmware, will create dma buf and
sysfs_add_workfn will create kobject for the dma buf.
When download firmware fails and then releases the dma
buf, but due to the redundant dma_buf_put will cause
the dma buf is releasd even though the sysfs_add_workfn
is not completed. So when sysfs_add_workfn continue to
access kobject will cause use after free issue. This
commit remove the redundant dma_buf_put.
CRs-Fixed: 3408553
Change-Id: If1e650b7c9b8c41d2a270175ff1a94bb9c58e5b9
Signed-off-by: zhuo <quic_zhuo@quicinc.com>
Remove all instances of cpas camnoc reg read/write by clients.
Move cpas reg base enums to internal cpas file that is only visible
to CPAS usages, and create cpastop reg base macro in CPAS API file.
So, clients can now read and write to cpastop reg only.
CRs-Fixed: 3405131
Change-Id: I1793377a8b6f010bb2c79ac9020cfa3d21e31812
Signed-off-by: Sokchetra Eung <quic_eung@quicinc.com>
This change appropriately handles dangling pointer generated
by sync/dma/synx when closing the drivers.
CRs-Fixed: 3350863
Change-Id: Id5353814f4908f17706cebc04b3f02ccc1488813
Signed-off-by: Haochen Yang <quic_haocyang@quicinc.com>
Dump lastest state monitor info into the ldar buffer.
CRs-Fixed: 3377803
Change-Id: I836a0e09901376c582a560a4450b1d3e2ecedbe7
Signed-off-by: Petar Ivanov <quic_pivanov@quicinc.com>
Modify the timestamp format of ISP state monitor. We need to use the
dump info from CRM and ISP to draw a timing diagram for debugging,
so we need to keep their timestamp format same.
CRs-Fixed: 3413642
Change-Id: Icc397a04f18fe1fd41c2c78e228730c245f8ef49
Signed-off-by: mingpan <quic_mingpan@quicinc.com>
Optimize i2c and i3c table write to send all settings to QUP at once.
Previously we called QUP transfer API for every single register write
which caused latency
In current solution we write all settings to a buffer and send entire
buffer to QUP master by calling the transfer API just once.
CRs-Fixed: 3408965
Change-Id: I251360e36a2d304addd083abd5b02fb6ed7f4bbb
Signed-off-by: Ridhi Shah <quic_ridhshah@quicinc.com>
copy_from_user function is copying one extra byte using
sizeof(input_buf) and also string is not null terminated.
So Added logic to avoid copying one extra byte and making
string null terminated.
CRs-Fixed: 3422931
Change-Id: I4657ad17adc2e8a82f1ff39c2493089412193f52
Signed-off-by: Dharmender Sharma <quic_dharshar@quicinc.com>
Update the AON cam id value to uint32 for csiphy driver.
CRs-Fixed: 3355901
Change-Id: I6f16cdc22c7dd0affc5e61f39cb783d2d67c39f9
Signed-off-by: Ridhi Shah <quic_ridhshah@quicinc.com>
Update SOC util to be able to parse multiple irq names from DT and,
request, enable, disable multiple irq lines per soc.
All IRQ lines per SOC will have the same handler but different data,
so ISR will have their own private data to differentiate source of irq
in the same handling function.
CRs-Fixed: 3395596
Change-Id: Id9ca1cd3ef105d732a82decd7c8078bd29668326
Signed-off-by: Sokchetra Eung <quic_eung@quicinc.com>
Currently prior to issuing a SW reset to CSID, we are
ensuring the input to CSID rx is cut off. On any fatal
rx error, the driver tries to issue a SW global reset
without halting the bus. If bus is not IDLE, it could
lead to an invalid domain ID getting propagated leading to
a global fault. To avoid this use path reset on CSID stream off,
global reset to be used on use-case boundaries when we are
certain that the bus is IDLE.
CRs-Fixed: 3420832
Change-Id: Id3beb42963357c881d073c258b7357360797b4bf
Signed-off-by: Karthik Anantha Ram <quic_kartanan@quicinc.com>
This change moves load report cmd in lock context,
then all sequence in one queue will be defined as
atomic queue commands without interruption from
the other queue commands.
CRs-Fixed: 3415571
Change-Id: Icda2271b580bd3f462c306ad0f229969a94079f6
Signed-off-by: Depeng Shao <quic_depengs@quicinc.com>
camera-kernel:
4c6191b Merge "msm: camera: csiphy: Add Support for datarate config per csiphy" into camera-kernel.lnx.dev.
Change-Id: I72febf46ad0bf341b8e731419a5cbbb0f4ede68b
Signed-off-by: hchintal <quic_hchintal@quicinc.com>
Tough sensor data rate is same for multiple camera sensors
still it'll depend up the mounting distance from sensor
to CSIPHY or SOC. Hence update datarate setting based on
CSIPHY instance.
CRs-Fixed: 3420314
Change-Id: Ie098b121394e241f360f9ae775bfd83b6bace15b
Signed-off-by: Lokesh Kumar Aakulu <quic_lkumar@quicinc.com>
camera-kernel:
07f26d8 Merge "msm: camera: sync: Add extra support for monitor dump" into camera-kernel.lnx.dev.
Change-Id: Id2374541a16588a12385734bfaded187c8b88fc0
Signed-off-by: hchintal <quic_hchintal@quicinc.com>
Add monitor dump when dma/synx is already in signaled
state or has registered a cb, and when sync fails to
signal its corresponding dma/synx.
CRs-Fixed: 3350863
Change-Id: I4b52647f1d3f53eff119df1ab143be6848dd0d5d
Signed-off-by: Haochen Yang <quic_haocyang@quicinc.com>
Adding infrastructure to check OIS FW version before downloading
OIS FW to avoid downloading the same FW.
CRs-Fixed: 3383153
Change-Id: Ic92b62bfe2277eaba9b417a13201fabeab04383e
Signed-off-by: Yulei Yao <quic_yuleiy@quicinc.com>
Signed-off-by: Karthik Anantha Ram <quic_kartanan@quicinc.com>
This change removes some unused variables and
checks bounds for an index in camera driver.
CRs-Fixed: 3394193
Change-Id: I1e38834f09a4ef9717787e87df8689ab2541fd84
Signed-off-by: Atiya Kailany <quic_akailany@quicinc.com>