Commit Graph

1446 Commits

Author SHA1 Message Date
Mukund Madhusudan Atre
fa19532b36 msm: camera: common: Add appropriate camera initialization log
Currently, the camera initialization log only points to the
camera initcalls execution. The camera driver is initailized when
all components are bound succussfully in CRM master bind. Add
appropriate log to convey correct info.

CRs-Fixed: 2841729
Change-Id: I5a52ad9fdf84d79d66763d47c92d2a63bb8d0e21
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2021-03-05 10:35:04 -08:00
Shravya Samala
9d37c961f3 msm: camera: isp: Fix type mismatch arguments in indirect function calls
To avoid CFI failures, fix type mismatch arguments in
callback functions.

CRs-Fixed: 2836088
Change-Id: Ib1d79ca3f4489081c909aeb9ead2e66ef20aed64
Signed-off-by: Shravya Samala <shravyas@codeaurora.org>
2021-03-05 18:40:49 +05:30
Anand Ravi
2440e8c0c9 msm: camera: isp: IFE Lite top debug registers print functionality
This change extends the VFE top debug print functionality including
printing the module descriptions upon violation for IFE lite.

CRs-Fixed: 2846451
Change-Id: I6ba390892abd398ed48ac71a0910e227a787e09b
Signed-off-by: Anand Ravi <ananravi@codeaurora.org>
2021-03-04 10:39:54 -08:00
Wyes Karny
1e3a1316ed msm: camera: isp: Reset num_deferred_acks when re-applying bubble req
When re-applying bubble request after 2 frames reset num_deferred_acks
also.

CRs-Fixed: 2824276
Change-Id: I57e7ac89da69a2d65546c6f9a7f1d3c9f2c7e58f
Signed-off-by: Wyes Karny <wkarny@codeaurora.org>
2021-03-03 20:37:54 -08:00
Jigar Agrawal
b621d13226 msm: camera: reqmgr: Add support to increase the crm handles
Add support to increase the number of available handles
in CRM to 256.

CRs-Fixed: 2811740
Change-Id: I16d05e85302f273ccb2b22ec882c07f9b515694d
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-03-03 18:18:42 -08:00
Haritha Chintalapati
ea8a7f5347 Merge "msm: camera: common: Program scratch buffers for sHDR" into camera-kernel.lnx.5.0 2021-03-02 18:52:32 -08:00
Haritha Chintalapati
62590f374a Merge "msm: camera: isp: Extend reg dump support for Waipio" into camera-kernel.lnx.5.0 2021-03-02 18:52:24 -08:00
Haritha Chintalapati
280c7b643c Merge "msm: camera: uapi: Add register base support for CSID/SFE" into camera-kernel.lnx.5.0 2021-03-02 18:52:09 -08:00
Wyes Karny
547fd9371d msm: camera: uapi: Add support for new OPE ports
Add support for new ports for OPE in ICP.
New ports: FD, STATS_IHIST for IPE.

CRs-Fixed: 2887030
Change-Id: I41669f27f08a352088b0ed4ed29f2ed443fd02a4
Signed-off-by: Wyes Karny <wkarny@codeaurora.org>
2021-03-02 04:18:08 -08:00
Wyes Karny
c4d1380c55 msm: camera: common: Support compilation for new code base
Support compilation for new code base.
Add new mk file.

CRs-Fixed: 2887030
Change-Id: I4ac920f44aa6913c09045e0ae84ed3558a2b4832
Signed-off-by: Wyes Karny <wkarny@codeaurora.org>
2021-03-02 03:29:34 -08:00
Gaurav Jindal
bc400e47fa msm: camera: common: Add common wait and poll interface
In current implementation, each driver call wait_for_completion_timeout
and readl_poll_timeout with own timeout values.
In case of slow environments like presil, lot of hacks are needed to
change the timeouts for each driver. It needs multiple code changes
and compilations, thus consuming time.
This commit implements a common interface to call
wait_for_completion_timeout and readl_poll_timeout.
Debug variable is also introduced to
change the timeout value. This will help to change the timeout
without compilations and changes at multiple places.

