Commit Graph

958 Commits

Author SHA1 Message Date
Pavan Kumar Chilamkurthi
89fc8fcc81 msm: camera: cpas: Write qosgen registers when enabled
Call qosgen register update to write values into corresponding
registers.

CRs-Fixed: 2789495
Change-Id: I43eb6bc9d4cce42b78d55b4519931b15b7f6a383
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
2020-10-01 00:50:18 -07:00
Wyes Karny
c37f48cfc5 msm: camera: cpas: Add fuse MP limit support
If MP limit fuse feature is enabled in DTSI then
read the fuse register to get information about maximum
allowed resolution. According to that restrict CSID acquire.
Also if only DTSI based max_width is enabled then restrict acquire
with maximum allowed width.

CRs-Fixed: 2785460
Depends-on: 3349044
Change-Id: If861289aebe2921183276780a086dfa1b1d5f372
Signed-off-by: Wyes Karny <wkarny@codeaurora.org>
2020-09-30 23:27:34 -07:00
Jigar Agrawal
6588824f34 msm: camera: csiphy: Update the csiphy programming sequence
Update the csiphy 1.2.3 programming sequence.

CRs-Fixed: 2787142
Change-Id: Ie859440acb49528fd414df32c66680db93878ad6
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2020-09-30 20:49:36 -07:00
Camera Software Integration
6f7608c0a2 Merge "msm: camera: cci: Add CCI Global reset during CCI HW init" into camera-kernel.lnx.4.0 2020-09-30 14:04:21 -07:00
Camera Software Integration
2362ce706a Merge "msm: camera: cpas: Setting the vote level on max supported clock lvl basis" into camera-kernel.lnx.4.0 2020-09-30 14:04:13 -07:00
Camera Software Integration
13db5d3394 Merge "msm: camera: isp: Write zero to clear register after global clear command" into camera-kernel.lnx.4.0 2020-09-30 14:04:05 -07:00
Vikram Sharma
345ff8c633 msm: camera: ope: Handle race while dumping ope req list
While dumping OPE req list we were not protecting it in context mutex,
this can result into unexpected behaviors. This change take care of
protecting the dump logic using mutex.

CRs-Fixed: 2750458
Change-Id: I916822b498cde3922274c18a06b98c898bff1d65
Signed-off-by: Vikram Sharma <vikramsa@codeaurora.org>
2020-09-29 22:21:52 -07:00
Camera Software Integration
6357d070e9 Merge "msm: camera: sensor: Add pinctrl specific handling in res_mgr" into camera-kernel.lnx.4.0 2020-09-29 13:06:18 -07:00
Camera Software Integration
2a7b0a0cbf Merge "msm: camera: icp: Fix potential deadlock scenario in cam_hfi_init" into camera-kernel.lnx.4.0 2020-09-28 13:19:14 -07:00
Mukund Madhusudan Atre
afa957e59e msm: camera: isp: Write zero to clear register after global clear command
Clear registers hold the programmed values unless explicitly set to zero.
This can cause problems in cases where a global clear is issued which
encompasses the registers for which clear mask was set in a different
instance of IRQ controller. We should not wait for the next IRQ to clear
the undesired bits in clear register. This change makes sure that the
actions of a particular IRQ controller do not affect the other. Write
zeros explicitly to clear registers corresponding to status registers
after global clear is issued in IRQ handler.

CRs-Fixed: 2775499
Change-Id: Ic57302e5862d9453a94c4e8f470215dacb8978ec
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2020-09-28 12:02:07 -07:00
Anil Kumar Kanakanti
9943af257a msm: camera: cci: Add CCI Global reset during CCI HW init
During first CCI HW initialization, CCI HW global reset has to be called.

CRs-Fixed: 2782553
Change-Id: Ifc02f512859932636c79b0bfed1f60e7c0626cee
Signed-off-by: Anil Kumar Kanakanti <akanakan@codeaurora.org>
2020-09-28 09:57:48 -07:00
Depeng Shao
6cd4af283f msm: camera: reqmgr: Reset the number of sync links
This change resets the number of sync links in
case unsync link fails due to any reason, which
will result in device crash, since the number of
sync links can be increased to an invalid value,
then we will get an invalid link.

