Commit Graph

8 Commits

Author SHA1 Message Date
Haochen Yang
ae91bc4768 msm: camera: sync: Add extra support for monitor dump
Add monitor dump when dma/synx is already in signaled
state or has registered a cb, and when sync fails to
signal its corresponding dma/synx.

CRs-Fixed: 3350863
Change-Id: I4b52647f1d3f53eff119df1ab143be6848dd0d5d
Signed-off-by: Haochen Yang <quic_haocyang@quicinc.com>
2023-03-09 23:36:05 -08:00
Atiya Kailany
b5af93e730 msm: camera: sync: Sync Driver Null Pointer Fix
Fixed null pointer dereference and uninitialized index variable.

CRs-Fixed: 3394193
Change-Id: I4a77060e227a9b39bb127c041515481549a99a42
Signed-off-by: Atiya Kailany <quic_akailany@quicinc.com>
2023-02-24 21:06:22 -08:00
Karthik Anantha Ram
d4731aa3fb msm: camera: sync: Enhance synx/dma fence drivers
The change addresses race conditions stemming from releasing
internal row lock prior to invoking synx APIs. The change
also deregisters dma/synx callbacks if the corresponding
fences are signaled when the associated sync object is signaled.
The change also cleans up & reorganizes functions.

CRs-Fixed: 3403341
Change-Id: I32995900e31ba73eac6b44d2238808f8e6c23f9a
Signed-off-by: Karthik Anantha Ram <quic_kartanan@quicinc.com>
2023-02-16 18:36:11 -08:00
Haochen Yang
26dfb39090 msm: camera: sync: Fix bugs related to monitor information
Release spinlock before calling synx APIs.

CRs-Fixed: 3350863
Change-Id: I156a70b18c76f4a2f30de70c23d44032bdf8f571
Signed-off-by: Haochen Yang <quic_haocyang@quicinc.com>
2023-02-15 19:06:39 -08:00
Pavan Kumar Chilamkurthi
07b3c215a1 msm: camera: sync: Add monitor information for sync objects
Monitor sync object operations such as create, register callback,
signal, unregister callback which is useful in debugging. Introduce
debugfs to dynamically set the monitor mask. Apply dump on error
when CAM_GENERIC_FENCE_TYPE_xx is set in cam_sync_monitor_mask and
apply dump on release when CAM_GENERIC_FENCE_TYPE_xx_DUMP is also set
at the same time. Apply dynamic memory allocation for monitor data
in synx and dma. Refactor APIs into generic ones and add memory
checkings.

CRs-Fixed: 3350863
Change-Id: I70cfdc1215be5f6bf564c672a874e6ba7997cdfa
Signed-off-by: Pavan Kumar Chilamkurthi <quic_pchilamk@quicinc.com>
Signed-off-by: Haochen Yang <quic_haocyang@quicinc.com>
2023-02-08 20:06:10 -08:00
Karthik Anantha Ram
8b2265fe1f msm: camera: sync: Release spinlock prior to calling synx
Mutex is the synchronization primitive used in synx, which
can sleep. Holding the spin lock and invoking synx APIs could
deadlock the system. Release spin lock and invoke synx driver.

CRs-Fixed: 3365172
Change-Id: I01291fdd96df772f4cb1d87a44d79dd4a62fdc26
Signed-off-by: Karthik Anantha Ram <quic_kartanan@quicinc.com>
2023-01-05 17:36:09 -08:00
Karthik Anantha Ram
c8ee871fdf msm: camera: sync: Update global synx property
Currently all synx handles need to be global. Update
synx create params accordingly.

CRs-Fixed: 3351015
Change-Id: I58d6f927b5a7c1508a34a64c916ca3c9fbb1de49
Signed-off-by: Karthik Anantha Ram <quic_kartanan@quicinc.com>
2022-12-06 11:36:47 -08:00
Petar Nedev
f22f48c91f msm: camera: sync: Add support for synx objects
Add support to create, release, signal and import a synx object
using the existing generic fence operations. Handle signaling of
underlying synx object when a sync object is signaled & vice versa.

CRs-Fixed: 3317280
Change-Id: Ia6fac6eb732ed7091ec62f04875bdb30d88c8676
Signed-off-by: Petar Nedev <quic_pnedev@quicinc.com>
2022-10-27 17:06:36 -07:00