Gráfico de commits

22 Commits

Autor SHA1 Mensaje Fecha
Anand Ravi
0417e88967 msm: camera: req_mgr: Allow request cancellation if not applied to IFE
Since we don't wait for requests to be ready on lower pd devices before
applying request on higher pd devices, add provision to cancel request
if it has not been applied on IFE.

CRs-Fixed: 3014942
Change-Id: I8850b0dfe3f88e04b86f7bb6b597657ad7e0a4f9
Signed-off-by: Anand Ravi <ananravi@codeaurora.org>
2021-09-27 14:41:03 -07:00
Depeng Shao
c8ac17dee6 msm: camera: reqmgr: Fix request sync issues
Fix several request sync issues.

CRs-Fixed: 3029196
Change-Id: I92b4048b392fa19e2c9748a5ee0efd9ef0b4e680
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2021-09-20 13:04:31 +08:00
Mukund Madhusudan Atre
5dba22d1fc msm: camera: common: Add buffer send and receive mechanism
Add packet based buffer send and retrieve mechanism for
presil testing.

CRs-Fixed: 2932495
Change-Id: Ifd1e0fdb8b12feabb884e02a07a3813db01a3899
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2021-09-09 12:41:00 -07:00
Anand Ravi
ff11552d04 msm: camera: isp: Logging improvements to ISP context
Reduce number of logs printed by ISP and custom contexts for each
packet. Also move sync related error logs to debug logs.

CRs-Fixed: 2977145
Change-Id: Icf22eefdf0ae1d6ef006272f95352ae65cbf3b34
Signed-off-by: Anand Ravi <ananravi@codeaurora.org>
2021-07-19 11:38:22 -07:00
Karthik Anantha Ram
d785949196 msm: camera: common: Change shutdown sequence for subdevices
In subdev close call if CRM is still active wait for shutdown
from CRM [media device]. Remove subdevice check for active
handles, shutdown to happen irrespective of any active context.

If CRM is not active, subdevice shutdown should ensure there is
no access to kernel allocated buffers since at this point
memmgr is de-initialized.

As part of ICP close, remove usage of HFI queues, trigger PIL
to transfer FW memory ownership back to HLOS and power off ICP.

CRs-Fixed: 2976107
Change-Id: Ib05b3fbdcc33f4072da7ef77cf0118a807860e8c
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2021-06-30 17:04:11 -07:00
Savita Patted
68de607556 Merge "msm: camera: req_mgr: Enhance camera v4l2 subdev shutdown sequence" into camera-kernel.lnx.5.0 2021-06-21 18:38:47 -07:00
Ayush Kumar
0259331da4 msm: camera: req_mgr: Re-design CRM to support multi links in sync mode
This change is to support multi links in sync mode. Supports dynmanic
switching to select master link in rtb and sat use case in sync mode.
Supports sync logic for rtb and sat use case in sync mode. Apply
requests for all links is triggered only on master epoch. Supports
bubble recovery and sync logic for different pd links in sync mode.

CRs-Fixed: 2783209
Change-Id: I81d1d0d37aa0d6e18c19ca87eac51ef3f160abfb
Signed-off-by: Ayush Kumar <ayushkr@codeaurora.org>
2021-06-04 20:23:00 +05:30
Alok Chauhan
2ebae4fabe msm: camera: req_mgr: Enhance camera v4l2 subdev shutdown sequence
when provider crash occurred, there was a CSID lane overflow
observed due to shutdown sequence from CRM(sensor, csid, csiphy).
To fix the issue need to change the shutdown sequence
(csid, sensor, csiphy).

This change will update the devices sequence in order while registering
and close the sequence accordingly.

CRs-Fixed: 2852076
Change-Id: Ia6d8022e995823bf031400c33528eb8544dc2e29
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
2021-04-14 05:20:37 -07:00
Depeng Shao
a8fce31f3f msm: camera: reqmgr: Handle flash properly
Apply the flash at EOF and apply the other devices
at the EPOCH of next frame, then the flash can
cover all the exposure zone of current request.
Add the inject delay for SOF and EOF separate,
then we can use inject delay for more flexible
frame skip control.

CRs-Fixed: 2820683
Change-Id: Ic6a58327a0ae44c54190884ba42ea7926ec7c90e
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2021-03-18 15:30:48 +08:00
Gaurav Jindal
1a5797c6a8 msm: camera: common: Optimize cam context memory
In current implementation, cam_ctx_req has a array of
hw_update_entries, in_map_entries and out_map_entries. Each
context has array of N requests. Memory for all contexts is
allocated during probe. This causes a huge memory remaining
unutilized.
This commit moves the memory allocation to context acquire time
and freeing this memory during context release. In place
of using array, now dynamic allocation is used.
A top level calculation shows a memory reduction of around 2M-
2.5M with this change including all the camera drivers.