CRs-Fixed: 2786144
Change-Id: I61bbac9849ce80c319de40ffae411f61c8deeaa9
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2020-09-28 16:23:31 +08:00
Camera Software Integration
6f7f5948e9 Merge "msm: camera: ife: Remove epd reset operation from csid global reset" into camera-kernel.lnx.4.0 2020-09-25 16:53:12 -07:00
Camera Software Integration
e27a2769e6 Merge "msm: camera: tfe: Add support last consumed address for tfe" into camera-kernel.lnx.4.0 2020-09-25 16:53:01 -07:00
Camera Software Integration
10729c8cf2 Merge "msm: camera: tfe: Handle sof monotonic boot time stamp" into camera-kernel.lnx.4.0 2020-09-25 16:52:51 -07:00
Camera Software Integration
b0c2af8c24 Merge "msm: camera: tfe: Add pid and mid support for tfe" into camera-kernel.lnx.4.0 2020-09-25 16:52:41 -07:00
Camera Software Integration
8931b80e26 Merge "Revert "msm: camera: cci: Add CCI Global reset during CCI HW init"" into camera-kernel.lnx.4.0 2020-09-24 15:32:04 -07:00
Camera Software Integration
b3256e70dd Merge "msm: camera: isp: Fix some stability issues" into camera-kernel.lnx.4.0 2020-09-24 15:30:49 -07:00
Camera Software Integration
f2740208af Merge "msm: camera: csid: Add support for unmapped vc dt detection in csid" into camera-kernel.lnx.4.0 2020-09-24 15:30:38 -07:00
Anil Kumar Kanakanti
58dd362057 Revert "msm: camera: cci: Add CCI Global reset during CCI HW init"
This reverts commit 9703cf925e.

CRs-Fixed: 2784358
Change-Id: I1f192623104683e3f82c004f6d96a84d155e2455
Signed-off-by: Anil Kumar Kanakanti <akanakan@codeaurora.org>
2020-09-25 00:50:59 +05:30
Jigarkumar Zala
1f5f70bfab msm: camera: ife: Remove epd reset operation from csid global reset
EPD support is configured as a part of config blob. Currently global
reset is invoked after CSID is configured and as a part of that
epd support attributre gets reset. This cause CPHY_EOT_RECEPTION
error from CSID. This change removes reset part of epd supported
attribute to continue with the expected opertion set during
configuration of CSID. Also, set this attribute to zero by default
at probe time to make sure epd is not supported.

CRs-Fixed: 2775508
Change-Id: I0f49f952d2156d92eb0fb1813951a325b63e60b0
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2020-09-24 10:57:38 -07:00
Chandan Kumar Jha
c2ef7b6bfb msm: camera: isp: Add Phy source for CPHY TPG
Add Phy selection logic if PHY TPG is enabled. Add phy resource 
in case of external TPG.

CRs-Fixed: 2787956
Change-Id: Ib9d827dc411965d8dd849de53932c62c9b4a4a02
Signed-off-by: Chandan Kumar Jha <cjha@codeaurora.org>
2020-09-24 19:37:52 +05:30
Ravikishore Pampana
02f65e4927 msm: camera: tfe: Add support last consumed address for tfe
Tfe hardware support the last consumed buf address.
Request port buf done verified with last consumed buffer
Address. Buf done irq delays can be handled through
last consumed address verification.

CRs-Fixed: 2784348
Change-Id: I4d629da44cf6f1b7755c7785eac11f72384c78c7
Signed-off-by: Ravikishore Pampana <rpampana@codeaurora.org>
2020-09-24 12:51:01 +05:30
Camera Software Integration
73c03a7992 Merge "msm: camera: ope: Increase max bl limit" into camera-kernel.lnx.4.0 2020-09-23 17:15:57 -07:00
Camera Software Integration
1a18173476 Merge "msm: camera: cci: Add CCI Global reset during CCI HW init" into camera-kernel.lnx.4.0 2020-09-23 17:15:47 -07:00
Fernando Pacheco
033864b04f msm: camera: icp: Fix potential deadlock scenario in cam_hfi_init
Make sure we perform the necessary unlock operations before we return
on an invalid HFI state.

CRs-Fixed: 2783934
Change-Id: I7c611fb98d245952f2f4e9a57dc5fcb249572a40
Signed-off-by: Fernando Pacheco <fpacheco@codeaurora.org>
2020-09-23 14:10:33 -07:00
Jigar Agrawal
25522a65e0 msm: camera: csid: Add support for unmapped vc dt detection in csid
Add a debugfs support for unmapped vc dt detction. Subscribe to
Unmapped vc dt detction in csid. Turn on debugfs with command
adb shell "echo 512 >> sys/kernel/debug/camera_ife/ife_csid_debug".

