Commit Graph

650 Commits

Author SHA1 Message Date
Camera Software Integration
52222ca8b2 Merge "msm: camera: reqmgr: skip re_apply of ISP for buf_done request" into camera-kernel.lnx.4.0 2020-03-16 16:38:41 -07:00
Camera Software Integration
d6176b658c Merge "msm: camera: icp: Remove bw vote of context in Release" into camera-kernel.lnx.4.0 2020-03-16 16:38:40 -07:00
Camera Software Integration
64c7aa1d84 Merge "msm: camera: eeprom: Correct EEPROM Read return" into camera-kernel.lnx.4.0 2020-03-16 16:38:39 -07:00
Camera Software Integration
033574a220 Merge "msm: camera: sensor: Turn off the flash while flushing" into camera-kernel.lnx.4.0 2020-03-16 16:38:39 -07:00
Camera Software Integration
27a8596cef Merge "msm: camera: ope: Clear comp events before each request" into camera-kernel.lnx.4.0 2020-03-16 16:38:38 -07:00
Camera Software Integration
b1ee2aad8f Merge "msm: camera: uapi: Add support for precise flash on duration" into camera-kernel.lnx.4.0 2020-03-13 18:08:08 -07:00
Camera Software Integration
6edfb45d0c Merge "msm: camera: reqmgr: Add support for dual trigger" into camera-kernel.lnx.4.0 2020-03-13 18:08:08 -07:00
Camera Software Integration
5859f31453 Merge "msm: camera: common: Fix types for comparison function" into camera-kernel.lnx.4.0 2020-03-13 18:08:06 -07:00
Venkat Chinta
89feb6b2ae msm: camera: ife: Remove check for intra-client mask
Intra-client mask is unused in Bus version 2.0 hardware
and can be removed.

CRs-Fixed: 2641529
Change-Id: I89b3620496995dbef8a6b09718f20a419ccf632c
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
2020-03-13 13:37:32 -07:00
Venkat Chinta
2b9a25929a msm: camera: ife: Subscribe to error IRQs only on slave core
This change adds a check for slave core in dual IFE usecases
to avoid subscribing to SOF/EOF/EPOCH IRQs. We can use IRQs
from single core to drive our state machine. Error IRQs must
still be subscribed to as earlier.

CRs-Fixed: 2639855
Change-Id: I6aa6ab5b7e1049cd12f702da560b9b4a6ba9562b
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
2020-03-13 13:27:44 -07:00
Ayush Kumar
320ae57bb9 msm: camera: core: Fix context release timing issue
When sync object is invalid and num_in_map > 1,
it will lead to context ref leak. Check sync
object first, then register sync call back.

CRs-Fixed: 2594185
Change-Id: I2d39ce3ea43bbe7bc05420b86b37fdfba4aa795a
Signed-off-by: Ayush Kumar <ayushkr@codeaurora.org>
2020-03-13 12:16:46 -07:00
Pavan Kumar Chilamkurthi
09e14ad7e8 msm: camera: fd: Fix race condition in resetting ready_to_process
Do not unlock frame_req_mutex until the request is added
into processing list after submitting the frame to hw.
This can cause a race condition where Flush comes before
adding the frame into processing list and thinks there
is no frame with HW. And there is a possibility that
FrameDone IRQ thread can get the mutex and thinks no frame
in processing list - causing never to reset the flag
ready_to_process. This will cause all subsequent camera
usage to fail as requests will never be submitted to hw.

CRs-Fixed: 2600443
Change-Id: Icd12e155192fccd9adbc7b774b073ca623f1d7ba
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
2020-03-12 13:10:51 -07:00
Pavan Kumar Chilamkurthi
f77d546937 msm: camera: cpas: Remove votes on enable_soc failure
If enabling soc resources has failed, remove the votes
that were voted for this client.

