Commit Graph

826 Commits

Author SHA1 Message Date
Camera Software Integration
03c35dd086 Merge "msm: camera: core: Handle event failure reason propagation" into camera-kernel.lnx.4.0 2020-08-20 15:03:00 -07:00
Camera Software Integration
af5a6819f3 Merge "msm: camera: sync: Add SYNC_V4L_EVENT_V2 support in sync driver" into camera-kernel.lnx.4.0 2020-08-20 15:02:51 -07:00
Camera Software Integration
e955d3dc2e Merge "msm: camera: cpas: read and pass fuse information to user space" into camera-kernel.lnx.4.0 2020-08-20 15:02:40 -07:00
Jigarkumar Zala
7ed86436a3 msm: camera: sensor: Add logic to call the res_mgr api if needed
Currently any slave can call pinctrl api for res_mgr which may
lead in corruption of pinctrl state. This change identify whether
slave is resposible for the shared pinctrl access by searching/matching
the gpio defined under res_mgr dtsi. Also remove post_init pinctrl as
this functionality is not used anymore. This can help to avoid the
unnecessary calls to the res_mgr which can avoid mutex operations to
imporve the performance.

CRs-Fixed: 2758167
Change-Id: Id0e863ae00eeef6c3877f02d34878c131695a604
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2020-08-20 09:54:10 -07:00
Alok Chauhan
23fc6a670c msm: camera: common: Define debugflag to allocate usecase info
Define debug flag to allocate usecase info for debug purpose.
This flag can be used to get usecase buffer index at issue
time.

CRs-Fixed: 2707314
Change-Id: Iffacdb48f77ec6907b8070d4c19eb1c56be30f14
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
2020-08-20 14:57:32 +05:30
Karthik Anantha Ram
018cb6845f msm: camera: smmu: Remove extra shared mem map
Cleans up extra mapping used to get the scatter list entries.

CRs-Fixed: 2702021
Change-Id: I787159169e3b3d1259e41e51c0534bd68bcbb326
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2020-08-20 02:14:42 -07:00
Pavan Kumar Chilamkurthi
dc5342fbf3 msm: camera: cpas: Update QoS settings for custom usecase
Update QoS settings for devices with custom hw.

CRs-Fixed: 2755917
Change-Id: Idb62f79a7a9b82d63a253343979c93dc98845501
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
2020-08-20 00:46:53 -07:00
Ravikishore Pampana
b746c4f527 msm: camera: core: Send event on smmu page fault
Currently when page fault happen, iommu driver callers camera
handler with CB details and iova address which caused the page
fault. With iommu iova address cam smmu driver finds the
closest mapping address for that cb and call the
corresponding driver to find the which port caused page fault.
This has limitation has page fault address always not mapped.
New approach is get the page fault ids from iommu 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: 2750690
Change-Id: I87c809b3229992c7c95655a4f3c6c70ebc035ae8
Signed-off-by: Ravikishore Pampana <rpampana@codeaurora.org>
2020-08-19 14:16:38 +05:30
Vikram Sharma
55944b0201 msm: camera: cpas: read and pass fuse information to user space
This change extract the fuse info from DTSI and reads the fuse
value then communicate the same to user space using query_cpas_v2
ioctl.

CRs-Fixed: 2749665
Change-Id: Ie161dc58a7eab3e7b74a5c406ab696af0e7b546e
Signed-off-by: Vikram Sharma <vikramsa@codeaurora.org>
2020-08-17 09:50:13 +05:30
Trishansh Bhardwaj
7264d367c3 msm: camera: tfe: Adds support PHY3 input source
Adds support for CSID input source PHY3.

CRs-Fixed: 2756383
Change-Id: I988ffc353518b5d932fa95eedeef8607726e183f
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
2020-08-16 17:59:14 +05:30
Alok Chauhan
acb34abbad msm: camera: core: Handle event failure reason propagation
Handle event failure reason propagation in camera kernel
driver. Individual camera kernel driver will fill reason
codes for sync failure and send it to sync driver. Sync
driver will add this as part of sync event header and
propagate to user space.

