Commit graph

124 commits

Author SHA1 Message Date
Jong-Guk Im
1500c7dad5 Merge "msm: camera: sensor: Update the flash init structure" into camera-kernel.lnx.1.0 2019-09-21 22:49:45 -07:00
Suresh Vankadara
68c8d11eba msm: camera: config: Add support for BENGAL target
Add camera config support for BENGAL target.

CRs-Fixed: 2531589
Change-Id: Ie0afa4acdcdcde2286a56f802b4f8246e711503f
Signed-off-by: Suresh Vankadara <svankada@codeaurora.org>
2019-09-21 22:49:26 -07:00
Trishansh Bhardwaj
921bdca4b0 msm: camera: isp: Skip reapply of DMI config on bubble recovery
Updating same DMI bank, which is consumed by HW, can result in
violations so during bubble recvery skip  updating DMI config.

CRs-Fixed: 2511286
Change-Id: I1af2dbf2f1b49afcd4276d3f5759e5ba6d8da637
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
2019-09-21 22:48:29 -07:00
Jigarkumar Zala
3aac10c09f msm: camera: sensor: Update the flash init structure
Currently there is mismatch of the cmd type byte position for the
flash init structure, which casue the cmd type parsing failure
for early PCR. This change move to cmd type to sixth byte to
support the unificaiton with other flash uapi structures. Also,
update respective header change with respect to uapi change.

CRs-Fixed: 2432102
Change-Id: Ic4899b483b35013c5ad77a8894eb3bb4831de811
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2019-09-21 22:16:15 -07:00
Mukund Madhusudan Atre
70c486722f msm: camera: common: Fix cpas register for custom hw
The client handle is obtained by providing client identifier
to cpas. Add identifier in custom hw registration for cpas
to recognize client. Also, improve identifier string
validation in cpas register client.

CRs-Fixed: 2528679
Change-Id: I924f5c98a8affa26753710fa542c1bb651d0af13
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2019-09-19 13:30:09 -07:00
Shravan Nevatia
36765c90e8 msm: camera: csiphy: Update combo-mode dphy registers for csiphy 1.2
Update register settings for combo-mode dphy
to fix UNBOUNDED_FRAME csid error observed on
combo-mode sensor.

CRs-Fixed: 2521347
Change-Id: I363ad48fc534aa95cc810bf03a0e4704aff6d07b
Signed-off-by: Shravan Nevatia <snevatia@codeaurora.org>
2019-09-19 13:28:28 -07:00
Venkat Chinta
184ed6286f msm: camera: ife: Add support for RDI crop in dual IFE
This change adds support for RDI crop in dual IFE usecases. The
crop window for RDI is obtained by combining left and right IFE
crop windows and width is calculated based on the crop window.
If crop or drop is needed on RDI, decode format should not be
programmed as payload only in order to enable RPP subpath.

CRs-Fixed: 2513939
Change-Id: Iaaf64784372ef918802a684b33e16845fd7d2b3b
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
2019-09-18 13:38:29 -07:00
Prakasha Nayak
2d76f42380 msm: camera: isp: Fix page fault dump for first request
In case of page fault for first request, page fault
information is not dumped since we are not initializing
member variable in case of init request.

CRs-Fixed: 2498880
Change-Id: Ie9ecda7434028e396392f3ac905ae80ae6ad6376
Signed-off-by: Prakasha Nayak <pnayak@codeaurora.org>
2019-09-17 16:19:27 -07:00
Karthik Anantha Ram
b8e35c3397 msm: camera: common: Update AHB vote for camera drivers
As part of cpas start, all drivers will now request for
LOW_SVS as opposed to SVS. The drivers also scale the AHB
vote based on the corresponding HW's src clk voltage.

CRs-Fixed: 2507919
Change-Id: I7fd35e9dd298deb1603812f39d50e4e9390b3aac
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2019-09-16 15:11:42 -07:00
Abhilash Kumar
3ef8ba0db6 msm: camera: common: Add validation check for cpu buffers before accessing
Add validation check before accessing the packets and configs from
the buffers.

CRs-Fixed: 2360223, 2416463
Change-Id: I9a09bc7064fd7e7914f91576542181c301db926d
Signed-off-by: Abhilash Kumar <krabhi@codeaurora.org>
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2019-09-12 13:45:06 -07:00
Mukund Madhusudan Atre
4329af66bd msm: camera: isp: Add per request reg dump to command buffer
For debugging, user space may request a specified register range
values to be dumped to a command buffer every request. Add
support for reg dump every request during cdm callback. Add debugfs
flag for making sure per request dump is not enabled by mistake.

