We are seeing cam warning "cpas gdsc clk is on" and qchannel handshake
is failing on next power on. This will happen if some client want to
tunr on camnoc axi clk before turning off the gdsc clk in previous run.
CRs-Fixed: 3417264
Change-Id: I6927998cb47b7555e22c3d57b4c2f526adf62f34
Signed-off-by: Soumen Ghosh <quic_soumeng@quicinc.com>
camera-kernel:
0292d3c Merge "msm: camera: sensor: Add get sync and put sync for i2c QUP" into camera-kernel.lnx.dev.
Change-Id: Id6d4dab3fe8fad181ead67aa7539b402be3f8b80
Signed-off-by: hchintal <quic_hchintal@quicinc.com>
Use scnprintf instead of memcpy to copy string into mornitor
array. The length of dev name may be shorter than 256 when
function __cam_req_mgr_dev_handle_to_name return Invalid dev_hdl,
In this case, if we use memcpy to copy string into mornitor
array, it may cause to kernel panic.
CRs-Fixed: 3444923
Change-Id: I5b0c1a4c3d83041b778c39c00a4759392b6ee7be
Signed-off-by: mingpan <quic_mingpan@quicinc.com>
camera-kernel:
1675203 Merge "msm: camera: isp: Add support for V2 Out Configs" into camera-kernel.lnx.dev.
Change-Id: Ic14ba20d7cb41b17dfd8301fd304bd3545b5c5a5
Signed-off-by: hchintal <quic_hchintal@quicinc.com>
This commit adds support for the new fields need to be passed by
Userland. To support new fields, new version for out port config
structure is added.
During acquire, hint from user space is used to use packing
at Write master side.
CRs-Fixed: 3321317
Change-Id: Ide2640b96d8c3b2cd2cce77aa0279a69499f20c8
Signed-off-by: Gaurav Jindal <quic_gjindal@quicinc.com>
camera-kernel:
0814933 Merge "msm: camera: sensor: debugfs utility for i2c/cci" into camera-kernel.lnx.dev
3f72fa5 Merge "msm: camera: ife: Remove unnecessary cdm release call" into camera-kernel.lnx.dev
b3b9b82 Merge "msm: camera: isp: Add support to rup on v980" into camera-kernel.lnx.dev
6459fb4 Merge "msm: camera: memmgr: Use system movable heap if available" into camera-kernel.lnx.dev
a92db02 msm: camera: sensor: debugfs utility for i2c/cci
77e8336 msm: camera: isp: Enable crop and drop on PPP path.
Change-Id: If97ade46e9da35c4f1f63214a3c879f8843dbf2c
Signed-off-by: hchintal <quic_hchintal@quicinc.com>
This change adds support to read/write any sensor
devices that are on i2c, whether using cci or qup.
The debugfs file is mounted on i2c subdir under
camera root directory in debugfs.
Given that these devices are not always turned on,
and that this power on/off sequence is controlled
by userspace, this change displays all available
i2c devices, and their power states.
The user then can read/write to those devices which
are turned on, according to the following:
Usage:
- echo (anything or empty string) > i2c-rw
- cat i2c-rw then displays usage, and states of devices
- echo (proper r/w format) > i2c-rw
- cat i2c-rw displays output/error
Note that cat output is not persistent, it gets cleared
after displaying once.
CRs-Fixed: 3385104
Change-Id: I22023e0a8d9a680b5c8578cae2aa253c4c90226f
Signed-off-by: Li Sha Lim <quic_lishlim@quicinc.com>
LCR PD Violation is due to different clock domain crossing
architecture for PPP & RDI Paths. This issue observes when the
crop/drop Settings don't match for PPP & RDI paths.
The recommendation from Hw Team is to enable crop/drop on
both RDI & PPP paths to keep the delay same.
Enable crop and drop on RDI & PPP paths for v880.
CRs-Fixed: 3387109
Change-Id: I32bc5e6f4665f56d2b8c7ca8bf77cee5d7c24238
Signed-off-by: Chandan Kumar Jha <quic_cjha@quicinc.com>
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>