CRs-Fixed: 2750553
Change-Id: I284390fc45757ba8291a44400e2263b9be64b092
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
2020-08-16 11:15:21 +05:30
Alok Chauhan
1d1edb7030 msm: camera: sync: Add SYNC_V4L_EVENT_V2 support in sync driver
Add SYNC_V4L_EVENT_V2 support in sync driver. As part of this
change, added the reason code field as part of sync event header.
This failure reason code is filled by camera kernel driver and
propagate to userspace.

CRs-Fixed: 2750553
Change-Id: I206d0d51c38cfe4214814b89d241f51c1f50605b
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
2020-08-16 11:14:20 +05:30
Trishansh Bhardwaj
3da4eff78a msm: camera: tfe: Fix NULL ptr dereference
Fixes NULL ptr deref caused by incorrectly passing res_id in place
of res_type.

CRs-Fixed: 2755471
Change-Id: I55ccb6a5fec6e61f79ed0b2cd9fc0cdc62f65b0e
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
2020-08-15 11:45:39 +05:30
Tony Lijo Jose
a677b40a4a msm: camera: csiphy: Protect phy lanes for holi target
Holi target uses 8 bit per phy register format for secure camera
usecases. This change takes care of the secure phy bit mask formation
specific to holi target.

CRs-Fixed: 2757195
Change-Id: Ibe33b7619b484fd6e64d958ce01cba8fb0e72d3b
Signed-off-by: Tony Lijo Jose <tjose@codeaurora.org>
2020-08-14 17:01:07 +05:30
Haritha Chintalapati
f64d8b76f2 Merge "msm: camera: tfe: confine hw errata for bengal" into camera-kernel.lnx.4.0 2020-08-13 14:15:00 -07:00
Karthik Anantha Ram
dc64ec28dd msm: camera: isp: Fix boot ts when custom is enabled
When custom is enabled, we can generate boot time independent
of qtimer update from CSID.

CRs-Fixed: 2753196
Change-Id: I39255ddcc419d9a89981e57e8d3a9f466c62e7e6
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2020-08-12 09:52:10 -07:00
Karthik Anantha Ram
24c71ea45d msm: camera: isp: Fix frame header alignment issue
Update frame header iova correctly so that it's 16 byte aligned.

CRs-Fixed: 2751309
Change-Id: I4af0eb5f12bcd92ba40077d9d62a9e308fa06f8d
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2020-08-12 09:31:29 -07:00
Haritha Chintalapati
06a9ad0ba4 Merge "msm: camera: ife: Get consumed address info during hw_mgr init" into camera-kernel.lnx.4.0 2020-08-11 19:04:00 -07:00
Trishansh Bhardwaj
329870a013 msm: camera: tfe: confine hw errata for bengal
Confine bengal specific HW errata

CRs-Fixed: 2752895
Change-Id: I896b1f2e16adf917085e7056f08e87b212485dbb
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
2020-08-11 23:52:07 +05:30
Camera Software Integration
a97830c5c3 Merge "msm: camera: csiphy: Add Skew calibration in DPHY Programming Sequence" into camera-kernel.lnx.4.0 2020-08-10 14:07:49 -07:00
Camera Software Integration
419c6369e6 Merge "msm: camera: csiphy: Add mipi flags to phy config" into camera-kernel.lnx.4.0 2020-08-10 14:07:17 -07:00
Camera Software Integration
6b2acb4c1f Merge "msm: camera: common: Avoid uninitialized accesses" into camera-kernel.lnx.4.0 2020-08-10 14:07:09 -07:00
Camera Software Integration
147f76cdb2 Merge "msm: camera: isp: Reset CSID sw register before reset clock domain" into camera-kernel.lnx.4.0 2020-08-10 14:07:02 -07:00
Depeng Shao
494ace8da7 msm: camera: ife: Get consumed address info during hw_mgr init
This change checks whether the context supports last consumed
address during hw_mgr init.

