Add memmgr interface and support to allocate buffers from
ubwcp heap.
CRs-Fixed: 3197463
Change-Id: Ic3368e5ff81710dba795c9625f9a461833f915e3
Signed-off-by: Pavan Kumar Chilamkurthi <quic_pchilamk@quicinc.com>
Add ioctl interfaces to support dma begin and end cpu access
operations for camera buffers.
CRs-Fixed: 3197463
Change-Id: Ibeb31e8f425489abfdd47df6f92271ac40ace407
Signed-off-by: Pavan Kumar Chilamkurthi <quic_pchilamk@quicinc.com>
For dma buffer profiling,we don't konw the owner of one dma
buffer. So we add it's name to show it's owner.
If you use v1 struct to alloc/map dma buffer it will use
default buffer name "UNKNOWN". For v2 struct you can set dma
buffer name at UMD side.
CRs-Fixed: 3131442
Change-Id: I24ce6aa1d97cd9fc26d9bd8796ab2367607008f6
Signed-off-by: Fengjie Chen <quic_fengjiec@quicinc.com>
This change adds a link properties opcode to get
the property level configuration, we can define
different properties and do some special process
per link in CRM.
Also add a new error code to indicate the error
of streaming off.
CRs-Fixed: 3163906
Change-Id: I7ebb54e5148fb10f74a710a95aeb7ca10d83be71
Signed-off-by: Depeng Shao <quic_depengs@quicinc.com>
When KMD faces overflow errors, it will try internal recovery
first, every time KMD do internal recovery, it notifies to UMD
to do according process.
CRs-Fixed: 3131351
Change-Id: I06e7dc3c258b12fc2865d3383280a456b42c2163
Signed-off-by: chengxue <quic_chengxue@quicinc.com>
When set, buffers will be mapped within 32-bit region
address space and in patching, if Shared or CmdBUffer is
not set for such buffers - patch the value with right shift
by 8. kmd does as below.
Map:
Shared or CmdBuffer : Mapped within 32bit.
HwAndCDMOrShared : Mapped within 32bit
others(HwAccess) : Mapped within 40bit
Patching:
Shared or CmdBuffer : as is
HwAndCDMOrShared : iova >> 8
others (HwAccess) : iova >> 8
Shared/CmdBuffer takes precedence over HwAndCDMOrShared.
CRs-Fixed: 3128094
Change-Id: Ifd9f5beaf2659f77544cd0722ef7f60d6c0684a7
Signed-off-by: Pavan Kumar Chilamkurthi <quic_pchilamk@quicinc.com>
Add data struct for reporting v4l2 event on page
fault. Upon receiving the event, userspace is
expected to abort, and all kernel drivers are shut
down. when Titan power on the next session, CAMSS
will undergo async reset.
CRs-Fixed: 3109439
Change-Id: I518148baa2414fd072b874200a408589332f95ec
Signed-off-by: sokchetra eung <quic_eung@quicinc.com>
Add support for Missing EOT and long packet corruption
error codes.
CRs-Fixed: 3026930
Change-Id: I10088e0aff95782d8fa9ceff0e73ecf08b6a02dd
Signed-off-by: Jigar Agrawal <quic_jigar@quicinc.com>
To reduce traffic for shutter notification, sof and boot
sof timestamps are sent in a unified v4l2 event.
Thereby, reducing the event notification traffic by 50%.
CRs-Fixed: 3040374
Change-Id: Ib4580e0a4df7c3d1cb892fdf3254272d3134d4cb
Signed-off-by: Pranav Sanwal <psanwal@codeaurora.org>
Add support for more error codes in the kernel code to
report more errors to user.
CRs-Fixed: 3026930
Change-Id: I430b26c285f1c9fcf0a4d7bb9a618bbbf7bf0662
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
Handle apply failure in workqueue. Add recovery mechanism
to recovery in req_mgr to handle frame out of sync issue.
CRs-Fixed: 2997164
Change-Id: I0e04571b3a31d7a879a7aa579c1f0be51c233277
Signed-off-by: Ayush Kumar <ayushkr@codeaurora.org>
Add uapi structure to add support for enforcing the size
restriction on JPEG thumbnail images.
CRs-Fixed: 2999106
Change-Id: Icee615eb5674b3f0869631a57eed0d46aa6c2799
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
Add support to allocate such buffers which need to accessed
by non-pix VM.
CRs-Fixed: 2981372
Change-Id: Iac965a479e05d638c6323bfacd7c6a4d89f2a223
Signed-off-by: Rishabh Jain <risjai@codeaurora.org>
Add new tpg subdev driver. This change exposes the tpg hw as a new
subdev similar to that of a sensor driver.
CRs-Fixed: 2973850
Change-Id: I6fdb4457d8cc829546896f26bdde8765a4258e7c
Signed-off-by: Tony Lijo Jose <tjose@codeaurora.org>
Propagate error code to user in order to let the
user know more about the failure.
CRs-Fixed: 2860306
Change-Id: Icf030aa9df32eac97371059c2d282cfb53257401
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
Add support to increase the number of available handles
in CRM to 256.
CRs-Fixed: 2811740
Change-Id: I16d05e85302f273ccb2b22ec882c07f9b515694d
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
Adds support for camera kernel driver source being moved to Vendor SI.
CRs-Fixed: 2835738
Change-Id: Ibb876edb1284bc77c366c3ef9e1ee9a39981c960
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
msm: camera: cdm: Fix dangling pointer issue
msm: camera: cdm: change work record to atomic variable
msm: camera: utils: Adding device type to track device handles
msm: camera: tfe: Reduce stack footprint during bw vote
msm: camera: req_mgr: Thread switch delay detection mechanisms
msm: camera: cdm: Avoid submitting BL if FIFO is full
msm: camera: tfe: check cdm hang in the tfe config timeout
msm: camera: req_mgr: Delay detection mechanism
msm: camera: cdm: Debug info in case of cdm page fault
msm: camera: isp: Max context reduction for TFE in isp driver
msm: camera: ope: Maintain current clock value during acquire
msm: camera: req_mgr: Limit CAM_ERR log in case of no empty task
msm: camera: cdm: Decrement write-count only after Bl commit
msm: camera: isp: Added CSID recovery mechanism.
CRs-Fixed: 2792394
Change-Id: I1c7a903ae15b572acf3f6318cda7394cb6549c8d
Signed-off-by: Tejas Prajapati <tpraja@codeaurora.org>
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>
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>
Currently when page fault happen, iommu driver callers camera
handler with CB details and iova address which caused the page
fault. With iommu iova address cam smmu driver finds the
closest mapping address for that cb and call the
corresponding driver to find the which port caused page fault.
This has limitation has page fault address always not mapped.
New approach is get the page fault ids from iommu driver.
Based on the Pid and Mid values, get the HW id and port ids,
go through all context which has this hw id and port id and log
the data. Once context id is identified, log the acquire data and
last consumed client address details. Dump the hw register data
in the given buffer. Send the smmu page fault event through
v4l2 queue to user.
CRs-Fixed: 2750690
Change-Id: I87c809b3229992c7c95655a4f3c6c70ebc035ae8
Signed-off-by: Ravikishore Pampana <rpampana@codeaurora.org>
CSID is not able to recover from the fatal errors like lane
overflows, continuous unbound frames or ESD errors. To recover
from such errors, it is necessary to restart the sensor as
just starting the ISP hw do not make any change as the sensor
can still be in bad state.
This commit implements tasklet based CSID recovery mechanism.
On detecting an error in CSID interrupt, tasklet is scheduled
which in turn will call the ISP hw manager to notify the ISP
context, from here a notification is sent to CRM to send a
message to trigger full recovery. This full recovery includes
the sensor release and start.
This feature is debugfs based. Based on need this can be turned
on.
CRs-Fixed: 2642216
Change-Id: Iecf9916d3672d71a1367886cc934b5a2b148f918
Signed-off-by: Gaurav Jindal <gjindal@codeaurora.org>
Signed-off-by: Vishalsingh Hajeri <vhajeri@codeaurora.org>
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
Add provision in CRM link control to accept any long exposure
timeout value so that CRM can modify it's internal WD timer
during link activate.
CRs-Fixed: 2706105
Change-Id: Icedeeef32dcc5c881277f28dc2c0fbb40fa1e7f1
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
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>
Aligns the uapi header types and includes to be in-line with upstream
kernel formatting. The errors are given by enabling the UAPI_HEADER_TEST
config, which is now enabled in GKI builds.
CRs-Fixed: 2679250
Change-Id: I195fb2aab9251043fc63d79dd31f2db53b1228f5
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
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.
To debug the cause for this situation and to dump
the information, user space sends a dump command to the
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 implements the framework for traversal
across the RT and NRT devices.
CRs-Fixed: 2602180
Change-Id: I7e24006c20c23bfab163a2ad13b4ac6e2913bb9e
Signed-off-by: Gaurav Jindal <gjindal@codeaurora.org>
Add event type to be notify custom events from the custom
driver. Also adds a new custom message definition.
CRs-Fixed: 2569823
Change-Id: I2ff701e79949ac3a467cbfe0c704065dbf0dc759
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
Add interface to umd to give an option whether to
disable Delayed Unamp feature for a given buffer
mapping. DelayedUnmap is enabled by default if
umd doesn't explicitly asks for disable.
CRs-Fixed: 2580128
Change-Id: I66f87a9dbdfc4d9cecdc02eb24c1c670c9985cae
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
TFE is thin front end hardware that capture and process the
real time image. Support is added to enable the TFE
hardware.
CRs-Fixed: 2545590
Change-Id: Ie8efef77fabeeea28d70380c398089e6351e35e3
Signed-off-by: Ravikishore Pampana <rpampana@codeaurora.org>
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
OPE is camera offline engine, support is added
to enable camera OPE hardware.
CRs-Fixed: 2520602
Change-Id: I8b08ecb34323ee927f2be88707ad65ad2444447d
Signed-off-by: Suresh Vankadara <svankada@codeaurora.org>
Signed-off-by: Ravikishore Pampana <rpampana@codeaurora.org>
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
Added a camera subfolder for the UAPI headers to be located in.
This prevents the camera UAPI headers from overwriting upstream kernel
headers.
CRs-Fixed: 2554484
Change-Id: Ie1edbfe585bbd428a6e5d1a40b438d22bd7c06c0
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>