Commit Graph

142 Commits

Author SHA1 Message Date
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
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
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
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
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
shiwgupt
c5f8e70b0f msm: camera: cci: Enable compilation for cci dump code
CCI register dump is only enable when dump flag is defined. Remove
this flag and add control via debugfs entry. This change helps
debugfs entry to control cci device individually on the fly for
debugging rather than to rebuild.

CRs-Fixed: 2692379
Change-Id: Ic13dc903e861e7c49bf3b375a66b96bfbe5d9c70
Signed-off-by: shiwgupt <shiwgupt@codeaurora.org>
2020-09-15 12:45:10 +05:30
Camera Software Integration
2638d4f39a Merge "msm: camera: sensor: Add error logs in case of wrong ioctl" into camera-kernel.lnx.4.0 2020-09-14 12:44:39 -07:00
Jigarkumar Zala
a5485a8560 msm: camera: sensor: Add error logs in case of wrong ioctl
Add wrong IOCTL command logs across sensor submodules.

CRs-Fixed: 2759031
Change-Id: Idf63749855e60b2a5bd9db9b5d78e129629431af
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
Signed-off-by: Fernando Pacheco <fpacheco@codeaurora.org>
2020-09-08 14:33:18 -07:00
Jigarkumar Zala
5bd4d81525 msm: camera: csiphy: Remove config counter
Currently config counter is being maintained at improper places
as it is increment at configuration parser and decrease at release
dev IOCTL. There are usecase where configuration can come multiple
times without release dev IOCTL being called, in this case config
counter will be out of sync with operation. Also, config counter
is not being use anywhere in any decision making. This change removes
config counter attributes to reduce the future maintenance and better
code readabiltiy. Also, acquire count is correct check to make decision
whether all device are release or not and with that reason update
correct check in release dev IOCTL.

CRs-Fixed: 2759031
Change-Id: Id0f36bc661ef1ae8070cc8d4fc148409c13e30bc
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2020-09-01 17:15:20 -07:00
Camera Software Integration
39cf709931 Merge "msm: camera: csiphy: Add logic to program userspace settle count" into camera-kernel.lnx.4.0 2020-08-31 13:23:04 -07:00
Camera Software Integration
263c743a1a Merge "msm: camera: sensor: Correct delete request logic" into camera-kernel.lnx.4.0 2020-08-31 13:22:42 -07:00
Camera Software Integration
5d4311899a Merge "msm: camera: sensor: Correct the datatype for request id" into camera-kernel.lnx.4.0 2020-08-31 13:22:21 -07:00
Camera Software Integration
640f077f09 Merge "msm: camera: csiphy: Update secure PHY HW version checks" into camera-kernel.lnx.4.0 2020-08-28 13:07:27 -07:00
Jigarkumar Zala
3d671618a4 msm: camera: sensor: Correct the datatype for request id
Request id is having uint64 type from request manager, but sensor
driver is handling it with int64. This may cause the out of bound
access while accessing the data. This change corrects the data
type to handle data correctly.

CRs-Fixed: 2759031
Change-Id: I607ea3c123a7b050403e18f7f1bac2a23e1e585f
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2020-08-28 12:05:29 -07:00
Jigarkumar Zala
11a5797354 msm: camera: sensor: Correct delete request logic
Currently per frame array is not getting filled up with NOP packet
settings and as a part of that delete request is picking up wrong
request to get delete. This change fill the request id to the
correct per frame array index for NOP and Update packet.

CRs-Fixed: 2759031
Change-Id: I5ff96851adccc81a8a527d2a5f5b3f8763ebd80f
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2020-08-27 17:58:17 -07:00
Jigarkumar Zala
55a25c185b msm: camera: csiphy: Add logic to program userspace settle count
Currently settle count is programmed from hardware register data value
metioned in bring up sequence. It is more reliable and suitable to
program the value coming from userspace as that value is more accurate
with respect to sensor specific datarate. This change add logic to
accomplish that operation.

CRs-Fixed: 2759031
Change-Id: I87215b206632d15e2d51d6383345d2ffa16b6b9f
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2020-08-27 09:13:06 -07:00
Camera Software Integration
bf8c7d2856 Merge "msm: camera: sensor: Add logic to call the res_mgr api if needed" into camera-kernel.lnx.4.0 2020-08-24 12:46:10 -07:00
Shravan Nevatia
64cd69547a msm: camera: csiphy: Update secure PHY HW version checks
Add HW version checks for CSIPHY 1.2.3/1.2.4 in the
secure CP register bitmask logic.

CRs-Fixed: 2761303
Change-Id: Ib831b71115f46839e691f58ab3128529efb2270c
Signed-off-by: Shravan Nevatia <snevatia@codeaurora.org>
2020-08-24 17:12:45 +05:30
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
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
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
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
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
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
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
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
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
79f9e08a6b Merge "msm: camera: csiphy: Fill interrupt size variable" into camera-kernel.lnx.4.0 2020-07-27 13:38:09 -07:00
Haritha Chintalapati
72d728b79b Merge "msm: camera: cci: reset reinit completion on read" into camera-kernel.lnx.4.0 2020-07-27 13:37:54 -07:00
Tejas Prajapati
151c426683 msm: camera: sensor: unregister subdev if cpas registration fails
In case if the CPAS registration is failed before freeing the
memory of the subdev, subdev need to be unregistered so that
subdev list entry will not become NULL and other subdev can
be added.

CRs-Fixed: 2708016
Change-Id: I464c73411596fc562fc7a190ddfa130f23ee487a
Signed-off-by: Tejas Prajapati <tpraja@codeaurora.org>
2020-07-24 06:37:50 -07:00
Depeng Shao
ab936609b8 msm: camera: sensor: Only handle the valid request
CRM may give an invalid request id to sensor when the
first req isn't ready, since we don't have chance to
update prev_apply_data in CRM. This change adds a
protection in sensor side to only handle the valid
request for per frame update.