CRs-Fixed: 2749254
Change-Id: I238893eb2d661014a2a51758bcf71c3e4d00f2d5
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2020-08-08 12:35:35 +08:00
Camera Software Integration
2395072fee Merge "msm: camera: utils: Add CAM_IO_ACCESS log category" into camera-kernel.lnx.4.0 2020-08-07 14:51:10 -07:00
Camera Software Integration
797221b9f9 Merge "msm: camera: sensor: OIS lens position data infrastructure" into camera-kernel.lnx.4.0 2020-08-07 14:50:51 -07:00
Jigar Agrawal
ea7b6b2312 msm: camera: csiphy: Add Skew calibration in DPHY Programming Sequence
Update register pragramming sequence to account for signal skew calibration
for DPHY single and combo mode for per lane data rates higher than 1.5 Gbps
for CSIPHY1.2.3 and CSIPHY 2.1.0. Also, move settle time register update in
data specific table, as settle time is pre calculated based on datarate and
need to configure accordingly.

CRs-fixed: 2697576
Change-Id: I428d8d14887aa54ff22d727f80ee4a395be76baf
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2020-08-06 15:35:16 -07:00
Shravan Nevatia
a58f2a9d27 msm: camera: csiphy: Add mipi flags to phy config
-Add mipi flags mask to phy cmd buffer.
-Enable skew calibration settings only if the
corresponding flag is set.

CRs-fixed: 2697576
Change-Id: I0353e57daf49ce15d7573b57dbaa9363dbc59635
Signed-off-by: Shravan Nevatia <snevatia@codeaurora.org>
2020-08-06 14:09:06 -07:00
Fernando Pacheco
0d784286a9 msm: camera: common: Avoid uninitialized accesses
Improve the error-handling code paths to prevent accesses to
uninitialized variables. This is done by either picking a sane
default for the variable or skipping accesses altogether after
an unsuccessful attempt to initialize.

CRs-Fixed: 2748220
Change-Id: Ibe383e56ec4e3f45f76f619c7d6b62c3d7dfcadb
Signed-off-by: Fernando Pacheco <fpacheco@codeaurora.org>
2020-08-06 13:41:05 -07:00
Camera Software Integration
19ebf24ab1 Merge "msm: camera: icp: Increase request queue depth for ICP contexts" into camera-kernel.lnx.4.0 2020-08-06 12:28:02 -07:00
Depeng Shao
00b8521d2a msm: camera: isp: Reset CSID sw register before reset clock domain
Reset CSID SW register firstly to cut off potential input source
before reset the HW logic, then HW logic won't get junk data.

CRs-Fixed: 2731158
Change-Id: I9c8e1f3776229bf96c0c712de8c083b1334702ef
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2020-08-06 15:55:04 +08:00
Mukund Madhusudan Atre
397fcc6f55 msm: camera: utils: Add CAM_IO_ACCESS log category
Currently, CAM_UTIL debug logs when enabled, flood the logcat
with io read/write access logs, which are not necessary when
debugging clocks, interrupts and other parameters. Add separate
entry for IO access in debug util.

CRs-Fixed: 2743063
Change-Id: Id13393211bcc6fdc620aaffe8f8ab27a6b7c6986
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2020-08-05 15:20:17 -07:00
Camera Software Integration
e3c7dd3683 Merge "msm: camera: cpas: Correct QoS setting for holi" into camera-kernel.lnx.4.0 2020-08-05 14:22:51 -07:00
Fernando Pacheco
8d1b53b022 msm: camera: icp: Increase request queue depth for ICP contexts
Some usecases need more than the original max depth of 20 for ICP
contexts. Accommodate these usecases by increasing the max request
depth only for ICP.

CRs-Fixed: 2739277
Change-Id: Ibeda16aa439b49815cbefc3a76580092351c3572
Signed-off-by: Fernando Pacheco <fpacheco@codeaurora.org>
2020-08-04 09:55:07 -07:00
Trishansh Bhardwaj
812fe415ad msm: camera: cpas: Correct QoS setting for holi
Correct PRIORITYLUT_LOW for holi tfe.