Change-Id: Iba51e0805a49ed325147a12688c2fe6619bb68e6
CRs-Fixed: 2830502
Signed-off-by: Gaurav Jindal <gjindal@codeaurora.org>
2021-03-02 14:17:09 +05:30
Karthik Anantha Ram
66fa513e7b msm: camera: common: Program scratch buffers for sHDR
In case of sHDR to have a continuous flow of frames,
program scratch buffer even if there are no pending
requests to apply.

CRs-Fixed: 2841729
Change-Id: I8015a3a184751b2a772db55c35b02de380f04491
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2021-03-01 16:38:48 -08:00
Haritha Chintalapati
1e788374af Merge "msm: camera: isp: Add support to dump reserved TPGv3 VC DT" into camera-kernel.lnx.5.0 2021-03-01 15:57:04 -08:00
Haritha Chintalapati
371697220f Merge "msm: camera: isp: Change TPGv3 acquire implementation" into camera-kernel.lnx.5.0 2021-03-01 15:56:39 -08:00
Haritha Chintalapati
8740356c94 Merge "msm: camera: csiphy: Update the csiphy logging" into camera-kernel.lnx.5.0 2021-03-01 15:56:08 -08:00
Haritha Chintalapati
6d805cbaa1 Merge "msm: camera: isp: Move Bus IRQ subscribe to start" into camera-kernel.lnx.5.0 2021-03-01 15:55:49 -08:00
Haritha Chintalapati
7d89f3c290 Merge "msm: camera: sensor: Fix the return code" into camera-kernel.lnx.5.0 2021-03-01 15:55:13 -08:00
Haritha Chintalapati
8159e65fec Merge "msm: camera: csiphy: Update the csiphy programming sequence" into camera-kernel.lnx.5.0 2021-03-01 15:54:49 -08:00
Haritha Chintalapati
02f3157f7c Merge "msm: camera: common: Improve the CSID logging" into camera-kernel.lnx.5.0 2021-03-01 15:54:24 -08:00
Jigar Agrawal
39807aabc9 msm: camera: isp: Add support to dump reserved TPGv3 VC DT
Implement a debugfs for TPG version3 to dump the reserved
VC DT information.

CRs-Fixed: 2823940
Change-Id: I370308a71b6726fcd51615bb745f3556772675ee
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-02-26 18:57:42 -08:00
Jigar Agrawal
af624ce693 msm: camera: isp: Change TPGv3 acquire implementation
Fix the TPG version 3 reserve function to utilize all the 16
unique VC and DT combination support. Add functionality to be
 able to reserve TPG version 3 multiple times for future
multi camera usecase.

CRs-Fixed: 2823940
Change-Id: Ib5cadc5398c78f110a8a768932d65de3bd849309
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-02-26 18:57:37 -08:00
Karthik Anantha Ram
9c1e43f595 msm: camera: isp: Extend reg dump support for Waipio
Along with IFE extend reg dump support for CSID & SFE as well.

CRs-Fixed: 2841729
Change-Id: I6bf36bbefdcc7173b5edaf538264ee2c8ad3c18e
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2021-02-26 17:00:14 -08:00
Karthik Anantha Ram
c19081ce1c msm: camera: uapi: Add register base support for CSID/SFE
Add new register base types to extend reg dump infrastructure
for Waipio.

CRs-Fixed: 2841729
Change-Id: I78888537721dd3e67a38b7196acf04309d1de957
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2021-02-26 15:53:40 -08:00
Haritha Chintalapati
025842520f Merge "msm: camera: isp: Fixing KW errors" into camera-kernel.lnx.5.0 2021-02-26 15:51:45 -08:00
Mukund Madhusudan Atre
d38f4e07d1 msm: camera: isp: Move Bus IRQ subscribe to start
Currently, bus IRQs are subscribed before start, which
will result in IRQ mask to be reset when CSID global
SWI reset is present on certain targets. Move the IRQ
subscribe/unsubscribe calls to start/stop in vfe bus to
help retain the mask value.

CRs-Fixed: 2841729
Change-Id: I7c10fda9c82bb5f1601d3fd67cabda0a5abc275b
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2021-02-26 14:18:02 -08:00
Jigar Agrawal
645fb9745f msm: camera: sensor: Fix the return code
Fix the return code in sensor power up
function for failure case.

