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>
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)
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>
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)
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 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)
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 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>
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>
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>
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 changes csiphy datarate default channel from std to short.
CRs-Fixed: 3534590
Change-Id: I52cb37fc89c770795fc1fbec57c91eeb6ab379f7
Signed-off-by: Wang Kan <quic_wkan@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>
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>
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>
Fix isp log errs and format errs.
CRs-Fixed: 3499636
Change-Id: Ieb5b81b95dea440b1da17cb5bc9be86f75b7c4f6
Signed-off-by: Wang Kan <quic_wkan@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>
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>
Change sequential to burst write in write calls for i2c and i3c.
CRs-Fixed: 3418153
Change-Id: I4b10b1b62e1075225867561297bddaaac2797a2d
Signed-off-by: Ridhi Shah <quic_ridhshah@quicinc.com>
Enhance the start dev log for csiphy.
CRs-Fixed: 3482293
Change-Id: I8887affedb0d7937e4105585e531c654eaa634ff
Signed-off-by: Depeng Shao <quic_depengs@quicinc.com>
- Add support for Dynamic mode switch.
- Request store and apply from waiting queue.
- Add support for reapply request from active queue.
- Handling TPG interrupt.
CRs-Fixed: 3403974
Change-Id: I5dfe146b30631a94059f72d482610e04ba8e4e2c
Signed-off-by: Rishab Garg <quic_rishabg@quicinc.com>
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>
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>
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>
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>
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>
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>
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>
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>