Commit Graph

315 次程式碼提交

作者 SHA1 備註 提交日期
Camera Software Integration
1598b6d0e8 Merge "msm: camera: icp: Dump patching info in case of page faults" into camera-kernel.lnx.4.0 2020-02-04 15:07:59 -08:00
Camera Software Integration
d96c25f265 Merge "msm: camera: icp: Enable hang dump on failure" into camera-kernel.lnx.4.0 2020-02-04 15:07:49 -08:00
Camera Software Integration
8b7546e512 Merge "msm: camera: custom: Add support for immediate stop" into camera-kernel.lnx.4.0 2020-02-04 15:07:26 -08:00
Camera Software Integration
d9c3665f6b Merge "msm: camera: reqmgr: Reduce delay by one frame during bubble recovery" into camera-kernel.lnx.4.0 2020-02-03 14:10:09 -08:00
Camera Software Integration
bcb623611e Merge "msm: camera: ife: Disable clock gating at top" into camera-kernel.lnx.4.0 2020-02-03 14:09:53 -08:00
Camera Software Integration
2eb43777e9 Merge "msm: camera: icp: Mapping fw error numbers with error names" into camera-kernel.lnx.4.0 2020-02-03 14:09:36 -08:00
Camera Software Integration
01c08edcd4 Merge "msm: camera: icp: Enqueue the abort cmd in workq" into camera-kernel.lnx.4.0 2020-02-03 14:09:20 -08:00
Camera Software Integration
346b97be0d Merge "msm: camera: icp: Increase the wait time for abort ACK" into camera-kernel.lnx.4.0 2020-02-03 14:09:06 -08:00
Camera Software Integration
6218118e61 Merge "msm: camera: reqmgr: reset the slot on buf_done" into camera-kernel.lnx.4.0 2020-02-03 14:08:56 -08:00
Camera Software Integration
56a3afaca6 Merge "msm: camera: csiphy: Update common sequence for csiphy v1.2" into camera-kernel.lnx.4.0 2020-02-03 14:08:33 -08:00
Camera Software Integration
4bc14156bb Merge "msm: camera: req_mgr: Link state check before process trigger workq" into camera-kernel.lnx.4.0 2020-02-03 14:07:52 -08:00
Camera Software Integration
b7d2028ac7 Merge "msm: camera: isp: prioritize RUP over EPOCH in bottom half" into camera-kernel.lnx.4.0 2020-02-03 14:04:40 -08:00
Camera Software Integration
cb3b398b2b Merge "msm: camera: cpas: Reorder sequence of cleanup in cpas probe failure" into camera-kernel.lnx.4.0 2020-02-03 14:03:50 -08:00
Camera Software Integration
6d220294b9 Merge "msm: camera: jpeg: Increase number of jpeg contexts" into camera-kernel.lnx.4.0 2020-02-03 14:03:23 -08:00
Venkat Chinta
5fec859ec6 msm: camera: ife: Disable clock gating at top
Clock gating must be disabled at top level initialize
hardware routine as VFE is reset after resource level
initialize hardware routine.

CRs-Fixed: 2590331
Change-Id: I5c51c402a3a6076f056368493b774daa199228aa
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
2020-01-30 13:50:18 -08:00
Karthik Anantha Ram
fbfa512811 msm: camera: reqmgr: Reduce delay by one frame during bubble recovery
The EPOCH at which bubble is detected no setting is applied
to any device. This change will trigger applying the bubbled
setting to the device with highest pipeline delay.

CRs-Fixed: 2564669
Change-Id: I180b4a1d2d29267f330546b8860a099baf1688e9
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2020-01-30 10:53:46 -08:00
Karthik Anantha Ram
118b93f5dd msm: camera: custom: Add support for immediate stop
Add support for immediate stop and reset during flush
for custom HW.

CRs-Fixed: 2585745
Change-Id: I542ac02f8d99c194efa498bc07dffae7879a6c8a
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2020-01-30 10:53:31 -08:00
Karthik Anantha Ram
b2e69c4df0 msm: camera: icp: Dump patching info in case of page faults
Currently as part of the page fault handler we only dump the
io_bufs. This change dumps all the patched addresses for
this request as well.