CRs-Fixed: 2501003
Change-Id: I01a0f3bb00dd122b8037d513ec331c5c08fdf372
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2019-09-10 13:56:35 -07:00
Mukund Madhusudan Atre
e4be9ecbfe msm: camera: utils: Add command buffer validation for reg dump
The command buffer obtained from user has several offsets and
sizes that need to be validated before accessing data. Also,
out buffer offsets need to be checked before writing data.
Add validation checks for parameters in command buffer for
reg dump.

CRs-Fixed: 2501003
Change-Id: I65b37befcefbd7f739663b6142d5d0eedcab25b4
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2019-09-10 13:55:39 -07:00
Trishansh Bhardwaj
f648ceeca6 msm: camera: req_mgr: Increase v4l2 queue length
EIS have 6 fences per request and uses 15 frame window. On camera close
it signals ~90 fences at once. This can overflow v4l2 event queue.

Increase v4l2 queue length for sync events to prevent overflow.

CRs-Fixed: 2498880
Change-Id: Ie886318168e326c1525b4f8be5cacc5f70d0c477
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
2019-09-09 18:36:39 -07:00
Shravan Nevatia
9653879d63 msm: camera: csiphy: Update dphy 2-phase registers for lito
Update register settings for 2-phase and 2-phase combo mode dphy
as per hpg.

CRs-Fixed: 2505587
Change-Id: I348c1ee3b5618e1439ab87cc33f366eda89f0f82
Signed-off-by: Shravan Nevatia <snevatia@codeaurora.org>
2019-09-06 13:41:23 -07:00
Shravan Nevatia
6d4c852953 msm: camera: csiphy: Update cphy 3-phase registers for lito
Update register settings for 3-phase cphy operation as per hpg.

CRs-Fixed: 2505587
Change-Id: Ib9392f8055f7b74044edb9634d705b9c92b0ec0d
Signed-off-by: Shravan Nevatia <snevatia@codeaurora.org>
2019-09-06 13:39:49 -07:00
Pavan Kumar Chilamkurthi
c51b7ee477 msm: camera: isp: Clear only the IRQ bits that are being handled
Do not clear the irq bits that are not handled by the bus irq
controller. Clearing all bits by buf_done irq controller may
clear RUP bit without handling, resulting missing RUP.

CRs-Fixed: 2519423
Change-Id: I65c5efeafbda8f5face50e8c17078269daa37767
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
2019-09-04 13:55:08 -07:00
Depeng Shao
99709eacd2 msm: camera: isp: Reset rdi only context flag
Reset rdi only context flag during releasing device,
otherwise it will affect non-rdi context at next time.

CRs-Fixed: 2519406
Change-Id: I904f0cae664a7530b2b85342c9a6daba579cbccc
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2019-09-04 13:54:50 -07:00
Venkat Chinta
19d814458b msm: camera: isp: Send notification to userspace
ISP driver must notify the userspace when any hardware error occurs
so that the userspace knows when to use the register dump.

CRs-Fixed: 2513939
Change-Id: I0d9ba9a22c6f2494ba3cc837513b8989c6cc1119
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
2019-09-03 13:48:30 -07:00
Venkat Chinta
e8bc3c7cbc msm: camera: ife: Add event count in error log
This change adds event count in the error log that is printed
when difference between the counts for the two full IFEs is
greater than one in dual IFE mode.

CRs-Fixed: 2513939
Change-Id: I4346406f36eae72e55f07bdb185a7f85566a4f37
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
2019-09-03 13:47:47 -07:00
Karthik Anantha Ram
72eeacf17a msm: camera: common: Change log type to WARN
When a request setting could not be applied by any device
on the link, it does not indicate a fatal error. It only
leads to a frame drop. Changing the apply failure logs to
warn as opposed to error.

CRs-Fixed: 2514752
Change-Id: Idbca2dbb06b0bbb4c380264cf31b665188306396
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2019-09-03 13:47:12 -07:00
Venkat Chinta
6678f1003b msm: camera: ife: Use correct enum to convert resource ID to path
Currently CSID path resource enum is being used to convert
resource ID to path to notify UMD of acquired resources. This
change addresses this inaccuracy.

CRs-Fixed: 2513939
Change-Id: I8d31904dd9b8b500c3f4504142b153151cdcee71
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
2019-09-03 13:46:12 -07:00
Venkat Chinta
9556262e87 msm: camera: ife: Correct sanitary check logic
Current sanitary checks for integer overflow exhibit incorrect
behavior if number of RDI/paths paths are filled in as zero.
This change addresses that.

CRs-Fixed: 2513939
Change-Id: Ib4cf369971f2d50be0ec167ff78f46fb0d985b33
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
2019-09-03 13:43:55 -07:00
Karthik Anantha Ram
9c771385d3 msm: camera: custom: Add support for custom HW
This change provides a template to add any custom HW
block.

