Commit Graph

131 次程式碼提交

作者 SHA1 備註 提交日期
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
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
Jigarkumar Zala
03b6c2140f msm: camera: common: Make platform register centralized
Currently camera modules platform registration/remove function
is being called as a part of module_init function individually.
Building camera as module, current infrastructure cannot support
it, as DLKM only support single module_init/exit function.
This change enables that support by combining all platform
entry/remove functions centrally. Also, remove all submodule
makefiles and combined into one root makefile in order to generate
single kernel object file to dynamically loading the kernel module
in case of DLKM compilation.

CRs-Fixed: 2569808
Change-Id: I59db3ed6cef60123e474db2f222c39836056bd6e
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2019-12-04 12:33:01 -08:00
Jong-Guk Im
59b5e03e98 Merge "msm: camera: isp: Update camera timestamps to ktime API" into camera-kernel.lnx.4.0 2019-11-27 14:08:52 -08:00
Abhijit Trivedi
a15be98002 UPSTREAM: 11/22/19: Merge 'quic/camera-kernel.lnx.1.0' into 'quic/camera-kernel.lnx.4.0'
* quic/camera-kernel.lnx.1.0::
  msm: camera: sensor: Support for read operation
  msm: camera: req_mgr: Fix kmem_cache definition
  msm: camera: custom: Add support for acquire_hw_v1
  msm: camera: core: Prevent crash on kref_put
  msm: camera: isp: csid hw register reset with IRQ
  msm: camera: isp: Reset overflow pending flag in start hw
  msm: camera: icp: Increase MAX_PKT_SIZE_MSGQ for ICP
  msm: camera: icp: icp debug improvement
  msm: camera: reqmgr: Improve master slave sync
  msm: camera: isp: Notify CRM to pause SOF timer after flush
  msm: camera: csiphy: Fix csiphy v1.2 skew calibration settings
  msm: camera: csiphy: Update reset sequence for csiphy v1.2
  msm: camera: csiphy: Update registers for CSIPHY v1.2
  msm: camera: reqmgr: Change v4l2 notify error log type
  msm: camera: isp: Set device enable flag after enable csid hardware

Change-Id: I52c682b36583436425d157c8927e6fbcf5bf32eb
Signed-off-by: Abhijit Trivedi <abhijitt@codeaurora.org>
2019-11-22 17:42:17 -08:00
Karthik Jayakumar
8481d870a0 msm: camera: isp: Update camera timestamps to ktime API
Old API's returning struct timeval and struct timespec will be
deprecated in future kernel versions as their tv_sec members
will overflow in the year 2038 on 32-bit arhitectures.

CRs-Fixed: 2564616
Change-Id: I6e3e37cf957daca992b66cad1134f49dd78961f5
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2019-11-22 15:51:37 -08:00
Tejas Prajapati
809c56ef16 msm: camera: isp: csid hw register reset with IRQ
CSID hw register reset is done with the the help of
IRQ to make sure it is reset every time before we start
a new session.

CRs-Fixed: 2563958
Change-Id: I33c870003eb1e99d458b7650b5b3218f61cccd3b
Signed-off-by: Tejas Prajapati <tpraja@codeaurora.org>
2019-11-20 14:41:53 -08:00
Pavan Kumar Chilamkurthi
2c2fea11c5 msm: camera: isp: Reset overflow pending flag in start hw
While start hw, either a fresh start or resume after flush,
reset the overflow pending flag as we reset the hw and start
fresh with applying init packet. In case where overflow happening
at the same time as halt immediately, we set overflow pending
flag to true. Eventhough while halt immediate and resume
scenario, we reset the hw, not resetting overflow pending flag
causes not to apply any new packets while resume.