CRs-Fixed: 2579908
Change-Id: If5deec0ad3a8aec82824ef55366084c31a037515
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2020-01-30 10:49:50 -08:00
Karthik Anantha Ram
080bb2339a msm: camera: icp: Enable hang dump on failure
In case user does not set any dump lvl, KMD will set
to dump on failure as default.

CRs-Fixed: 2579908
Change-Id: I036e91f5daceedf575815e7569c0e90c04f8de52
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2020-01-30 10:49:11 -08:00
Shravan Nevatia
9fdce6ca87 msm: camera: sensor: Add null check for read buffer
Add proper null checks for function arguments,
including read buffer, before dereferencing them.

CRs-Fixed: 2581538
Change-Id: I8c49bbc419e2ac5579341c7dc789da0ed1c4d123
Signed-off-by: Shravan Nevatia <snevatia@codeaurora.org>
2020-01-30 04:57:29 -08:00
Gaurav Jindal
a29622aedc msm: camera: jpeg: Add mutex lock to protect jpeg list corruption
Due to race conditions, situation can arise where the process_irq
and flush for jpeg are being handled in parallel. This will cause
the jpeg list corruption.
This commit protects the code of adding back to free list
in process_irq with the mutex.

CRs-Fixed: 2578247
Change-Id: I28ee48bc0d5cfcf3ae4a936b2eb2976226ad88d5
Signed-off-by: Gaurav Jindal <gjindal@codeaurora.org>
2020-01-30 04:55:55 -08:00
Prakasha Nayak
4f8e2cdeff msm: camera: icp: Mapping fw error numbers with error names
This change will print ICP error names based on error type.

CRs-Fixed: 2456658
Change-Id: I975598a7404f7520912d7b3211b6baa249e7f238
Signed-off-by: Prakasha Nayak <pnayak@codeaurora.org>
2020-01-30 04:07:39 -08:00
Karthik Anantha Ram
5edf8f04dc msm: camera: icp: Enqueue the abort cmd in workq
The request frame cmds are submitted to the FW in workq context.
The abort cmd as part of flush is triggered in user thread context.
This change will enqueue the abort as part of flush to FW in workq,
thereby ensuring that if there are any pending frames they are
submitted prior to the abort cmd.

CRs-Fixed: 2588575
Change-Id: I5034ca500cf39dfa0e553c49917fedb8bd084b0b
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2020-01-30 04:04:48 -08:00
Karthik Anantha Ram
f7943f0f07 msm: camera: icp: Increase the wait time for abort ACK
This change attempts to retry waiting atleast 1 time for
a duration of 1 second for the abort ACK from FW. Also
adds some debug messages during flush and removes mutex
usage during page fault dump.

CRs-Fixed: 2588575
Change-Id: I2f273baa3d56ab2dc0368d882470360a3702c53c
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2020-01-30 03:57:33 -08:00
Alok Pandey
5f5a2f2028 msm: camera: cpas: Reorder sequence of cleanup in cpas probe failure
if cpas probe fails during initialization of soc resources
soc data is being accessed after freeing the memory.
This change handling the sequence on failure.

CRs-Fixed: 2585085
Change-Id: Ia89b02bce9cfb6512b33f8e7366a552635317ccd
Signed-off-by: Alok Pandey <akumarpa@codeaurora.org>
2020-01-30 03:50:52 -08:00
Suraj Dongre
2e181b7f9c msm: camera: jpeg: Increase number of jpeg contexts
Fixed out of memory issue in triple camera usecase by increasing
number of logical jpeg contexts.

CRs-Fixed: 2587592
Change-Id: I25c99c0be8d3986bc11fbc2894a0dbf27c645d4e
Signed-off-by: Suraj Dongre <sdongre@codeaurora.org>
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2020-01-30 03:37:52 -08:00
Tejas Prajapati
96390653c5 msm: camera: reqmgr: reset the slot on buf_done
Reset the slot with the valid request on receiving
the buf_done which is reported on next EPOCH.
In case of back to back irqs slot is marked as skip idx
it will apply the request and try to reset a slot based
on MAX_PD + 1 calculation which might have the request
for which we have got a bubble. To make sure this does not
happen, reset a slot only on the buf_done for valid request.

