Gráfico de commits

144 Commits

Autor SHA1 Mensagem Data
Gaurav Jindal
e3f5738e43 msm: camera: isp: LDAR Dump ISP information
When user space detects an error or does not receive
response for a request, Lets do a reset(LDAR) is triggered.
Before LDAR, user space sends flush command to the
kernel space.
In order to debug the cause for this situation and to dump
the information, user space sends a dump command to
kernel space before sending flush.
As a part of this command, it passes the culprit request id
and the buffer into which the information can be dumped.
Kernel space traverses across the drivers and find the culprit hw
and dumps the relevant information in the buffer.
This data is written to a file for offline processing.
This commit dumps the IFE, CSID registers, LUT tables and context
information, cmd buffers, timestamps information for
submit, apply, RUP, epoch and buffdones of the last 20
requests.

CRs-Fixed: 2612116
Change-Id: If83db59458c1e5ad778f3fa90cbc730122491c54
Signed-off-by: Gaurav Jindal <gjindal@codeaurora.org>
2020-02-10 14:39:46 -08:00
Camera Software Integration
2460a8e82a Merge "msm: camera: isp: Add support to obtain frame index" into camera-kernel.lnx.4.0 2020-02-10 11:47:28 -08:00
Camera Software Integration
4c9c8a271a Merge "msm: camera: isp: Update IRQ controller names" into camera-kernel.lnx.4.0 2020-02-10 11:47:15 -08:00
Karthik Anantha Ram
5ddf0a5cfb msm: camera: isp: Add support to obtain frame index
This change captures the frame index as part of the IFE top
register space at every epoch event. The index is then notified
to userspace as part of shutter notification.

CRs-Fixed: 2524308
Change-Id: Iac510c452f9ceda86e9f7d69528f22f81e614974
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2020-02-08 00:15:28 -08:00
Camera Software Integration
0894c95dda Merge "msm: camera: isp: Get packet opcode from hw manager" into camera-kernel.lnx.4.0 2020-02-07 15:14:33 -08:00
Camera Software Integration
d5fa77dbdd Merge "msm: camera: isp: Register dump for first request id" into camera-kernel.lnx.4.0 2020-02-07 15:13:41 -08:00
Camera Software Integration
ba20c111ed Merge "msm: camera: common: Add component helper support in camera" into camera-kernel.lnx.4.0 2020-02-07 15:13:17 -08:00
Camera Software Integration
182154ab1c Merge "msm: camera: isp: Add epd Blob support" into camera-kernel.lnx.4.0 2020-02-07 15:12:59 -08:00
Ravikishore Pampana
4f1ba0f292 msm: camera: isp: Get packet opcode from hw manager
While processing the user space submitted isp packet,
isp context need to know the packet opcode.
Get the opcode from the hw manager than the direct accessing the
opcode from packet.
Ife umd sends different opcodes then tfe umd. Both ife and tfe kernel
packet opcodes are same. So hw manager can consume this differences.

CRs-Fixed: 2585713
Change-Id: I54813af233cd8bfa640f2688c1334510a5b85f1c
Signed-off-by: Ravikishore Pampana <rpampana@codeaurora.org>
2020-02-06 15:13:05 -08:00
Ravikishore Pampana
05378eff25 msm: camera: isp: Register dump for first request id
First request id not getting dump if early pcr is on.
If early pcr is on need to store the parsed register dump descriptor
for first request id which comes as init packet.

CRs-Fixed: 2595702
Change-Id: Icbf94d65b5c35cdf47044d770c7db7093001d506
Signed-off-by: Ravikishore Pampana <rpampana@codeaurora.org>
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2020-02-06 13:01:12 -08:00
Mukund Madhusudan Atre
5cb000ee7f msm: camera: common: Add component helper support in camera
Due to the asynchronous nature of platform probes, inter
dependency between drivers needs to be taken care during
kernel boot up. Component helper provides the facility of
adding matching drivers in a list ordered in the way we want
to bind those drivers. The CRM driver acts as component master
to make sure all slave drivers are bound before it returns
from its own bind call. Add support for serializing platform
probes through component framework.

