Grafik Komit

39 Melakukan

Penulis SHA1 Pesan Tanggal
sokchetra eung
d74e00016b msm: camera: uapi: Modify PF event Macros
Split the buffer CDM_SHARED Page Fault event macro in UAPI
into two - CDM Page Fault event and Shared Page Fault
event macros.

CRs-Fixed: 3156671
Change-Id: I450e270c4f0421d0ed3c5fe30458e3052594b236
Signed-off-by: sokchetra eung <quic_eung@quicinc.com>
2022-03-29 10:06:15 -07:00
chengxue
c733f90dd6 msm: camera: uapi: Add message type for kmd internal recovery
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>
2022-03-03 14:31:39 -08:00
Pavan Kumar Chilamkurthi
3ea1c2ad59 msm: camera: smmu: add new flag to indicate Hw, CDM access
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>
2022-02-14 20:07:09 -08:00
sokchetra eung
a27ab6d632 msm: camera: uapi: Add PF msg struct
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>
2022-01-19 16:06:50 -08:00
Jigar Agrawal
31ccd86693 msm: camera: reqmgr: Add more error codes in uapi file
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>
2021-12-03 12:25:36 -08:00
Camera Software Integration
e15c969d3b Merge "msm: camera: uapi: Add new event causes" into camera-kernel.lnx.5.0 2021-10-06 17:45:45 -07:00
sokchetra eung
56e4765c6a msm: camera: uapi: Add new event causes
Add new sync event causes for ICP, ISP, JPEG.
Add new ICP V4L2 error events.

CRs-Fixed: 3035452
Change-Id: Ie3a12281e7e6eeadc8361ba050ff51bdf80c4e65
Signed-off-by: sokchetra eung <eung@codeaurora.org>
2021-10-04 10:25:36 -07:00
Pranav Sanwal
0ddfe2d482 msm: camera: isp: Reduce traffic for shutter notification
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>
2021-09-30 18:05:29 +05:30
Camera Software Integration
dec6040daa Merge "msm: camera: reqmgr: Add more error codes in uapi file" into camera-kernel.lnx.5.0 2021-09-27 17:09:57 -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
Jigar Agrawal
09cb87689f msm: camera: reqmgr: Add more error codes in uapi file
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>
2021-09-16 17:50:15 -07:00
Ayush Kumar
f428aed04a msm: camera: req_mgr: Handle apply failure
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>
2021-08-19 07:54:50 -07:00
Jigar Agrawal
b8951526bf msm: camera: jpeg: Add UAPI support for JPEG retry mechanism
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>
2021-08-10 10:56:10 -07:00
Savita Patted
769d026c3a Merge "msm: camera: memmgr: Add support for non pix secure buffers" into camera-kernel.lnx.5.0 2021-07-08 18:59:30 -07:00
Rishabh Jain
e2c7402dfd msm: camera: memmgr: Add support for non pix secure buffers
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>
2021-07-06 11:31:00 +05:30
Savita Patted
9e5e021304 Merge "msm: camera: sensor: Add tpg driver support" into camera-kernel.lnx.5.0 2021-07-01 15:29:06 -07:00
Ayush Kumar
e8e814eda9 msm: camera: req_mgr: CRM Code refactoring
Due to major changes in CRM code, refactoring CRM
kernel driver code. Fix apply threshold calculation logic.

CRs-Fixed: 2783209
Change-Id: I08ba6c89b0d4f0e982c017bab4226a569327f861
Signed-off-by: Ayush Kumar <ayushkr@codeaurora.org>
2021-06-29 18:18:35 +05:30
Tony Lijo Jose
caa6b2a1a4 msm: camera: sensor: Add tpg driver support
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>
2021-06-29 00:44:14 -07:00
Jigar Agrawal
76857940be msm: camera: reqmgr: Propagate hw failures to user
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>
2021-04-19 19:07:15 -07:00
Vikram Sharma
120169c774 msm: camera: cre: Add UAPI changes for CRE driver
This change adds UAPI interface file for CRE driver

CRs-Fixed: 2893978
Change-Id: I46b29755e1c7d9352d86250dbf6e7e31ab2ead0b
Signed-off-by: Vikram Sharma <vikramsa@codeaurora.org>
2021-03-14 16:58:00 +05:30
Jigar Agrawal
b621d13226 msm: camera: reqmgr: Add support to increase the crm handles
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>
2021-03-03 18:18:42 -08:00
Karthik Jayakumar
8c2e1cab8f msm: camera: config: Makefile update to support GKI 2.0
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>
2021-01-11 10:11:37 -08:00
Tejas Prajapati
4574450a12 msm: camera: common: Merge camera-kernel.3.1 changes in camera-kernel.4.0
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>
2020-10-13 12:08:01 +05:30
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
Haritha Chintalapati
28c2e8b5ef Merge "msm: camera: common: Define debugflag to allocate usecase info" into camera-kernel.lnx.4.0 2020-08-25 16:42:58 -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
Ravikishore Pampana
b746c4f527 msm: camera: core: Send event on smmu page fault
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>
2020-08-19 14:16:38 +05:30
Gaurav Jindal
5f7b7386cf msm: camera: isp: Added CSID recovery mechanism
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>
2020-07-20 18:02:12 -07:00
Camera Software Integration
5d4113257c Merge "msm: camera: smmu: Enhance debug capability for camera memmgr" into camera-kernel.lnx.4.0 2020-06-18 17:19:03 -07:00
Karthik Anantha Ram
9f37871064 msm: camera: reqmgr: Add provision in UAPI for INIT exp timeout
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>
2020-06-10 16:13:19 -07:00
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
c6096c4e35 msm: camera: uapi: Support for UAPI_HEADER_TEST config
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>
2020-05-21 21:35:50 -07:00
Gaurav Jindal
d95d140d40 msm: camera: req_mgr: LDAR Debug framework implementation
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>
2020-02-05 10:50:23 -08:00
Karthik Anantha Ram
54440e3bb1 msm: camera: reqmgr: Add uapi for new v4l2 event type
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>
2020-02-03 13:52:30 -08:00
Pavan Kumar Chilamkurthi
74bb0d5750 msm: camera: memmgr: Add support to disable DelayedUnmap
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>
2019-12-23 09:26:54 -08:00
Pavan Kumar Chilamkurthi
6b265f1750 msm: camera: tfe: Add uapi 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: 2545590
Change-Id: Ie8efef77fabeeea28d70380c398089e6351e35e3
Signed-off-by: Ravikishore Pampana <rpampana@codeaurora.org>
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
2019-12-02 15:49:19 -08:00
Pavan Kumar Chilamkurthi
f5203c1106 msm: camera: ope: Add uapi support to OPE driver
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>
2019-12-02 15:49:10 -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
Karthik Jayakumar
8d6ec3bf3c msm: camera: uapi: Add camera subfolder
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>
2019-11-01 14:03:03 -07:00