If STOP ioctl is called from UMD for ISP, it will flush all
the lists. But this is not notified to CRM which might have
a stale entry of the half applied request, so on STOP ioctl
clear all the slots.

In case of SAT mode if one of the link has generated bubble,
while the sync_link has the sync_request slot reset sync_link
will not let the link recover of the bubble. To make sure the
recovery sync_mode is set to 0 for two consecutive slots of
the link.

CRs-Fixed: 2551701
Change-Id: If4b6f8a4a831ffddcef2cae6292d066778c18b04
Signed-off-by: Tejas Prajapati <tpraja@codeaurora.org>
2020-01-30 03:34:07 -08:00
Shravan Nevatia
bf16c8a8e5 msm: camera: csiphy: Update common sequence for csiphy v1.2
Add a high-to-low transition in the CTRL0 register
during the common power-up sequence.

CRs-Fixed: 2580437
Change-Id: I66541d3d787fa2f161e5d8e647fb11c8075a1947
Signed-off-by: Shravan Nevatia <snevatia@codeaurora.org>
2020-01-30 03:32:39 -08:00
Gaurav Jindal
65f749c831 msm: camera: req_mgr: Link state check before process trigger workq
Due to scheduling delays, process trigger workq can be delayed.
In the meantime, link state can be reset to IDLE. This can cause
abnormal behaviour resulting in stability issues. Also, at the
time of apply  fail for flash, failed_dev is not updated.
This causes crash while notifying the error on link.
This commit prevents the execution of workq process trigger if
the link has been reset to IDLE state.
Also, failed_dev is updated if the apply for flash fails.

CRs-Fixed: 2572511
Change-Id: Iaea1e0a7a24afc9e408a1530a5875f6b6c41a45b
Signed-off-by: Gaurav Jindal <gjindal@codeaurora.org>
2020-01-30 03:30:48 -08:00
Vikram Sharma
6b1a0dfc66 msm: camera: isp: prioritize RUP over EPOCH in bottom half
When epoch comes along with RUP we report bubble as per current state
machine. This was because in camif_bottom_half handler we are handling
EPOCH before RUP. This change prioritize RUP over EPOCH  and EOF over
SOF to handle race.

CRs-Fixed: 2567120
Change-Id: I236bcc44b609f8ef7f963f19d33d46a3d95ba0d2
Signed-off-by: Vikram Sharma <vikramsa@codeaurora.org>
2020-01-30 02:49:33 -08:00
Camera Software Integration
b08e2b4099 Merge "msm: camera: sync: Enable driver registration with dtsi match" into camera-kernel.lnx.4.0 2020-01-17 13:21:56 -08:00
Suresh Vankadara
f1f6915ed4 msm: camera: ope: Fix OPE AHB voting issue
Initialize AHB voting variable in OPE acquire
to fix AHB voting issue for OPE.

CRs-Fixed: 2594541
Change-Id: I5bf8c0b1315a351abd80341100bdaf42333c4c24
Signed-off-by: Suresh Vankadara <svankada@codeaurora.org>
2020-01-16 17:45:48 +05:30
Ravikishore Pampana
12548365df msm: camera: common: secure camera fixes
Isp bus port secure mode not coming properly. Added proper
logic to get the bus port secure mode correctly.
Use secure iommu handle to get secure buffer for ope.
Add spin lock for tfe irq handler.
Use proper bw structure to copy the user send blob
data.

CRs-Fixed: 2594541
Change-Id: Icb8ecf869681c370efa084991505036f90a35065
Signed-off-by: Ravikishore Pampana <rpampana@codeaurora.org>
2020-01-16 17:45:47 +05:30
Tony Lijo Jose
832ac63b18 msm: camera: cci: Correct the queue size for cci version 1.2
Correct the queue size for cci version 1.2 as below,

1. Queue 0 size = 64.
2. Queue 1 size = 16.

CRs-Fixed: 2594541
Change-Id: Ifc9407427fe2bf0996c77dc00c5dfe7e5ba22140
Signed-off-by: Tony Lijo Jose <tjose@codeaurora.org>
2020-01-16 17:45:47 +05:30
Rishabh Jain
eb74ea19e4 msm: camera: ope: Fixed for IRQ mask and log printing
Adding fixes to set IRQ mask after reset and strings to
print OPE CPAS PATH enums.