CRs-Fixed: 2747287
Change-Id: I5799f56ac93891b00578d63f64c23a0e4a2f69da
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
2020-08-04 15:06:56 +05:30
Depeng Shao
86f144a267 msm: camera: isp: Handling IRQ delays
Checking the BUS write client last consumed
address, if it matches with next request port
io buffer address, then irq delay detected.
We can signal port fence for both active request.

CRs-Fixed: 2684890
Change-Id: I8265c06a2284897d43e9a24511ad2c13c9690186
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2020-08-04 12:00:00 +08:00
Camera Software Integration
c5f4a2def3 Merge "msm: camera: common: Improve IFE and CSIPhy logging" into camera-kernel.lnx.4.0 2020-07-31 15:34:56 -07:00
Sureshnaidu Laveti
893a5afdbf msm: camera: sensor: OIS lens position data infrastructure
Add support to read OIS lens position data and
current Qtimer value.
Add support to write qtimer time stamp to OIS FW.

CRs-Fixed: 2721489
Change-Id: I7a4f4d342ff41c72db892ea706d0cfd6d667d96d
Signed-off-by: Sureshnaidu Laveti <lsuresh@codeaurora.org>
2020-07-31 14:55:36 -07:00
Depeng Shao
7ccae419d3 msm: camera: isp: Update ife substate before apply setting
Offline mode may receive the SOF and REG_UPD irq event
earlier than CMD processing return back, then the event
will be dropped. This change updates ife substate to
APPLIED state before apply setting and move the req
to wait list.

CRs-Fixed: 2736862
Change-Id: I052c618ef64aae0e30232609a209a0dc43b53f8c
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2020-07-30 19:24:37 -07:00
Camera Software Integration
1af3ec8d9d Merge "msm: camera: common: Add support of PHY TPG deinitialization" into camera-kernel.lnx.4.0 2020-07-29 12:51:57 -07:00
Jigar Agrawal
17f1383e33 msm: camera: common: Improve IFE and CSIPhy logging
Remove unnecessary logs from ife start, stop
and release routines. Add secure mode to CSIPHY logging.

CRs-Fixed: 2709537
Change-Id: Ib58d008cff5fef3d75f19c88aab76a85b5dc2e89
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
Signed-off-by: Jeyaprakash Soundrapandian <jsoundra@codeaurora.org>
2020-07-28 16:52:17 -07:00
Camera Software Integration
12fbb55700 Merge "msm: camera: ope: Fix unsequenced clang warning" into camera-kernel.lnx.4.0 2020-07-28 16:13:04 -07:00
Camera Software Integration
9ef363c051 Merge "msm: camera: sensor: unregister subdev if cpas registration fails" into camera-kernel.lnx.4.0 2020-07-28 16:12:55 -07:00
Camera Software Integration
ed39aa54a0 Merge "msm: camera: isp: Remove bubble re-apply recovery mechanism" into camera-kernel.lnx.4.0 2020-07-28 16:12:42 -07:00
Haritha Chintalapati
73b9674d4d Merge "msm: camera: sensor: Only handle the valid request" into camera-kernel.lnx.4.0 2020-07-27 13:39:23 -07:00
Haritha Chintalapati
cbfca9ab29 Merge "msm: camera: csiphy: add 1.2.5 version phy for holi camera as per hpg" into camera-kernel.lnx.4.0 2020-07-27 13:39:15 -07:00
Haritha Chintalapati
f91e158abf Merge "msm: camera: req_mgr: Support for 3 links in CRM" into camera-kernel.lnx.4.0 2020-07-27 13:39:06 -07:00
Haritha Chintalapati
fdc5107b5e Merge "msm: camera: sensor: Add error handling when adding request" into camera-kernel.lnx.4.0 2020-07-27 13:38:56 -07:00
Haritha Chintalapati
1eb162cc8f Merge "msm: camera: tfe: Enable TFE and OPE for bengal" into camera-kernel.lnx.4.0 2020-07-27 13:38:20 -07:00
Haritha Chintalapati
79f9e08a6b Merge "msm: camera: csiphy: Fill interrupt size variable" into camera-kernel.lnx.4.0 2020-07-27 13:38:09 -07:00