CRs-Fixed: 2584631
Change-Id: I345da1d2b9cccf6021ac6fc899143013b7714ec4
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2020-02-05 22:58:13 -08:00
Prakasha Nayak
8dc1774e8b msm: camera: isp: Add epd Blob support
This change adds blob support to disable CSID EOT IRQ
in case of high data rate sensors which sends
EPD instead of EOT.

CRs-Fixed: 2566158
Change-Id: I8ac6d2281a6510d3702f3b651e2c7ca2391afe6c
Signed-off-by: Prakasha Nayak <pnayak@codeaurora.org>
2020-02-05 14:14:57 -08:00
Gaurav Jindal
14b75bff2d msm: camera: isp: Add support for IFE2
Add support for IFE2 hardware in ife hw manager, bus files.

CRs-Fixed: 2571273
Change-Id: I6193b70707b15282b8d819e8dda5eb2e5fc4c345
Signed-off-by: Gaurav Jindal <gjindal@codeaurora.org>
2020-02-05 10:49:16 -08:00
Karthik Jayakumar
c1eedf8be5 msm: camera: isp: Update IRQ controller names
Fixes debug log printing of IRQ controller names from within
interrupt.

CRs-Fixed: 2584631
Change-Id: I0df94603f31fa2fb56464938e1a28fda470e4a27
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2020-02-04 19:01:18 -08:00
Camera Software Integration
0da9c03755 Merge "msm: camera: ife: Remove reset type override" into camera-kernel.lnx.4.0 2020-02-04 15:19:15 -08:00
Camera Software Integration
3fc621826d Merge "msm: camera: isp: Add check for cid acquire" into camera-kernel.lnx.4.0 2020-02-04 15:19:06 -08:00
Camera Software Integration
bd60f847ef Merge "msm: camera: isp: Mask unused rdi interrupts" into camera-kernel.lnx.4.0 2020-02-04 15:18:31 -08:00
Camera Software Integration
e0063de3c3 Merge "msm: camera: ife: Reduce config done timeout during stop" into camera-kernel.lnx.4.0 2020-02-04 15:18:23 -08:00
Camera Software Integration
933a941f33 Merge "msm: camera: cdm: Clear IRQ before reading userdata" into camera-kernel.lnx.4.0 2020-02-04 15:18:14 -08:00
Camera Software Integration
77b739919d Merge "msm: camera: isp: Change data type for error handling" into camera-kernel.lnx.4.0 2020-02-04 15:17:06 -08:00
Camera Software Integration
8d141684b8 Merge "msm: camera: ife: Stop hardware in error" into camera-kernel.lnx.4.0 2020-02-04 15:09:03 -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
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
Karthik Anantha Ram
d7c20bce67 msm: camera: isp: Add check for cid acquire
This change adds a check to validate the cid being acquired,
when custom HW is in the pipeline.

CRs-Fixed: 2524308
Change-Id: I32913e74bc946a4333f77f5e10757c4bd51eab67
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2020-02-03 13:54:48 -08:00
Venkat Chinta
3f5125ebb1 msm: camera: ife: Remove reset type override
This change removes the VFE reset type override that
was introduced to a hardware limitation that has since
been rectified.

CRs-Fixed: 2590331
Change-Id: I2232ab69a9c66e9e14dd849755d8b4eba63fe136
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
2020-02-03 13:38:33 -08:00
Venkat Chinta
89c75af320 msm: camera: ife: Reduce config done timeout during stop
This change reduces the duration of wait for config done during
stop and flush. We perform wait for completion once for reg
dump during flush so there is no need for a long wait during
stop.

CRs-Fixed: 2606911
Change-Id: Ib1c2d7655d8a213495618a140acea2391b262082
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
2020-01-31 16:11:24 -08:00
Abhilash Kumar
4e30068212 msm: camera: cdm: Clear IRQ before reading userdata
CDM driver read the user_data reg to inform CDM's clients
about the request status being served. If before clearing
the IRQ, the value of userdata register gets updated, then
CDM will not receive another INLINE_IRQ for the updated
userdata.
This change will make sure that another interrupt is fired
by clearing the IRQ first and reading the userdata later.

CRs-Fixed: 2581559
Change-Id: I74edf1b8439ae2f88f30b6c2fdbf9ac9f3742503
Signed-off-by: Abhilash Kumar <krabhi@codeaurora.org>
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
2020-01-31 16:07:04 -08:00
Venkat Chinta
0f1162d099 msm: camera: ife: Stop hardware in error
This change adds logic to stop IFE hardware in case of
hardware errors.