CRs-Fixed: 2565049
Change-Id: Ia9c871402343306945fe1b8f8373659e52630fe2
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
2019-11-19 17:54:38 -08:00
Camera Software Integration
f697ab3bb5 Merge "msm: camera: isp: Notify CRM to pause SOF timer after flush" into camera-kernel.lnx.1.0 2019-11-15 05:46:08 -08:00
Camera Software Integration
d85e275feb Merge "msm: camera: isp: Set device enable flag after enable csid hardware" into camera-kernel.lnx.1.0 2019-11-15 05:44:35 -08:00
Chandan Kumar Jha
fc8ddd752d msm: camera: isp: Notify CRM to pause SOF timer after flush
Adding CRM interface to stop SOF timer from isp during flush.
During flush hardware is getting stop and will not send SOF
notification to CRM so need to pause SOF timer. Whenever SOF
timer will get expire,do not need to send error to UMD during
pause time.

CRs-Fixed: 2564389
Change-Id: I6d85f2c658c30dbe211f0ec9d83bca323a5c265b
Signed-off-by: Chandan Kumar Jha <cjha@codeaurora.org>
2019-11-14 08:06:56 -08:00
Abhijit Trivedi
9b6110b579 UPSTREAM: 11/12/19: Merge 'quic/camera-kernel.lnx.1.0' into 'quic/camera-kernel.lnx.4.0'
* quic/camera-kernel.lnx.1.0:
  msm: camera: common: Update uapi to support custom hw features
  msm: camera: ife: calculate accurate boot timestamp at CSID SOF
  msm: camera: cpas: Update ife_rd safe lut value
  msm: camera: sensor: Remove true/false redefinitions
  msm: camera: reqmgr: Add support to modify timer for long exposure
  msm: camera: reqmgr: Add provision to obtain exposure time
  msm: camera: cpas: Fix TCSR Register programming
  msm: camera: cci: Fix cam_cci_get_subdev for conditional compilation
  msm: camera: utils: Remove deprecated clk_set_flag functions
  msm: camera: csiphy: Update DPHY combo mode sequence
  msm: camera: csiphy: Correct Dphy mission mode sequence
  msm: camera: core: Fix extraneous variable declaration
  msm: camera: icp: Remove qcom soc dependency
  msm: camera: sync: Dump fence info in case of fence exhaust
  msm: camera: icp: Use CAM_PERF for clock, bw related logs
  msm: camera: common: va_end should follow va_start
  msm: camera: common: Fix integer overflow in shift
  msm: camera: reqmgr: Remove division on uint64_t
  msm: camera: isp: Improve isp substate logging
  msm: camera: isp: Limit sof_in_epoch log to first frame
  msm: camera: jpeg: Add plane stride & slice height debug info
  msm: camera: isp: Change state immediately in flush
  msm: camera: isp: Dump isp req for cdm timeout
  msm: camera: ife: Add packing format support
  msm: camera: icp: Fix AHB, AXI voting in icp
  msm: camera: ife: Remove duplicate add to port counters
  msm: camera: csiphy: Update CPHY 3-phase registers for CSIPHY v1.2

Change-Id: I93948d5cfcf2c8dea921d34696456490abd6f1e5
Signed-off-by: Abhijit Trivedi <abhijitt@codeaurora.org>
2019-11-12 12:51:34 -08:00
Alok Pandey
69c67ebc90 msm: camera: ife: calculate accurate boot timestamp at CSID SOF
The boot timestamp is calculated in tasklet context. Due to system
performance and scheduling delay, it may vary. It is somtimes causing
failure for few time bound test cases.
To handle above problem, This change also considers qtime difference
to calculate accurate boot time at CSID each SOF.

CRs-Fixed: 2557758
Change-Id: I36b21a0f2c12cc1c83c209ab01ea90c0ac226995
Signed-off-by: Alok Pandey <akumarpa@codeaurora.org>
2019-11-07 21:32:19 -08:00
Karthik Jayakumar
524b1ab1d4 msm: camera: config: Makefile fixes to support legacy kernel build system
Adds fixes to makefile in order to support legacy kernel build systems.

CRs-Fixed: 2560543
Change-Id: Iab571871e5171aab501c41496cc09e3c5d942985
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2019-11-06 13:26:57 -08:00
Camera Software Integration
22c15f22e1 Merge "msm: camera: common: Fix integer overflow in shift" into camera-kernel.lnx.1.0 2019-11-06 07:07:52 -08:00