CRs-Fixed: 2515662
Change-Id: Ie707c27950a330658cdaa4b64b7e304f4d62a5b2
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2019-08-30 13:50:09 -07:00
Karthik Anantha Ram
02f7646413 msm: camera: custom: Add uapi for custom HW
This change adds uapi for custom HW block.

CRs-Fixed: 2515662
Change-Id: Id4284594746a313ab09dad5c290cedc2b9edb62c
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2019-08-30 13:49:50 -07:00
Karthik Anantha Ram
7642380776 msm: camera: isp: Add support for custom CSID
This change adds support for custom csid HW and
programming of user defined interfaces (UDI) in
custom csid block.

CRs-Fixed: 2515662
Change-Id: I4b226b3a3787fbc3e56eb285e9a4dbd6d62edefa
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2019-08-30 13:49:11 -07:00
Venkat Chinta
7e0fea6d1c msm: camera: ife: Add dentry to enable req dump
This change adds a dentry to enable req dump in the case of
hardware errors.

CRs-Fixed: 2513939
Change-Id: I0ae5d6c658964bf33d0e4c1775413aaa9201f7a1
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
2019-08-30 13:47:55 -07:00
Depeng Shao
598dfb05af msm: camera: isp: Correct the active req cnt assignment order
We need to reset the active req cnt before assigning
new value. Also move the log behind the active req cnt
assignment.

CRs-Fixed: 2517421
Change-Id: I38f418f79f5f1adcb8b29bc870f904cd1f925bfc
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2019-08-29 11:17:32 +08:00
Depeng Shao
95460b8f2e msm: camera: isp: Fix RDI only early PCR issue
RDI only context also need to get req from
wait_req_list afte received RUP event in early
PCR case.

CRs-Fixed: 2511798
Change-Id: If2e8da36cf83dee1c348dd0d6c6ea916061a376e
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2019-08-27 14:46:30 -07:00
Jong-Guk Im
85dac39a9e Merge "Camera: Snap for drop 08/26/2019 Mainline 148" into camera-kernel.lnx.1.0 2019-08-26 14:20:27 -07:00
Jong-Guk Im
b5fa77e991 Merge "msm: camera: isp: Dump previous acq ctx info on acq failure" into camera-kernel.lnx.1.0 2019-08-26 14:20:16 -07:00
Mukund Madhusudan Atre
f86cd9899d Camera: Snap for drop 08/26/2019 Mainline 148
Change-Id: I386b0e3158e27b975adae77146c6b6fafbf933c9
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2019-08-26 13:39:17 -07:00
Jong-Guk Im
cc15da4bad Merge "Camera: Snap for drop 08/23/2019 Mainline 147" into camera-kernel.lnx.1.0 2019-08-23 16:03:38 -07:00
Jong-Guk Im
1c31309845 Merge "msm: camera: common: Clean shutdown and page fault sequence" into camera-kernel.lnx.1.0 2019-08-23 16:03:15 -07:00
Jong-Guk Im
39c31455c3 Merge "msm: camera: icp: log cleanup and header update" into camera-kernel.lnx.1.0 2019-08-23 16:03:11 -07:00
Jong-Guk Im
3ed16425dc Merge "msm: camera: smmu: Dump ctx bank info in case of mapping failure" into camera-kernel.lnx.1.0 2019-08-23 16:03:06 -07:00
Jong-Guk Im
2b3bb5abc8 Merge "Camera: Snap for drop 08/22/2019 Mainline 146" into camera-kernel.lnx.1.0 2019-08-23 15:59:04 -07:00
Mukund Madhusudan Atre
0a5b5c4961 Camera: Snap for drop 08/23/2019 Mainline 147
Change-Id: Ieac77fd6ce6f42d10e55b7154e1fb1056f70b0f8
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2019-08-23 15:58:55 -07:00
Mukund Madhusudan Atre
dd89a305c1 Camera: Snap for drop 08/22/2019 Mainline 146
Change-Id: Ib81b69adb65dbbfc69798e06945e939a1ecf56ef
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2019-08-23 15:55:47 -07:00
Karthik Anantha Ram
03e52e70d6 msm: camera: isp: Dump previous acq ctx info on acq failure
In case acquire hw fails, dump the previously acquired
streams to infer the reason for the failure.

CRs-Fixed: 2512474
Change-Id: I3ee2b85e0843ab4a605625950dc60366c0b50713
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2019-08-23 12:50:39 -07:00
Karthik Anantha Ram
7c65c0fa21 msm: camera: common: Clean shutdown and page fault sequence
Avoid unnecessary logging during shutdown and pagefault
in camera drivers.