CRs-Fixed: 2590331
Change-Id: I86773cc44ce890cea47f19f0482761e686b0cd00
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
2020-01-30 13:54:38 -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
Tejas Prajapati
10d42b7f6c msm: camera: isp: Mask unused rdi interrupts
Enable rdi interrupts from the required sources only,
other unused interrupts from rdi sources should be masked.
Also in the case where multiple rdi has been acquired in
same context interrupts from only one of them should be
enabled.

CRs-Fixed: 2590476
Change-Id: Icd074d1566db0b758d25c7b127402b424e48efd9
Signed-off-by: Tejas Prajapati <tpraja@codeaurora.org>
2020-01-30 13:14:46 -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
287b7b22d7 msm: camera: isp: Change data type for error handling
Use unsigned long to capture the return value of
wait_for_completion APIs as part of CSID path reset.

CRs-Fixed: 2600604
Change-Id: Ic21ddf283180a177b2c2d9e9a33fec4ec68bdd98
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2020-01-30 10:53:18 -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
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
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
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
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
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
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
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
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
Camera Software Integration
0d6ddf1963 Merge "msm: camera: isp: Add hw version checks and dt match string" into camera-kernel.lnx.4.0 2020-01-13 20:38:30 -08:00
Vishalsingh Hajeri
423e6d195c msm: camera: ife: Sync master and slave IFE
Program hw_sync_sel field in core_cfg register
in case of dual ife.

CRs-Fixed: 2582959
Change-Id: I8a60cb06991738872c4caf0120ea21e5954d208a
Signed-off-by: Vishalsingh Hajeri <vhajeri@codeaurora.org>
2020-01-08 16:47:03 -08:00
Mukund Madhusudan Atre
eef5866053 msm: camera: isp: Add hw version checks and dt match string
The platform register requires dt match string for csid to probe
and correct cpas hw version is required for vfe to function. Add
dt match strings and hw version checks in csid and vfe.

CRs-Fixed: 2584631
Change-Id: Ieb2766fa6243bf4133b43f657a18aed7f04447be
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
Signed-off-by: Vishalsingh Hajeri <vhajeri@codeaurora.org>
2020-01-07 15:26:28 -08:00
Gaurav Jindal
7d7ed34560 msm: camera: isp: Change master slave combination for dual IFE
For some targets, there is a requirement to have the lower IFE
as master. Current implementation selects the higher IFE as
the master.
This commit changes the acquire logic to reserve the lower IFE
first and then the higher IFE as slave. This logic is for dual
ife use cases. For single IFE use case, acquire logic is not
changed.
Also, removes the hard coded check for master hw index
during the irq  handling. Stores the master hw index
in ife hardware manager context and check against it.

Change-Id: Ifd3a28e80a0a4d16e3d9278b7ed61290c620ec79
CRs-Fixed: 2582959
Signed-off-by: Gaurav Jindal <gjindal@codeaurora.org>
Signed-off-by: Vishalsingh Hajeri <vhajeri@codeaurora.org>
2020-01-02 17:37:20 -08:00
Vishalsingh Hajeri
4265f73698 msm: camera: common: Enable additional IFE hw
Add IFE2 in UAPI header to return acquired IFE's
hw index to userspace.

CRs-Fixed: 2582959
Change-Id: I42de76453753245376f9a857d5a7de979da78333
Signed-off-by: Vishalsingh Hajeri <vhajeri@codeaurora.org>
2019-12-19 17:48:24 -08:00
Venkat Chinta
75f72b30a7 msm: camera: isp: Add header file changes
This commit adds header file changes for version 580 hardware.

CRs-Fixed: 2582959
Change-Id: I14497249db4a09c170215839a788c7477932ff35
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
Signed-off-by: Vishalsingh Hajeri <vhajeri@codeaurora.org>
2019-12-18 20:35:35 -08:00
Elliot Berman
10891f6916 msm: camera: utils: Migrate SCM calls
Migrate secure world calls to qcom scm driver.

CRs-Fixed: 2564857
Change-Id: I8eb7498e4f80ff7ac1e22b7dcd364048e5338746
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2019-12-04 19:53:56 -08:00