CRs-Fixed: 2594541
Change-Id: I5873b8b0494623c36ca94edf7a26cc952fbb5e68
Signed-off-by: Rishabh Jain <risjai@codeaurora.org>
2020-01-16 17:45:46 +05:30
Rishabh Jain
130865bbdf msm: camera: ope: Avoid dead lock during flush
During flush OPE driver takes lock on OPE context and
calls the CDM flush, in which CDM notifies OPE for all
pending requests. If at the same time CDM is notifying
OPE for successful request that thread also tries to
take lock on OPE context. CDM also tries to takes lock
on CDM client in each notify call. Due to which,
dead lock is occurring.

So taking the lock on OPE context in OPE flush after
CDM flush.

CRs-Fixed: 2594541
Change-Id: I6ae9105d33a49a638141973cdd6a4a99621dc4c5
Signed-off-by: Rishabh Jain <risjai@codeaurora.org>
2020-01-16 17:45:46 +05:30
Rishabh Jain
bd1e6c2420 msm: camera: ope: Add fixes for probe, bus read and req_timer
As we are accessing hw version register during probe so calling
cpas_start and cpas_stop during probe.
Disabling the read clients which are not enabled for the request.
Resetting the req_timer when we receive the request from UMD.

CRs-Fixed: 2594541
Change-Id: I4a739fedbb498bd0c6b5b1e4cef38de3e4c722ed
Signed-off-by: Rishabh Jain <risjai@codeaurora.org>
2020-01-16 17:45:45 +05:30
Ravikishore Pampana
2613767f35 msm: camera: isp: Update bus width properly
Do not read the hw register to update the bus width.
Update register with stored height and user space given width
Update the tfe core irq command register after clear the registers.

CRs-Fixed: 2594541
Change-Id: I3fd9e0ce4319cd19b94e9c83fa63aab37f26027e
Signed-off-by: Ravikishore Pampana <rpampana@codeaurora.org>
2020-01-16 17:45:45 +05:30
Rishabh Jain
a90aec6cb4 msm: camera: ope: Corrected parameter for deiniting idle clock
Corrected the parameter needed to be passed in cam_ope_deinit_idle_clk.

CRs-Fixed: 2594541
Change-Id: Ibeb8558fd0724fff61f4a6ddadd3b3cf6a6b3ed2
Signed-off-by: Rishabh Jain <risjai@codeaurora.org>
2020-01-16 17:45:44 +05:30
Chandan Kumar Jha
594b0acba5 msm: camera: common: Remove division on uint64_t
Arm arch does not support dividing 64 bit integer, replacing it with
do_div call.
Fix variable type to work with both 32/64 bit arch.

CRs-Fixed: 2594541
Change-Id: I6b30f089bc998e98c7f2e20dc7fc11eedf6e6bc7
Signed-off-by: Chandan Kumar Jha <cjha@codeaurora.org>
2020-01-16 17:45:44 +05:30
Ravikishore Pampana
50fd3a70d1 msm: camera: tfe: Configure TPG hbi and vbi
User space will send HBI and VBI values for tpg. Configure the TPG
HBI and VBI values based on the user space given values.
If user space does not send then configure the default values.
Assign the isp context variable in the hw update data during the
tfe hw config.  Update proper comp group id for slave tfe.

CRs-Fixed: 2594541
Change-Id: I2771d3c663c0fcb58306952f161c11a473846f8d
Signed-off-by: Ravikishore Pampana <rpampana@codeaurora.org>
2020-01-16 17:45:43 +05:30
Trishansh Bhardwaj
d07eb2f941 msm: camera: cpas: Update the QOS settings for Bengal camera
Camera QOS settings are updated for Bengal target as per the
Recommendations of hardware team.