CRs-Fixed: 2887698
Change-Id: Ib4df3230d83d02fcd239d872a5bcfa2994d519a3
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-02-26 11:42:47 -08:00
Haritha Chintalapati
3198ac75e2 Merge "msm: camera: reqmgr: Pause the timer before sensor stream on" into camera-kernel.lnx.5.0 2021-02-25 17:16:49 -08:00
Haritha Chintalapati
b5ea977913 Merge "msm: camera: ope: Add support to dynamic switch pix_pattern" into camera-kernel.lnx.5.0 2021-02-25 17:16:40 -08:00
Jigar Agrawal
3987094106 msm: camera: common: Improve the CSID logging
Improve CSID irq logging for better debugging.
Move Packet header errors to fatal error mask,
and MMAPPED as a non-fatal error.

CRs-Fixed: 2808577
Change-Id: If2caa4b891aeb4d56102e92ce084a550bc4c7b1d
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-02-25 14:51:06 -08:00
Jigarkumar Zala
3763d3856c msm: camera: csiphy: Update the csiphy programming sequence
Update the 3phase bring up sequence for csiphy2.1.0. Also
add support for the irq status dump.

CRs-Fixed: 2835738
Change-Id: Id2e59ebb902f7cdc843cdfaf23c5b717807cf78b
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2021-02-25 11:18:27 -08:00
Vikram Sharma
57bff5aede msm: camera: ope: Handle OPE smmu fault with pid info
Kernel apis provide information fault caused pid and mid data.
Handle the OPE smmu fault using pid and mid data. Based on the
mid data, dump only corresponding port info which caused the
fault. Pid and mid values are target dependent, these values
will be updated on the ope node dt entries.

CRs-Fixed: 2857868
Change-Id: I909f1787e71e67e5ed1d3464dfeb506418d151e4
Signed-off-by: Vikram Sharma <vikramsa@codeaurora.org>
2021-02-24 23:40:40 -08:00
Vikram Sharma
2a948f7cc0 msm: camera: isp: Add new packer format to support LSB alignment
Add new packer format to support LSB alignment for plain16_10
packer format.

CRs-Fixed: 2825675
Change-Id: I401241dc14dc67d3b363d3d39b37aabe716e167c
Signed-off-by: Vikram Sharma <vikramsa@codeaurora.org>
2021-02-24 23:34:33 -08:00
Alok Chauhan
eb8a5f569c msm: camera: cdm: corrected submit bl logic
CDM driver check for available bl fifo slots before
submitting to HW. If no free slots available then
it wait for CDM HW to process all the BLs and return
available slots.

CDM driver was incorrectly calculating the available bl
slots and causing bl fifo overflow.

Corrected the sequence in wait for bl fifo logic.

CRs-Fixed: 2837583
Change-Id: I2861f8c66822e0739f0546eaf153d8e2af0caefe
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
2021-02-24 23:32:17 -08:00
Alok Chauhan
4461467cc3 msm: camera: cpas: Add mechanism to check camnoc idle status
Qchannel interface is used to ensure camnoc is idle. This needs
to be check before camera core power collapse and after camera core
power on sequence to make sure camera hw blocks are in proper state.

CRs-Fixed: 2847646
Change-Id: If9dbd980c2e8e983ac973f91e3d1ed132719c395
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
2021-02-24 23:31:56 -08:00
Alok Chauhan
4d4afb2793 msm: camera: isp: increase number of hw entries
increase number of hw entries to allocate sufficient memory
for cdm bl commands.

CRs-Fixed: 2837487
Change-Id: Id890ab07cc66ef704a1317d545540f36dfc7f3c2
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
2021-02-24 22:38:05 -08:00
Tejas Prajapati
f2e4175ff2 msm: camera: reqmgr: check validity of last_applied_idx
last_applied_idx is updated on every successful applied
request and the buf_done. After buf_done last_applied_idx
is set to -1. While accessing last applied req the same
index is used, if the last_applied_idx is -1 accessing
last applied request will result in slab out of bound
error, so check last_applied_idx before accessing
last applied request.

CRs-Fixed: 2840329
Change-Id: I8f49b9df097859cde20e651149167db7316976bb
Signed-off-by: Tejas Prajapati <tpraja@codeaurora.org>
2021-02-24 22:37:59 -08:00
Savita Patted
37e33fb211 Merge "msm: camera: isp: Get hint for FS mode from UMD" into camera-kernel.lnx.5.0 2021-02-24 18:57:13 -08:00
Savita Patted
9e7dad7c68 Merge "msm: camera: isp: Fix type mismatch arguments in indirect function calls" into camera-kernel.lnx.5.0 2021-02-24 18:56:50 -08:00
Shravya Samala
8ff1231363 msm: camera: tfe: Change debug fs directory name
Change debug fs directory name from IFE to TFE