CRs-Fixed: 2709537
Change-Id: Ica2030f5914bfe86811f4f3c4501fa06dd310751
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2020-09-23 12:19:14 -07:00
Depeng Shao
0f9ba5f0cc msm: camera: isp: Fix some stability issues
This change updates the order of error notification, in case
the UMD already receive the error notification and power down
the isp, then the following register dump may meet problem.
This change also add lock protection for csid cmd processing,
in case the csid has released before processing the cmd.

CRs-Fixed: 2783264
Change-Id: I7399d819d1cdadb96b6824cdb4b53aa0167e527b
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2020-09-23 04:34:11 -07:00
Ravikishore Pampana
27db3b226b msm: camera: tfe: Add pid and mid support for tfe
Process tfe page faults based on the pid and mid values.
When page fault happen kernel api gives the pid and mid value,
From pid and mid values TFE hw and tfe port that caused the
Page fault can be find. Added support for this in the tfe driver.
Based on the Pid and Mid values, get the HW id and port ids,
go through all context which has this hw id and port id and log
the data. Once context id is identified, log the acquire data and
last consumed client address details. Dump the hw register data
in the given buffer. Send the smmu page fault event through
v4l2 queue to user.

CRs-Fixed: 2775154
Change-Id: Iafaa7d1283ea0b836c223ed1fe6c419b0ac50c15
Signed-off-by: Ravikishore Pampana <rpampana@codeaurora.org>
2020-09-23 14:34:44 +05:30
Camera Software Integration
a2fdf71aeb Merge "msm: camera: sync: Fix imports for types" into camera-kernel.lnx.4.0 2020-09-22 14:32:28 -07:00
Camera Software Integration
0219f6206e Merge "msm: camera: isp: Max requests per context reduction in isp driver" into camera-kernel.lnx.4.0 2020-09-22 14:32:20 -07:00
Camera Software Integration
73452f0906 Merge "msm: camera: tfe: Change csid stop sequence during flush" into camera-kernel.lnx.4.0 2020-09-22 14:32:09 -07:00
Jigarkumar Zala
5a37a310f7 msm: camera: sensor: Add pinctrl specific handling in res_mgr
Currently pinctrl is handled together regardless of pinctrl
is requested for the active/suspend state. This change adds
the per pinctrl handling when pinctrl gpio is shared among
multiple slaves. Also remove mclk specific logic as this
change will handle it at gpio/pinctrl level.

CRs-Fixed: 2758167
Change-Id: I4fa028d3eee80e056a74324a420c08967cbf6c5f
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2020-09-22 09:10:12 -07:00
Anil Kumar Kanakanti
9703cf925e msm: camera: cci: Add CCI Global reset during CCI HW init
During first CCI HW initialization, CCI HW global reset has to be called.
Removed is_initialized removed, as it can be controlled through
master_active_slave ref count to verify there is any active slave or not.

CRs-Fixed: 2782553
Change-Id: Id845bfc936b976e160231ed3a0acbc951c32ad7f
Signed-off-by: Anil Kumar Kanakanti <akanakan@codeaurora.org>
2020-09-22 19:15:06 +05:30
Haritha Chintalapati
09b1fe7b55 Merge changes I2680a98d,I9af73cc2 into camera-kernel.lnx.4.0
* changes:
  msm: camera: icp: Rename debugfs entries to be proc hw agnostic
  msm: camera: icp: Generalize proc references within hw manager
2020-09-21 17:36:15 -07:00
Shravya Samala
8b38e86abd msm: camera: isp: Max requests per context reduction in isp driver
Reduced maximum no of requests per context from 20 to 8
in isp driver.

CRs-Fixed: 2720238
Change-Id: If557b190fe94af72cc6fb28f36c3e1f6189218a5
Signed-off-by: Shravya Samala <shravyas@codeaurora.org>
2020-09-21 07:12:45 -07:00
Karthik Jayakumar
8f95314e74 msm: camera: sync: Fix imports for types
Fix the order of imports for to resolve cam_sync
typedef for kernel CFI.

CRs-Fixed: 2772200
Change-Id: I4e5e642e6b45412904585aaa68c0ef77fedeee2d
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2020-09-18 16:11:21 -07:00
Camera Software Integration
64f7c57dce Merge "msm: camera: common: Handle epoch if bubble recovery is disabled" into camera-kernel.lnx.4.0 2020-09-18 13:51:27 -07:00
Camera Software Integration
70e9d7d0b4 Merge "msm: camera: reqmgr: Add protection for workqueue congestion" into camera-kernel.lnx.4.0 2020-09-18 13:51:21 -07:00
Camera Software Integration
6c1c6d8a00 Merge "msm: camera: csiphy: Remove unused flags" into camera-kernel.lnx.4.0 2020-09-18 13:51:15 -07:00
Rishabh Jain
b457f5fae5 msm: camera: ope: Increase max bl limit
Increase max bl limit for OPE to 24 to support maximum
48 stripes.

