Граф коммитов

250 Коммитов

Автор SHA1 Сообщение Дата
Yongsheng Li ff209f8426 MSM: Camera: Sensor: Add for read GMSL camera link status
Add for read GMSL camera link status

Change-Id: I0381dd77c3a712d8be52b9a14ae8eba9eb452f43
Signed-off-by: Yongsheng Li <yon@codeaurora.org>
2021-05-26 20:20:38 -07:00
Linux Build Service Account 02b04d1bb9 Merge "msm: camera: isp: Add 422 to 420 conversion support" into LE.EDGE.1.0.c1 2021-03-03 17:24:53 -08:00
Depeng Shao 1f294b9d16 msm: camera: isp: Add 422 to 420 conversion support
Add 422 to 420 conversion support.

Change-Id: I1b14368ed90e9b39c78ac6d38daa6e040cb61bc8
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2021-03-01 22:07:13 -08:00
Pengfei Liu 6e44e0e607 msm: camera: sensor: Add support for multiple links.
Add read link status in probe function.

Change-Id: Id708d05e979e9bb494fd9df4b4fdba6f09355141
Signed-off-by: Pengfei Liu <pengfeiliu@codeaurora.org>
2021-03-01 22:05:14 -08:00
Jing Li d975f753a5 msm: camera: isp: Add input format set for YUV sensor
Add input format set for YUV sensor and add logs for chroma and demux register

Change-Id: I6418fb1037a0b8d105b4cff98046227c0dd09a75
Signed-off-by: Jing Li <liji@codeaurora.org>
2020-10-26 17:13:50 -07:00
Linux Build Service Account 1a243a9802 Merge "msm: camera: sensor: Add support for multiple slave address" 2020-09-21 16:45:23 -07:00
Pengfei Liu af2e9427da msm: camera: isp: Add support for YUV format in CamIF
Add support to configure the incoming format in the top
core Camif register.

Change-Id: I36d1c19d817c94c381d262beb372d8665f33748a
Signed-off-by: Pengfei Liu <pengfeiliu@codeaurora.org>
2020-09-19 15:47:13 +08:00
Zhaohong Chen 9b0f807f15 msm: camera: sensor: Add support for multiple slave address
Add support for program multiple slave addresses
in a i2c sensor sequence.

CRs-Fixed: 2660303
Change-Id: Idbb1c6c77ed0494c3e22cb14055ea7a613772c5a
Signed-off-by: Zhaohong Chen <zhaohong@codeaurora.org>
2020-07-14 00:34:51 -07:00
Tejas Prajapati 3b84ebfc3f msm: camera: isp: validate in_port before accessing
in_port information we are getting from the UMD and accessing
it directly without validation which might lead to
corruption and device failure.

CRs-Fixed: 2629969
Change-Id: I0a1c57db9b94f9657427872ae6797635c6aed668
Signed-off-by: Tejas Prajapati <tpraja@codeaurora.org>
2020-05-06 23:02:05 -07:00
Ayush Kumar 4439bd390a msm: camera: core: Fix context release timing issue
When sync object is invalid and num_in_map > 1,
it will lead to context ref leak. Check sync
object first, then register sync call back.

CRs-Fixed: 2594185
Change-Id: I2d39ce3ea43bbe7bc05420b86b37fdfba4aa795a
Signed-off-by: Ayush Kumar <ayushkr@codeaurora.org>
2020-03-19 21:55:08 -07:00
Camera Software Integration ee22a15600 Merge "msm: camera: cpas: Add cpas support for camera v170_200 platform" into camera-kernel.lnx.1.0 2019-12-25 06:51:10 -08:00
Camera Software Integration 09d42e8d75 Merge "msm: camera: smmu: Use iommu best match algo for camera" into camera-kernel.lnx.1.0 2019-12-25 06:51:02 -08:00
Camera Software Integration 73b23d47d7 Merge "msm: camera: smmu: Add support for non-contiguous mermory region" into camera-kernel.lnx.1.0 2019-12-25 06:50:54 -08:00
Prakasha Nayak cc9864193c msm: camera: icp: Mapping fw error numbers with error names
This change will print ICP error names based on error type.