CRs-Fixed: 2738404
Change-Id: Ic43d68a69c10b7b063b40a0cef17e55e748b8b2a
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2020-07-23 23:03:34 +08:00
Tony Lijo Jose
4b9521408e msm: camera: csiphy: add 1.2.5 version phy for holi camera as per hpg
Implement PHY settings as per HPG version File name

CRs-Fixed: 2736884
Change-Id: I01949090448d9f8ff691e40ca38a800dbc15f9d5
Signed-off-by: Tony Lijo Jose <tjose@codeaurora.org>
2020-07-22 22:29:35 -07:00
Jigarkumar Zala
c1b6545f00 msm: camera: sensor: Add error handling when adding request
Currently proper error handling is not present in case of failure
in adding request to request manager. This change adding proper
result send out to UMD.

CRs-Fixed: 2738448
Change-Id: I7fb54c085ac670c197523e4d7cb416eeb414a2ed
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2020-07-22 16:46:52 -07:00
Jigarkumar Zala
92ebf5ad23 msm: camera: csiphy: Fill interrupt size variable
As a part of interrupt status dump, it needs details for number
of register to be read. This change fill the interrupt size
variable to do the correct operation.

CRs-Fixed: 2729624
Change-Id: I9ee97e5a6c495062753fbd0ed44a178908c5109b
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2020-07-21 16:38:31 -07:00
Tony Lijo Jose
a6321e50af msm: camera: cci: reset reinit completion on read
Reinit completion rd_done completion variable before each read so that
the rd_done completion variable state will be clean .

CRs-Fixed: 2736884
Change-Id: I2cd7350da8e8270c1cd9238dec0eec9f84360899
Signed-off-by: Tony Lijo Jose <tjose@codeaurora.org>
2020-07-21 21:48:22 +05:30
Tony Lijo Jose
c515d1506d msm: camera: cci: Fix invalid queue size for cci
The queue size of cci hw version 1.2.9 is 64 and 16. Due to wrong
conditional check the cci queue size is assigned wrongly for cci version
1.2.9. This change corrects the cci queue size for cci version 1.2.9.

CRs-Fixed: 2736884
Change-Id: I60508fadec89831f3b877d64631b7da6304c030d
Signed-off-by: Tony Lijo Jose <tjose@codeaurora.org>
2020-07-21 21:24:16 +05:30
Camera Software Integration
9b8cae4b7c Merge "msm: camera: sensor: Fix misleading indentation issue" into camera-kernel.lnx.4.0 2020-07-20 13:18:48 -07:00
Camera Software Integration
431878cfc8 Merge "msm: camera: csiphy: Add support for CPHY dynamic lane configuration" into camera-kernel.lnx.4.0 2020-07-17 18:26:32 -07:00
Depeng Shao
61575d2c08 msm: camera: sensor: Fix misleading indentation issue
Fix misleading indentation issue.

CRs-Fixed: 2732403
Change-Id: I1f04f0de14ef7c18d669f17842c712f340d093ed
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2020-07-16 08:41:09 +08:00
Jigarkumar Zala
af762bc692 msm: camera: csiphy: Add support for CPHY dynamic lane configuration
Add logic to dynamically lane configuration for the CPHY combo
mode, where individual sensor can configure with different datarate
by configuring the respective lanes at the time of configuration.

CRs-Fixed: 2729624
Change-Id: Ie3714f9fd5d24c6cea8824f3a9dd9dc7f6f6d976
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2020-07-15 14:38:40 -07:00
Depeng Shao
c782e8c3ab msm: camera: reqmgr: Add notify frame skip interface
This change adds support to notify frame skip when CRM
not ready to apply a normal setting. Sensor and custom
device also want to update the HW settings in some
conditions even if a frame is skipped.

CRs-Fixed: 2691642
Change-Id: Ibd2b22655d0f6b6c90663df75a0f5fad8565e918
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2020-07-14 18:45:30 +08:00
Jigar Agrawal
cd675940d7 msm: camera: csiphy: Add support for CSIPHY 2.1.0
Add support for new CSIPHY version 2.1.0. Add hw
register file for CSIPHY 2.1.0.

CRs-Fixed: 2724449
Change-Id: Id3f21b4f60e807ca6fef762f0c6da193ae78e099
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2020-07-08 17:52:41 -07:00
Camera Software Integration
e3e118457a Merge "msm: camera: csiphy: Update logic for lane enablement" into camera-kernel.lnx.4.0 2020-07-07 17:56:13 -07:00
Camera Software Integration
117275870d Merge "msm: camera: cci: Fix incorrect use of cci config ioctl" into camera-kernel.lnx.4.0 2020-07-07 17:55:49 -07:00
Camera Software Integration
772039c6d8 Merge "msm: camera: cci: Correct the condition check" into camera-kernel.lnx.4.0 2020-07-02 17:45:37 -07:00
Jigarkumar Zala
fa08068801 msm: camera: csiphy: Update logic for lane enablement
Currently lane enablement is happening as a part of lanemask
field, which is send by UMD. Lane enablement should be purely
depends on laneCnt and laneAssign attributes. Also, combo mode
sensors needs to come with combo mode flag set from the UMD.
This change updates the logic for lane enablement with respect
to laneAssign and laneCnt, and also covers all combomode selection
as per the request. This change also enables the sensors to acquire
and streamon/streamoff at anytime in session.

CRs-Fixed: 2677450
Change-Id: I4f0d3ffd7245a931c273611c9c4b7e503c038664
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2020-06-29 15:56:53 -07:00