CRs-Fixed: 2500721
Change-Id: I2519d45da134306f906186dc25705fc1f84b1972
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2019-08-22 10:02:16 -07:00
Mukund Madhusudan Atre
b582eeddce msm: camera: isp: Add atomic flag instead of wait in handle error
Errors in isp are handled in soft irq context, putting a wait for
cdm done is not allowed. Add atomic flag for checking status of
cdm and check it before reg dump to determine the request for
which register values can be dumped in command buffer.This is
only applicable to reg dump on error.

CRs-Fixed: 2510557
Change-Id: If4bfedd1a62078392721c2ea0958da82087f5b26
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2019-08-21 13:05:48 -07:00
Karthik Anantha Ram
65a6c306f9 msm: camera: smmu: Dump ctx bank info in case of mapping failure
When mapping fails for a given context bank, dump all the existing
mappings for that context bank to understand the memory usage
for that bank.

CRs-Fixed: 2513106
Change-Id: Ia17b086dd76378da55cae509255309610820f53f
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2019-08-21 12:21:08 -07:00
Karthik Anantha Ram
6ceb84f1b7 msm: camera: icp: log cleanup and header update
This change cleans up a few logs and updates the HFI headers
in line with the current FW.

CRs-Fixed: 2513094
Change-Id: I8853ac3711ad3bf36ce59f6860082fa29dca0bf6
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2019-08-21 11:52:58 -07:00
Karthik Anantha Ram
9712baaea9 msm: camera: reqmgr: Update log for shutdown
Add warn log to indicate shutdown has occurred.
Also decrement the open req count after successfully applying
a request.

Change-Id: I1b420dff52e016f52e19c5572824e4ed6f53744b
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2019-08-16 19:03:15 -07:00
Suresh Vankadara
c4acb6a025 msm: camera: isp: schedule tasklet with priority
To handle tasklet delays in hadling ISP inetrrupts
use priority tasklet scheduling.

Change-Id: I11961f51092c3f6876d2375595d9e5004f64c656
Signed-off-by: Suresh Vankadara <svankada@codeaurora.org>
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2019-08-16 17:42:13 -07:00
Pavan Kumar Chilamkurthi
6bf14f8fd4 msm: camera: isp: Look at next request for BUF_DONE event
If the resource for which BUF_DONE event has come is already
signalled in the oldest request, this BUF_DONE could be for
the next request in the list. This can happen if the IRQ
handling for BUF_DONE is delayed and by the time it is handled
if the resources for the next request are already signalled
along with other pending resources for the oldest request,
we might handle resources which corresponds to next request
first. If we do not look into next request and thus if we
ignore these BUF_DONEs, we will never be done with the next
request.

Change-Id: I1b20aff0a68172bc8794d2c37f088ba2539d173d
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2019-08-16 17:41:58 -07:00
Pavan Kumar Chilamkurthi
d7a8426091 msm: camera: utils: Use pr_info for camera logs
Use pr_info for camera warning and error logs to avoid sending
to console (assuming info logs are disabled to console).
All camera warning and error logs are anyway tagged with
CAM_WARN and CAM_ERR, so using pr_info doesn't cause any
information loss.

Change-Id: Ib23fbad47c1dce4c45e3413d775303d681a1ff86
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2019-08-16 17:41:39 -07:00
Venkat Chinta
e8ceba2d02 msm: camera: isp: Send shutter notification
Shutter notification must be sent when moving request
to free list if it was not sent out earlier due to
missed EPOCH IRQ or delayed EPOCH IRQ handling.

Change-Id: I9b3b039827bea24814fbea34e61abfc938f6bf2d
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2019-08-16 17:41:06 -07:00
Venkat Chinta
54070a35f2 msm: camera: ife: Add new controller for RUP IRQ
Currently EPOCH IRQ handling is at a higher priority
compared to RUP IRQ as RUP is fired at bus level. If
RUP IRQ is not scheduled for handling by the time we
receive EPOCH IRQ, EPOCH IRQ will be processed first
and this will lead to missed SOF notification as the
active request list might be empty. This change sets
priority of both IRQs to the same by utilizing a new
IRQ controller that is tasked with handling RUP from
BUS. BUF_DONE is also subscribed to the same VFE top
level BUS_WR IRQ but with a lower priority. IRQs for
CAMIF Lite and RDI are subscribed to only if the ctx
is RDI only.

Change-Id: Id844ffe291e21ecfc7f7ed6fc53baf7e79dd2184
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2019-08-16 17:40:46 -07:00
Depeng Shao
3b1e74e59b msm: camera: eeprom: Release the mutex even though got error
Release the mutex even though got error.

Change-Id: Iaeec418ce7db4623cede6c922869c6f8c69ab595
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2019-08-11 02:10:03 -07:00