CRs-Fixed: 2456658
Change-Id: I975598a7404f7520912d7b3211b6baa249e7f238
Signed-off-by: Prakasha Nayak <pnayak@codeaurora.org>
2019-12-20 13:46:02 -08:00
Karthik Anantha Ram 2f86e7386d msm: camera: icp: Enqueue the abort cmd in workq
The request frame cmds are submitted to the FW in workq context.
The abort cmd as part of flush is triggered in user thread context.
This change will enqueue the abort as part of flush to FW in workq,
thereby ensuring that if there are any pending frames they are
submitted prior to the abort cmd.

CRs-Fixed: 2588575
Change-Id: I5034ca500cf39dfa0e553c49917fedb8bd084b0b
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2019-12-20 13:45:11 -08:00
Pavan Kumar Chilamkurthi 421e8ed8d4 msm: camera: smmu: Use iommu best match algo for camera
Use best fit match algo for smmu map instead of first match
algo to avoid fragmentation in smmu virtual space.

CRs-Fixed: 2580128
Change-Id: I434e6e4396bc713e6e12e3da7ae4b78cc2da6a42
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
2019-12-19 16:38:09 -08:00
Pavan Kumar Chilamkurthi 38692ba946 msm: camera: smmu: Add support for non-contiguous mermory region
Add support to discard a memory region inside the full  dma map
virtual address space region.

CRs-Fixed: 2580128
Change-Id: I76cc778f2437a01a4efabec836ce92c47d983d61
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
2019-12-19 16:37:32 -08:00
Pavan Kumar Chilamkurthi 350b15ad83 msm: camera: memmgr: Add support to disable DelayedUnmap
Add interface to umd to give an option whether to
disable Delayed Unamp feature for a given buffer
mapping. DelayedUnmap is enabled by default if
umd doesn't explicitly asks for disable.

CRs-Fixed: 2580128
Change-Id: I66f87a9dbdfc4d9cecdc02eb24c1c670c9985cae
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
2019-12-19 15:22:16 -08:00
Chandan Kumar Jha 1cd4d0ec4f msm: camera: cpas: Add cpas support for camera v170_200 platform
Add register information. Initial QoS settings info to program
camera static settings for chipsets having camera v170_200.
Also change the logic to get the camera and cpas versions.
Added the map table corresponding to camera and cpas versions.
For any new CPAS version support, just need to add the entries to
the map. This removes the complexity of if-else cases while
fetching the cpas hw information.

CRs-Fixed: 2571273
Change-Id: I7d54b8bc038aa90ecb39f5048e7809ac10c4476f
Signed-off-by: Gaurav Jindal <gjindal@codeeaurora.org>
Signed-off-by: Chandan Kumar Jha <cjha@codeaurora.org>
2019-12-19 13:16:21 +05:30
Karthik Anantha Ram 322ade5951 msm: camera: icp: Increase the wait time for abort ACK
This change attempts to retry waiting atleast 1 time for
a duration of 1 second for the abort ACK from FW. Also
adds some debug messages during flush and removes mutex
usage during page fault dump.

CRs-Fixed: 2588575
Change-Id: I2f273baa3d56ab2dc0368d882470360a3702c53c
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2019-12-18 18:27:21 -08:00
Suraj Dongre c7011c037e msm: camera: jpeg: Increase number of jpeg contexts
Fixed out of memory issue in triple camera usecase by increasing
number of logical jpeg contexts.

CRs-Fixed: 2587592
Change-Id: I25c99c0be8d3986bc11fbc2894a0dbf27c645d4e
Signed-off-by: Suraj Dongre <sdongre@codeaurora.org>
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2019-12-17 15:33:22 -08:00
Alok Pandey 1411dd923f msm: camera: cpas: Reorder sequence of cleanup in cpas probe failure
if cpas probe fails during initialization of soc resources
soc data is being accessed after freeing the memory.
This change handling the sequence on failure.

