Commit graph

9 Commits

Autor SHA1 Nachricht Datum
Pavan Kumar Chilamkurthi
6f4df6ad50 msm: camera: memmgr: Add 4K padding for shared buffers
Due LX7 cache requirement, buffers need 4K padding at the
end. Allocate accordingly, this is hidden from user mode
driver and umd never uses this extra 4K memory.

CRs-Fixed: 2722486
Change-Id: I3b327ab3615eee30d17c95e23703024ff7446648
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2021-01-20 17:12:14 -08:00
Pavan Kumar Chilamkurthi
68eda98831 msm: camera: memmgr: Add dma-buf-heaps usage in camera
Use dma-buf-heaps for allocating buffers. Keep ion usage
to support kernels without dma-buf-heaps support.

CRs-Fixed: 2852327
Change-Id: I3ebcb591827d9b8e5366f716efd08e4cd6f1070a
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
2021-01-13 01:06:14 -08:00
Pavan Kumar Chilamkurthi
a702cc226a msm: camera: smmu: Add support to force all CACHED
Add implementation to allow forcing all camera buffer allocations
to be CACHED and mapped as CACHED while iommu_map. This
is enabled based on DT property. Force this only if
io-coherency is enabled. Validations are added to make sure
a correct combination of "force_cache" and "io-coherency"
properties are mentioned in DT.

CRs-Fixed: 2814719
Change-Id: I0d291ce199f523d67e8cd0105386cc63a671806e
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
2020-11-08 14:07:43 -08:00
bohahuan
9d1e44a94f msm: camera: memmgr: increase max slot count into 2048
In case large memory slot usage scene like MFHDR, MFSR.
increase kernel slot count to avoid out of memory issue.

CRs-Fixed: 2718732
Change-Id: I49dd2d9bdda548d5f95fa49c290364ecb6d40f6e
Signed-off-by: bohahuan <bohahuan@codeaurora.org>
2020-09-08 19:56:32 -07:00
Alok Chauhan
23fc6a670c msm: camera: common: Define debugflag to allocate usecase info
Define debug flag to allocate usecase info for debug purpose.
This flag can be used to get usecase buffer index at issue
time.

CRs-Fixed: 2707314
Change-Id: Iffacdb48f77ec6907b8070d4c19eb1c56be30f14
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
2020-08-20 14:57:32 +05:30
Karthik Anantha Ram
ec23ff584a msm: camera: smmu: Enhance debug capability for camera memmgr
Improve debugging infrastructure and logging for memory related
issues. There are scenarios where the fd returned after ion_alloc
exists in camera smmu table as being mapped [stale entry].
On such scenarios, this change will return a specific error code to
userspace. The change also propagates the mapped size back to
user space.

CRs-Fixed: 2663114
Change-Id: Ia797b65d1e8ded58dec5b01df07d73262c4cfa95
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
2020-06-08 10:42:33 -07:00
Karthik Jayakumar
a68684d77c msm: camera: mem_mgr: Cache invalidation optimization
During unmap these internal buffers will be freed immediately
afterwards, therefore there is no need to do cache operation.

CRs-Fixed: 2627074
Change-Id: Ica4ebb93eb212604268c3450a92d075197783537
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2020-06-08 09:41:21 -07:00
Pavan Kumar Chilamkurthi
1b644126dd msm: camera: smmu: Profile time taken for map, unmap
Add debugging capability to profile ion alloc,
smmu map and unmap calls. Enable below debugfs settings
to get the traces with corresponding latencies.
Alloc      : echo 1 > /sys/kernel/debug/camera_memmgr/alloc_profile_enable
Map, Unmap : echo 1 > /sys/kernel/debug/camera_smmu/map_profile_enable
Capture the profiling numbers in traces.

CRs-Fixed: 2538876
Change-Id: I92dc58416a9febc77a7836b8f7b1523b547c128f
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
2020-04-27 13:23:55 -07:00
Jigarkumar Zala
05349feaa2 Camera: Bring over camera driver changes
Bring over camera driver changes as of msm-4.19
commit  5a5551a7 (Merge "msm: camera: reqmgr: Fix CRM
shift one req issue").

Change-Id: Ic0c2b2d74d1b3470c1c51d98228e312fb13c501a
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2019-07-08 10:24:55 -07:00