CRs-Fixed: 2585080
Change-Id: I05f460e93a1bf7b96a99dd32f3fd03dbde5b094f
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
2020-03-12 12:57:00 -07:00
Mangalaram ARCHANA
1f40c7a467 msm: camera: reqmgr: skip re_apply of ISP for buf_done request
crm applied both sensor and isp packets,sensor packet failed to
apply due to CCI timeout error. In the meantime ISP packet applied
and that request of ISP moved to free_list.In the next epoch crm
trying to reapply both the packets of sensor and isp again.In this
case ISP always reporting an apply failure because its pending queue
doesn’t have that request.To handle this we are skipping to re-apply
the ISP successful buf_done request and trying to apply only sensor
packet in this scenario.

CRs-Fixed: 2599186
Change-Id: Id7e72fc016a75782b57f05558c615b069b416ffe
Signed-off-by: Mangalaram ARCHANA <mangar@codeaurora.org>
2020-03-12 11:23:26 -07:00
Pavan Kumar Chilamkurthi
3e463c33ea msm: camera: icp: Remove bw vote of context in Release
Do not rely on timer expiry to remove bw of current context
if it is getting released. If context release is coming
before timer expiry (from last request submit), we are not
removing current context's vote from hw mgr and thus
from cpas. This will accumulate the bandwidth and causes
clocks to go to turbo and also into overflow issues if
the bw variables in cpas are wrapping around in long
hours testing.

CRs-Fixed: 2617278
Change-Id: I11d837bf7224ac4573fee32518f7f57ad9bf49f0
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
2020-03-12 11:12:35 -07:00
Shankar Ravi
624a05a102 msm: camera: eeprom: Correct EEPROM Read return
EEPROM Read using QUP I2C returns the number of bytes
read from the EEPROM, While CCI/SPI returns zero value.
Return Error only when if the value is less than zero.

CRs-Fixed: 2617882
External Impact: No
Change-Id: I9a9674366c10de4efce779f75dd36b293838c47b
Signed-off-by: Shankar Ravi <rshankar@codeaurora.org>
2020-03-12 11:10:15 -07:00
Depeng Shao
d500bda747 msm: camera: sensor: Turn off the flash while flushing
Turn off the flash while flushing if the flushed request
turns off the flash.

CRs-Fixed: 2576732
Change-Id: I546fc6b6ee79f492af905d163515eb19eed78f41
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2020-03-12 11:07:59 -07:00
Karthik Anantha Ram
b7a494a130 msm: camera: reqmgr: Add support for dual trigger
Currently CRM waits for a single trigger to apply settings
for all the devices on a given link. This change provides
provision for CRM to wait on two triggers prior to applying
a given setting.

CRs-Fixed: 2627065
Change-Id: If6e4c9281cfd1bf1a8ffa369daee060d79f3c39e
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2020-03-11 15:47:07 -07:00
Jigarkumar Zala
6eded6217d msm: camera: uapi: Add support for precise flash on duration
Precise flash needs the data for time on duration from UMD.
Add the attribute to fill in by UMD. Also, updating the Macro
for the max led trigger from 3 to 2 as there are only two
physical LED channel is available.

CRs-Fixed: 2633194
Change-Id: I641e1ab42e59bc251d33a1e1dd0dff83afb5b7fb
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2020-03-11 10:02:21 -07:00
Karthik Jayakumar
75740a1ced msm: camera: common: Fix types for comparison function
Creates a function to match expectant types for platform device
comparisons during component registration.

CRs-Fixed: 2584631
Change-Id: Ib07160b8d8f1a370ba535ffdbbc6adbe391c68d5
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2020-03-10 12:57:20 -07:00
Venkat Chinta
5619d4e93e msm: camera: ife: Unmask top level bus write IRQ bit
During VFE reset we mask all bits apart from reset done. Since
the top level bus write IRQ bit is common to all output ports
it is set during the initialize hardware sequence. However since
initialize hardware is not invoked in start only case that follows
flush, we must set it again.