CRs-Fixed: 2585085
Change-Id: Ia89b02bce9cfb6512b33f8e7366a552635317ccd
Signed-off-by: Alok Pandey <akumarpa@codeaurora.org>
2019-12-16 20:06:07 -08:00
Jong-Guk Im a96f2432e4 Merge "msm: camera: sensor: Add null check for read buffer" into camera-kernel.lnx.1.0 2019-12-16 16:53:37 -08:00
Gaurav Jindal 928edd9316 msm: camera: jpeg: Add mutex lock to protect jpeg list corruption
Due to race conditions, situation can arise where the process_irq
and flush for jpeg are being handled in parallel. This will cause
the jpeg list corruption.
This commit protects the code of adding back to free list
in process_irq with the mutex.

CRs-Fixed: 2578247
Change-Id: I28ee48bc0d5cfcf3ae4a936b2eb2976226ad88d5
Signed-off-by: Gaurav Jindal <gjindal@codeaurora.org>
2019-12-16 08:37:10 -08:00
Shravan Nevatia d59ca83371 msm: camera: sensor: Add null check for read buffer
Add proper null checks for function arguments,
including read buffer, before dereferencing them.

CRs-Fixed: 2581538
Change-Id: I8c49bbc419e2ac5579341c7dc789da0ed1c4d123
Signed-off-by: Shravan Nevatia <snevatia@codeaurora.org>
2019-12-13 21:25:55 +05:30
Jeyaprakash Soundrapandian 911c715233 Merge "msm: camera: reqmgr: reset the slot on buf_done" into camera-kernel.lnx.1.0 2019-12-12 12:06:06 -08:00
Jeyaprakash Soundrapandian a6a0cd901c Merge "msm: camera: isp: Change master slave combination for dual IFE" into camera-kernel.lnx.1.0 2019-12-12 12:03:11 -08:00
Gaurav Jindal 287da8d3c8 msm: camera: isp: Change master slave combination for dual IFE
For some targets, there is a requirement to have the lower IFE
as master. Current implementation selects the higher IFE as
the master.
This commit changes the acquire logic to reserve the lower IFE
first and then the higher IFE as slave. This logic is for dual
ife use cases. For single IFE use case, acquire logic is not
changed.
Also, removes the hard coded check for master hw index
during the irq  handling. Stores the master hw index
in ife hardware manager context and check against it.

Change-Id: Ifd3a28e80a0a4d16e3d9278b7ed61290c620ec79
CRs-Fixed: 2571273
Signed-off-by: Gaurav Jindal <gjindal@codeaurora.org>
2019-12-11 18:43:24 +05:30
Tejas Prajapati 7c74d4e031 msm: camera: reqmgr: reset the slot on buf_done
Reset the slot with the valid request on receiving
the buf_done which is reported on next EPOCH.
In case of back to back irqs slot is marked as skip idx
it will apply the request and try to reset a slot based
on MAX_PD + 1 calculation which might have the request
for which we have got a bubble. To make sure this does not
happen, reset a slot only on the buf_done for valid request.

If STOP ioctl is called from UMD for ISP, it will flush all
the lists. But this is not notified to CRM which might have
a stale entry of the half applied request, so on STOP ioctl
clear all the slots.

In case of SAT mode if one of the link has generated bubble,
while the sync_link has the sync_request slot reset sync_link
will not let the link recover of the bubble. To make sure the
recovery sync_mode is set to 0 for two consecutive slots of
the link.

CRs-Fixed: 2551701
Change-Id: If4b6f8a4a831ffddcef2cae6292d066778c18b04
Signed-off-by: Tejas Prajapati <tpraja@codeaurora.org>
2019-12-10 10:02:07 +05:30
Shravan Nevatia 3de84e066b msm: camera: csiphy: Update common sequence for csiphy v1.2
Add a high-to-low transition in the CTRL0 register
during the common power-up sequence.