CRs-Fixed: 2830502
Change-Id: Id63cf2a52272e2a419704dc95100694e384330c3
Signed-off-by: Gaurav Jindal <gjindal@codeaurora.org>
2021-01-06 06:53:08 -08:00
Karthik Anantha Ram
9ada4e4a26 msm: camera: custom: Add support for bubble handling
Add support for bubble handling in custom driver allowing
the custom block to re-apply bubbled request in sync with IFE.

CRs-Fixed: 2805278
Change-Id: I411d033f2470de3fab7587c7c019a933bda28020
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2020-11-05 09:53:54 -08:00
Alok Chauhan
baf2d520ed msm: camera: sync: Rearrange sync reason events
Rearrange sync error reason code for better code
readability.

CRs-Fixed: 2750553
Change-Id: Ia64694155921c074946167763815a87beb856b35
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
2020-08-24 13:48:40 +05:30
Alok Chauhan
1d1edb7030 msm: camera: sync: Add SYNC_V4L_EVENT_V2 support in sync driver
Add SYNC_V4L_EVENT_V2 support in sync driver. As part of this
change, added the reason code field as part of sync event header.
This failure reason code is filled by camera kernel driver and
propagate to userspace.

CRs-Fixed: 2750553
Change-Id: I206d0d51c38cfe4214814b89d241f51c1f50605b
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
2020-08-16 11:14:20 +05:30
Fernando Pacheco
0d784286a9 msm: camera: common: Avoid uninitialized accesses
Improve the error-handling code paths to prevent accesses to
uninitialized variables. This is done by either picking a sane
default for the variable or skipping accesses altogether after
an unsuccessful attempt to initialize.

CRs-Fixed: 2748220
Change-Id: Ibe383e56ec4e3f45f76f619c7d6b62c3d7dfcadb
Signed-off-by: Fernando Pacheco <fpacheco@codeaurora.org>
2020-08-06 13:41:05 -07:00
Depeng Shao
c782e8c3ab msm: camera: reqmgr: Add notify frame skip interface
This change adds support to notify frame skip when CRM
not ready to apply a normal setting. Sensor and custom
device also want to update the HW settings in some
conditions even if a frame is skipped.

CRs-Fixed: 2691642
Change-Id: Ibd2b22655d0f6b6c90663df75a0f5fad8565e918
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2020-07-14 18:45:30 +08:00
Karthik Anantha Ram
02af3487fa msm: camera: custom: Add support for SW sync & snapshot
Add support to handle SW sync & ZSLSnapshot. Add substate machine
and mechanism to handle the lifecycle of requests based on irqs
accordingly.

CRs-Fixed: 2524308
Change-Id: Ie5ba97d4ae1b38f4b44c2d3935d2882df59fcac6
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2020-06-04 10:17:55 -07:00
Karthik Anantha Ram
f81a46003b msm: camera: reqmgr: Invoke custom device at every frame
If there is a valid request CRM will apply that request to the
custom device, in scenerios during which there is no setting to
be applied to a custom device at a given epoch CRM needs to invoke
the custom device to program default settings for the next frame.

CRs-Fixed: 2524308
Change-Id: I4701c602ab68b9f64266f03a9b200d15a808165e
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2020-06-03 16:44:50 -07:00
Pavan Kumar Chilamkurthi
74410fea6b msm: camera: sync: Add SYNC_CANCEL support in sync driver
Add SYNC_CANCEL definition and signal CANCEL instead of
ERROR in flush cases.

CRs-Fixed: 2673810
Change-Id: I1bd83e382f9b38f5f020a5af3b883083e211e3d2
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
2020-05-20 12:48:36 -07: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
a27592f01b msm: camera: custom: Add support for acquire_hw_v1
Split the acquire in custom node to acquire device and
acquire hw to be in line with IFE for multicamera usecases.

CRs-Fixed: 2524308
Change-Id: I7be7d5227dcd304d095d7e3d7fac32800fecc199
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2019-11-20 14:49:25 -08:00
Venkat Chinta
aaab1ef87e msm: camera: isp: Stop HW immediately in flush
When the userspace issues flush, ISP driver needs to ensure that
wait and active list requests are flushed and corresponding
buffer fences are signaled with error. For active and wait lists
IFE hardware is stopped immediately. Therefore IFE must also be
reset to ensure that VFE BUS FIFOs are cleared. Start IFE HW
after receiving init packet again.

CRs-Fixed: 2513939
Change-Id: I9a35ce05c24d6b63016e264a870d376eabb2b56f
Signed-off-by: Venkat Chinta <vchinta@codeaurora.org>
2019-10-01 13:45:42 -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