CRs-Fixed: 2594541
Change-Id: I068683445b0ced92c22a5bfdc56d936ca64385c3
Signed-off-by: Ravikishore Pampana <rpampana@codeaurora.org>
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
2020-01-16 17:45:43 +05:30
Trishansh Bhardwaj
cb2e8943da msm: camera: tfe: Add support to TFE driver
TFE is thin front end hardware that capture and process the
real time image. Support is added to enable the TFE
hardware.

CRs-Fixed: 2594541
Change-Id: I0ab2eff7924e9e01f6a0fcec772d3a7dda229b37
Signed-off-by: Ravikishore Pampana <rpampana@codeaurora.org>
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
2020-01-16 17:45:42 +05:30
Abhilash Kumar
4fddce3d69 msm: camera: cdm: Correct bitvalue for burst enable
The bit corrresponding to enabling burst is 4th bit.
This change fixes its value by assigning the same.

CRs-Fixed: 2594541
Change-Id: Ibeec3fd4460f9040255fa77f60fd565aed824c1c
Signed-off-by: Abhilash Kumar <krabhi@codeaurora.org>
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
2020-01-16 17:45:42 +05:30
Trishansh Bhardwaj
d907c2c7cb msm: camera: cdm: Add support for different CDM hardware
Different CDM hardware have different capability and registers.
With old register space, handling new features and operations
would have been a complex task. This change takes care of old
version of CDM and also changes the regspace to provide every
register's access to CDM.
This change further adds support for "arbitration" in case of
multi-context CDMs.
Exports reset functionality to clients, detection of CDM hang.
Flushing the CDM requests and dumping the FIFO content for all
contexts.
It also adds submitting "debug_gen_irq" as BL_done IRQ is only
an indication for availability of FIFO's. The AHB operations
are completed can only be known if the added "debug_gen_irqs"
gets executed and are received by the CDM.

CRs-Fixed: 2594541
Change-Id: I9846b1c5320ba652c5d3b7d83d616d2dabc843e1
Signed-off-by: Abhilash Kumar <krabhi@codeaurora.org>
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
2020-01-16 17:45:41 +05:30
Trishansh Bhardwaj
4aad75a2f9 msm: camera: ope: Support 32 bit arch
Update datatypes to work with 32 bit kernel.

CRs-Fixed: 2594541
Change-Id: I72d628152134770d7e09c3684443e25c47d9d1dc
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
2020-01-16 17:45:41 +05:30
Trishansh Bhardwaj
3bbd97274f msm: camera: cpas: Add support for Bengal camnoc
Bengal has different version of camnoc which requires
separate register space and camnoc interface changes.
This change adds the same.

CRs-Fixed: 2594541
Change-Id: I2a8e6cb8894444cb669ab1c4da5fa706dc6543ad
Signed-off-by: Rishabh Jain <risjai@codeaurora.org>
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
2020-01-16 17:45:22 +05:30
Trishansh Bhardwaj
2c76e695e3 msm: camera: isp: Move the ife hw manager resource to isp hw manager
Hardware manager resource is generic. Move the resource definition
to isp hw manager so that it can be used by other hw manager.
Remove the parent and child graph in the hardware manager resource
as it is not used. Use the common isp resource type everywhere.

CRs-Fixed: 2594541
Change-Id: I41d49af0855f3bd3768450d850b1284ff1e3fea9
Signed-off-by: Ravikishore Pampana <rpampana@codeaurora.org>
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
2020-01-16 15:01:40 +05:30
Jigarkumar Zala
376b7a3351 msm: camera: sync: Enable driver registration with dtsi match
Currently sync driver is independent from dtsi matching in order
to get it probe. Update the logic to make sure probe is getting
invoked if respective dtsi is present.

CRs-Fixed: 2590413
Change-Id: I69124e49d68e223d082521a9431cb7e8d846e8d7
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2020-01-15 16:39:25 -08:00
Trishansh Bhardwaj
41533c5eb2 msm: camera: ope: Corrected batch mode and stripe for ope
Corrected the striping creation for non real time device.
Disabled the ope stripe base bus. Corrected the batch mode
creation for ope bus read.

CRs-Fixed: 2594541
Change-Id: I87adbab25b84d74162a6a8ce2db1412a6d9058d0
Signed-off-by: Rishabh Jain <risjai@codeaurora.org>
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
2020-01-15 14:38:50 -08:00