CRs-Fixed: 2590331
Change-Id: I73f09e552779bd65f472178c1025594be03025fb
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
2020-03-05 11:10:07 -08:00
Haritha Chintalapati
a018ba6cf1 Merge "msm: camera: ife: Assign half the height value for cbcr plane" into camera-kernel.lnx.4.0 2020-03-04 14:31:30 -08:00
Haritha Chintalapati
0f65d30e1d Merge "msm: camera: csid: Rename TPG vd/dt macros" into camera-kernel.lnx.4.0 2020-03-03 14:21:05 -08:00
Haritha Chintalapati
4243c023a9 Merge "msm: camera: ife: Add check for DSP enabled in acquire" into camera-kernel.lnx.4.0 2020-03-03 14:20:53 -08:00
Haritha Chintalapati
3d02c7f405 Merge "msm: camera: sensor: Update maximum supported camera id" into camera-kernel.lnx.4.0 2020-03-03 14:20:43 -08:00
Haritha Chintalapati
bcc4402eed Merge "msm: camera: sensor: Update I2C read/write size" into camera-kernel.lnx.4.0 2020-03-03 14:20:31 -08:00
Camera Software Integration
695e073072 Merge "msm: camera: common: Fix failures in v4l2 unregister during error" into camera-kernel.lnx.4.0 2020-03-02 15:05:39 -08:00
Camera Software Integration
3fb2481cb0 Merge "msm: camera: flash: Add qti flash support in camera" into camera-kernel.lnx.4.0 2020-03-02 15:05:29 -08:00
Camera Software Integration
4723bcdf25 Merge "msm: camera: ife: Save dual IFE flag" into camera-kernel.lnx.4.0 2020-03-02 15:05:06 -08:00
Karthik Jayakumar
a6a80b5c2b msm: camera: sensor: Update I2C read/write size
Update I2C read and write capability to 10kb.

CRs-Fixed: 2584631
Change-Id: Iffffb18ad79a5492df2ca0aa0f1411ae67cb92cc
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2020-02-28 17:06:52 -08:00
Mukund Madhusudan Atre
0a649b3063 msm: camera: common: Fix failures in v4l2 unregister during error
Missing video unregister was causing list delete corruption.
Also, there were double free errors in Sync and CRM driver. Fix
v4l2 issues by adding the missing unregister calls and changing
release callback to empty, because we are freeing it during
cleanup. Improve logging during bind/unbind to better reflect what
is happening.

CRs-Fixed: 2584631
Change-Id: Idc5db655d22df54e8bdb470d29896e10f6987796
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2020-02-28 16:02:56 -08:00
Karthik Jayakumar
3ba88cc32f msm: camera: sensor: Update maximum supported camera id
Updates maximum number of supported camera id to 9

CRs-Fixed: 2584631
Change-Id: I00a595d784b38030a7996a8da930ecdeaf05835c
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2020-02-28 16:00:52 -08:00
Venkat Chinta
c5086bcea3 msm: camera: csid: Rename TPG vd/dt macros
CSID TPG and PHY TPG require different values for VC/DT. This change
renames the macros to more distinct identifiers and assigns the
appropriate values based on input TPG type.

CRs-Fixed: 2632165
Change-Id: I136eb88a7cec338898cab8537cb080a0f26c2f77
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
2020-02-28 15:29:10 -08:00
Venkat Chinta
4682501c82 msm: camera: ife: Add check for DSP enabled in acquire
This change adds a check if DSP is enabled to ensure lower
index IFE cores are acquired since only they support DSP
mode.

CRs-Fixed: 2632139
Change-Id: Ib1be26be9d5afd83f565ddf5adb989ef463d8b8d
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
2020-02-28 14:46:48 -08:00
Venkat Chinta
fce521db94 msm: camera: cci: Add hardware index in dumps
This change adds hardware index to register dump.