CRs-Fixed: 2580437
Change-Id: I66541d3d787fa2f161e5d8e647fb11c8075a1947
Signed-off-by: Shravan Nevatia <snevatia@codeaurora.org>
2019-12-05 13:00:27 +05:30
Gaurav Jindal a838b9ec21 msm: camera: req_mgr: Link state check before process trigger workq
Due to scheduling delays, process trigger workq can be delayed.
In the meantime, link state can be reset to IDLE. This can cause
abnormal behaviour resulting in stability issues. Also, at the
time of apply  fail for flash, failed_dev is not updated.
This causes crash while notifying the error on link.
This commit prevents the execution of workq process trigger if
the link has been reset to IDLE state.
Also, failed_dev is updated if the apply for flash fails.

CRs-Fixed: 2572511
Change-Id: Iaea1e0a7a24afc9e408a1530a5875f6b6c41a45b
Signed-off-by: Gaurav Jindal <gjindal@codeaurora.org>
2019-12-02 08:58:27 -08:00
Vikram Sharma b9dd84cc47 msm: camera: isp: prioritize RUP over EPOCH in bottom half
When epoch comes along with RUP we report bubble as per current state
machine. This was because in camif_bottom_half handler we are handling
EPOCH before RUP. This change prioritize RUP over EPOCH  and EOF over
SOF to handle race.

CRs-Fixed: 2567120
Change-Id: I236bcc44b609f8ef7f963f19d33d46a3d95ba0d2
Signed-off-by: Vikram Sharma <vikramsa@codeaurora.org>
2019-11-29 18:13:18 +05:30
Sureshnaidu Laveti 50e83233ad msm: camera: sensor: Support for read operation
Supporting read operation for sensor and
sub modules OIS and actuator.

CRs-Fixed: 2538801
Change-Id: I83ad154dd577d5a664c4d68792a90489e725fbfd
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
Signed-off-by: Sureshnaidu Laveti <lsuresh@codeaurora.org>
2019-11-20 14:53:14 -08:00
Karthik Jayakumar dd1ac7b717 msm: camera: req_mgr: Fix kmem_cache definition
Add fixes to cam_req_mgr to include kmem_cache struct
definitions.

CRs-Fixed: 2554484
Change-Id: I368aa32e085431eff1976dfc09929e730d63b405
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2019-11-20 14:50:23 -08:00
Karthik Anantha Ram a27592f01b msm: camera: custom: Add support for acquire_hw_v1
Split the acquire in custom node to acquire device and
acquire hw to be in line with IFE for multicamera usecases.

CRs-Fixed: 2524308
Change-Id: I7be7d5227dcd304d095d7e3d7fac32800fecc199
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2019-11-20 14:49:25 -08:00
Trishansh Bhardwaj 5f530223ba msm: camera: core: Prevent crash on kref_put
kref_put causes crash if refcount is zero.
This change prevents crash by checking if refcount value.

CRs-Fixed: 2553290
Change-Id: Ie9a950b289cdb2b8fca8c5d025be540d926eadbd
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
2019-11-20 14:46:28 -08:00
Tejas Prajapati 809c56ef16 msm: camera: isp: csid hw register reset with IRQ
CSID hw register reset is done with the the help of
IRQ to make sure it is reset every time before we start
a new session.

CRs-Fixed: 2563958
Change-Id: I33c870003eb1e99d458b7650b5b3218f61cccd3b
Signed-off-by: Tejas Prajapati <tpraja@codeaurora.org>
2019-11-20 14:41:53 -08:00
Pavan Kumar Chilamkurthi 2c2fea11c5 msm: camera: isp: Reset overflow pending flag in start hw
While start hw, either a fresh start or resume after flush,
reset the overflow pending flag as we reset the hw and start
fresh with applying init packet. In case where overflow happening
at the same time as halt immediately, we set overflow pending
flag to true. Eventhough while halt immediate and resume
scenario, we reset the hw, not resetting overflow pending flag
causes not to apply any new packets while resume.