CRs-Fixed: 2837303
Change-Id: I1871ad37338bc2d2aa001b6c81f92e2215a010b8
Signed-off-by: Shravya Samala <shravyas@codeaurora.org>
2021-02-24 11:00:13 -08:00
Jigar Agrawal
b2dcdb6fa1 msm: camera: csiphy: Update the csiphy logging
Update the csiphy logging for better debugging purpose.

CRs-Fixed: 2839060
Change-Id: I8af110ae895ee09cdf9404d0e6d6165188a6db55
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-02-24 10:58:58 -08:00
Alok Chauhan
1a1bce2765 msm: camera: cdm: Added cdm power state check
There is chance that handle error info get scheduled
after cdm deinit. As clock and regulator gets disabled
as part of deinit so this can cause issue for cdm hw
interaction as part of handle error.

Added cdm power state check before dumping CDM HW
status at the time of error.

CRs-Fixed: 2833653
Change-Id: I4bf01ce3900196909cf66ffdb24607c50ab03295
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
2021-02-24 10:58:10 -08:00
Karthik Anantha Ram
ecc37dabea msm: camera: icp: Update a5 qos values post reset
Update a5 R/W priorities post a5 reset.

CRs-Fixed: 2834780
Change-Id: I81736f780c70a648b81f4cd05db7caa0bdcc5195
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2021-02-24 10:57:52 -08:00
Chandan Kumar Jha
a12577028b msm: camera: isp: Fixing KW errors
Fixes KW errors for ISP.

CRs-Fixed: 2880899
Change-Id: I6926b61732991b51edd7e173bb05d2a7da96405f
Signed-off-by: Chandan Kumar Jha <cjha@codeaurora.org>
2021-02-24 19:16:16 +05:30
Haritha Chintalapati
34bc468a4f Merge "msm: camera: common: Improve the CSID logging" into camera-kernel.lnx.5.0 2021-02-23 14:58:34 -08:00
Depeng Shao
4591949a37 msm: camera: reqmgr: Pause the timer before sensor stream on
Sometimes, the cpu load is very high, then the devcies
stream on will be delayed, but the CRM watchdog is already
enabled before streaming on, then we will have a chance to
notify SOF freeze issue.
This change pauses the CRM watchdog timer before streaming
on sensor and after stopping ife, when we can detect the
stream on and stream off delay, but don't notify error,
also can detect the real SOF freeze issue.

CRs-Fixed: 2804587
Change-Id: Iccaee837930ea22290b109eff45b05300d844312
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2021-02-23 11:01:43 -08:00
Rishabh Jain
01249ea8d9 msm: camera: ope: Add support to dynamic switch pix_pattern
Add support to dynamically switch pix_pattern of read clients
based on data received in each request.

CRs-Fixed: 2811530
Change-Id: Icb3ebd33cae59b8db87bc0011d6560492ad29c3a
Signed-off-by: Rishabh Jain <risjai@codeaurora.org>
2021-02-23 10:58:45 -08:00
Haritha Chintalapati
641fd73444 Merge "msm: camera: smmu: Update iommu_fault_handler return codes" into camera-kernel.lnx.5.0 2021-02-22 14:24:35 -08:00
Haritha Chintalapati
6a2595de76 Merge "msm: camera: isp: Fixing KW errors" into camera-kernel.lnx.5.0 2021-02-22 14:24:16 -08:00
Haritha Chintalapati
7f8d05ddb7 Merge "msm: camera: isp: Enhance SFE debug capability" into camera-kernel.lnx.5.0 2021-02-22 14:24:00 -08:00
Chandan Kumar Jha
166ccd4af8 msm: camera: isp: Fix type mismatch arguments in indirect function calls
Fix type mismatch arguments in callback functions.

CRs-Fixed: 2878736
Change-Id: I5f88d870d1927db71dae2b1773ba185ea4c6838c
Signed-off-by: Chandan Kumar Jha <cjha@codeaurora.org>
2021-02-22 15:50:17 +05:30