CRs-Fixed: 2632034
Change-Id: Ibdd96d4f9f7a99c71118950fc0ee0b8aec9a7340
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
2020-02-28 11:28:11 -08:00
Venkat Chinta
88406b50a8 msm: camera: ife: Save dual IFE flag
This change saves the dual IFE flag during CAMIF acquire. This
line was misplaced during rebase of commit 8e79606ada ("msm:
camera: isp: Add support for offline IFE").

CRs-Fixed: 2630545
Change-Id: I321898aa6550b15240ca4308b1ceda1fbad14963
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
2020-02-27 14:25:36 -08:00
Mukund Madhusudan Atre
ac6f8eeb6d msm: camera: flash: Add qti flash support in camera
Add support for qti flash along with updated max current DT
property. Remove support for enable/disable regulator as it
is no-op since a long time.

CRs-Fixed: 2584631
Change-Id: I3305e7b6e4d6ef34d90d38f5f25cfa5b8b817f8b
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2020-02-27 14:17:13 -08:00
Mukund Madhusudan Atre
85aae7fa2c msm: camera: fd: Add balanced dynamic allocation for free in init
The work data passed as payload to workq is statically allocated,
which has kfree call during destroy, this fails during component
unbind. Change allocation of work data to dynamic in fd hw manager.

CRs-Fixed: 2584631
Change-Id: I0cd2a152d39793ce620e9a9fc2950ee91cefe6bf
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2020-02-26 16:57:38 -08:00
Camera Software Integration
3a756cef36 Merge "msm: camera: isp: Config hardware in work queue" into camera-kernel.lnx.4.0 2020-02-26 13:14:11 -08:00
Camera Software Integration
64ac46e64e Merge "msm: camera: ife: Improve logs" into camera-kernel.lnx.4.0 2020-02-26 13:14:02 -08:00
Camera Software Integration
b4881d5569 Merge "msm: camera: ife: Change halt type" into camera-kernel.lnx.4.0 2020-02-26 13:13:55 -08:00
Camera Software Integration
3d0a403321 Merge "msm: camera: ife: Change data type for timeout" into camera-kernel.lnx.4.0 2020-02-24 13:20:48 -08:00
Camera Software Integration
43297e2c0e Merge "msm: camera: isp: Avoid dereference for unavailable port in ife out" into camera-kernel.lnx.4.0 2020-02-24 13:20:41 -08:00
Camera Software Integration
28b071f1a6 Merge "msm: camera: smmu: Fix unbalanced mutex unlock in camera smmmu" into camera-kernel.lnx.4.0 2020-02-21 13:40:05 -08:00
Camera Software Integration
1a40a879c3 Merge "msm: camera: isp: Fix failure due to dereference of invalid ife device" into camera-kernel.lnx.4.0 2020-02-21 13:39:51 -08:00
Camera Software Integration
cffa3f9379 Merge "msm: camera: cci: Add device managed alloc to balance free in remove" into camera-kernel.lnx.4.0 2020-02-21 13:39:41 -08:00
Venkat Chinta
a16202752f msm: camera: ife: Assign half the height value for cbcr plane
This change adds a check for plane ID when updating write master
height value in per frame blob. Plane C must be programmed with
half the height.

CRs-Fixed: 2626999
Change-Id: I44b4d69d9d330342c444bbe435c6a54ad9f3bd6f
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
2020-02-21 11:34:40 -08:00
Mukund Madhusudan Atre
c5539d1d13 msm: camera: smmu: Fix unbalanced mutex unlock in camera smmmu
When smmu get handle is called, mutex unlock is called on a lock
that was not acquired. Add mutex lock condition to balance it.
Also, re-organize the conditions for handle types to be mutually
exclusive.

CRs-Fixed: 2584631
Change-Id: I057b8812c8f76e157503eb5c76aa1de174563f3a
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2020-02-20 10:56:21 -08:00
Mukund Madhusudan Atre
0e57ffd0a0 msm: camera: isp: Avoid dereference for unavailable port in ife out
During deinit, we are dereferencing resource data even for unavailable
out resource. Avoid dereferencing NULL pointer during vfe deinit out
resource.

CRs-Fixed: 2584631
Change-Id: I8488ccf73f62c551fc9d6ce3d636b10d8b0c7b8c
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2020-02-20 09:31:17 -08:00
Venkat Chinta
32eade687a msm: camera: isp: Config hardware in work queue
Currently requests for offline IFE are applied from tasklet
context or from an ioctl thread within a critical section
protected by a spinlock. In both of these cases, preemtion is
disabled but CDM requires mutex locks during this operation.
Therefore a work queue is added in this change to handle
apply request for offline IFE.

CRs-Fixed: 2606911
Change-Id: Ie893a626bc274d026fb878f1f19830e990be6dc6
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
2020-02-19 17:56:44 -08:00