CRs-Fixed: 2565049
Change-Id: Ia9c871402343306945fe1b8f8373659e52630fe2
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
2019-11-19 17:54:38 -08:00
Trishansh Bhardwaj 09c9b6c054 msm: camera: icp: Increase MAX_PKT_SIZE_MSGQ for ICP
Increase ICP_HFI_MAX_PKT_SIZE_MSGQ_IN_WORDS to improve workqueue
delay tolerance.

CRs-Fixed: 2564981
Change-Id: Ic61e79588a834e651e7b2f5e44acd3fcbc9d8f77
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
2019-11-19 17:53:27 -08:00
Tejas Prajapati a3b0bbaa8c msm: camera: icp: icp debug improvement
ON receiving HFI_EVENT_SYS_ERROR event_id as part
of sys_error msg and event_data1 is set to
HFI_ERR_SYS_FATAL, trigger the crash.

CRs-Fixed: 2549369
Change-Id: Iddf56f46b2c07a703a787b0dedebd801081c93d6
Signed-off-by: Tejas Prajapati <tpraja@codeaurora.org>
2019-11-19 17:52:21 -08:00
Trishansh Bhardwaj 1f409d4bca msm: camera: reqmgr: Improve master slave sync
If link is not ready on master epoch, but it becomes ready on slave
epoch, then master skips apply and slave applies request and goes ahead
of master.
Fix this by skipping apply on slave if master slot in not in applied
state.

CRs-Fixed: 2562008
Change-Id: Ic612eedfeedf2a6ea50737a49a6f1f31a5de1dc2
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
2019-11-16 18:02:04 +05:30
Camera Software Integration f697ab3bb5 Merge "msm: camera: isp: Notify CRM to pause SOF timer after flush" into camera-kernel.lnx.1.0 2019-11-15 05:46:08 -08:00
Camera Software Integration df8adb4c3c Merge "msm: camera: csiphy: Fix csiphy v1.2 skew calibration settings" into camera-kernel.lnx.1.0 2019-11-15 05:45:50 -08:00
Camera Software Integration d85e275feb Merge "msm: camera: isp: Set device enable flag after enable csid hardware" into camera-kernel.lnx.1.0 2019-11-15 05:44:35 -08:00
Chandan Kumar Jha fc8ddd752d msm: camera: isp: Notify CRM to pause SOF timer after flush
Adding CRM interface to stop SOF timer from isp during flush.
During flush hardware is getting stop and will not send SOF
notification to CRM so need to pause SOF timer. Whenever SOF
timer will get expire,do not need to send error to UMD during
pause time.

CRs-Fixed: 2564389
Change-Id: I6d85f2c658c30dbe211f0ec9d83bca323a5c265b
Signed-off-by: Chandan Kumar Jha <cjha@codeaurora.org>
2019-11-14 08:06:56 -08:00
Shravan Nevatia 313a84b808 msm: camera: csiphy: Fix csiphy v1.2 skew calibration settings
Correct the skew calibration register settings
in the DPHY sequence for csiphy v1.2.

CRs-Fixed: 2563037
Change-Id: Idd97600b66dd00ff67db902dbd9d649aa005b4ec
Signed-off-by: Shravan Nevatia <snevatia@codeaurora.org>
2019-11-14 03:39:07 -08:00
Camera Software Integration f123cac5fc Merge "msm: camera: csiphy: Update reset sequence for csiphy v1.2" into camera-kernel.lnx.1.0 2019-11-13 05:45:32 -08:00
Camera Software Integration 09d233978c Merge "msm: camera: csiphy: Update registers for CSIPHY v1.2" into camera-kernel.lnx.1.0 2019-11-13 05:45:23 -08:00
Camera Software Integration 4d054a6539 Merge "msm: camera: reqmgr: Change v4l2 notify error log type" into camera-kernel.lnx.1.0 2019-11-13 05:44:43 -08:00
Camera Software Integration f45e3dda5c Merge "msm: camera: utils: Remove deprecated clk_set_flag functions" into camera-kernel.lnx.1.0 2019-11-12 05:43:33 -08:00