CRs-Fixed: 2761455
Change-Id: I961be1344fac0084649df321225e94a50d4e5a98
Signed-off-by: Rishabh Jain <risjai@codeaurora.org>
2020-09-17 21:18:40 -07:00
Camera Software Integration
733005152b Merge "msm: camera: icp: Support processor-specific HFI register offsets" into camera-kernel.lnx.4.0 2020-09-17 14:31:51 -07:00
Camera Software Integration
6b144e04c6 Merge "msm: camera: cci: Enable compilation for cci dump code" into camera-kernel.lnx.4.0 2020-09-17 14:31:40 -07:00
Ravikishore Pampana
1beadb140b msm: camera: tfe: Handle sof monotonic boot time stamp
Modify the sof monotonic boot timestamp logic. Boot time
stamp difference between two frames should not change,
it should be same as qtime csid time stamp difference.
So modified logic to give proper boot time stamp with no
difference in the successive frames, the difference of sof
time stamp taken from qtime stamp value.
Delayed IRQ handling can lead to torn read of timestamp
register (LSB from nth frame and MSB from n+1th frame).
This change tries to detect torn read cases and corrects
timestamp close to the actual value.

CRs-Fixed: 2688271
Change-Id: I1dc75629887cfcf971d51a7dae6ea28624d272f1
Signed-off-by: Ravikishore Pampana <rpampana@codeaurora.org>
2020-09-17 13:01:29 +05:30
Jigar Agrawal
79b1170176 msm: camera: csiphy: Remove unused flags
Remove following unused CCI and CPHY flags.

CRs-Fixed: 2709537
Change-Id: I7a936733da75c71877ae52cfae9ddd358775c305
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2020-09-16 18:51:47 -07:00
Haritha Chintalapati
c0064beebc Merge "msm: camera: ope: remove the check for dev_type" into camera-kernel.lnx.4.0 2020-09-16 15:23:52 -07:00
Ayush Kumar
64910dc3d6 msm: camera: tfe: Change csid stop sequence during flush
This change takes care of a race which we see when we halt master
csid immediately and slave csid halt to follow. In some scenarios
after master csid halt, slave gives violation errors.
With this change we are first changing the mode of slave to master
then issue halt commands to both master and slave.

CRs-Fixed: 2773668
Change-Id: Iab7baa41a69b2e4e0a658c7abac29d2dcb80c289
Signed-off-by: Ayush Kumar <ayushkr@codeaurora.org>
2020-09-16 11:40:25 +05:30
Depeng Shao
8e99e13a5a msm: camera: reqmgr: Add protection for workqueue congestion
When workqueue is congested, CRM may apply same
request to device which will trigger recovery
due to apply fails. This change prevent CRM
triggering recovery if the time interval of
continuous applying req less than 5ms.

CRs-Fixed: 2775372
Change-Id: I45c2ed76334b1bbf4547bbf21f90cf0a6c169323
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2020-09-16 10:06:16 +08:00
Fernando Pacheco
f1d47bfd71 msm: camera: icp: Rename debugfs entries to be proc hw agnostic
Drop references to A5 within the debugfs entries so that they
may be reused with other processors.

CRs-Fixed: 2722486
Change-Id: I2680a98dd3d38906e616712da3d6e2835ebb9a85
Signed-off-by: Fernando Pacheco <fpacheco@codeaurora.org>
2020-09-15 16:36:30 -07:00
Fernando Pacheco
1bd8f23dd5 msm: camera: icp: Generalize proc references within hw manager
The A5 references sprinkled throughout the hw manager will no
longer make sesne within the context of two possible processors.
We will instead prefer the more generic "icp" term to reference
the processor in use e.g. icp_dev instead of a5_dev.

Note that some references to A5 remain and will be cleaned up
when LX7 is introduced.

CRs-Fixed: 2722486
Change-Id: I9af73cc2af27a2aed2f4d7baaead89a20442e9ed
Signed-off-by: Fernando Pacheco <fpacheco@codeaurora.org>
2020-09-15 16:36:30 -07:00