Commit gráf

17 Commit-ok

Szerző SHA1 Üzenet Dátum
Li Sha Lim
e63d6d6cb3 msm: camera: cdm: Add support for CDM 2.2
Added support for new cdm status register for SM8650.

CRs-Fixed: 3147223
Change-Id: I35392cfb35613a777664e1fae2c24b0150c5b8ef
Signed-off-by: Li Sha Lim <quic_lishlim@quicinc.com>
2022-04-13 17:06:34 -07:00
Jigar Agrawal
3c8d5b58ea msm: camera: cdm: Remove Kernel Internal Buffer for Gen IRQ
Currently we allocate the memory for CDM GENIRQ command
within the Kernel on every stream on. Presil framework
do not have an ability to transfer the kernel only buffers
to the user daemon. For that reason we need to add support
to use the user allocated command buffer instead of the
kernel generated memory to add the GenIRQ cdm command
while submitting BLs. This change also helps to reduce
the stream on and stream off latency by not having to
allocate and free the GENIRQ memory on every stream on and
stream off respectively.

CRs-Fixed: 3115399
Change-Id: Ic159efd56fb9c4480ed1eb25cf2c058cbb914332
Signed-off-by: Jigar Agrawal <quic_jigar@quicinc.com>
2022-03-31 17:36:35 -07:00
sokchetra eung
4ae959b7b8 msm: camera: cdm: CDM page fault handling improvement
Modify sequence of CDM page fault handling to include pausing
cdm, setting global CDM PF bit, and streaming off all clients.
It also reduces PF handling latency by omitting CDM HW reset when
calling CDM stream off. While handling page fault, the faulted CDM
hw would not service all APIs to clients (except release) until all
clients release the CDM.

CRs-Fixed: 3156647
Change-Id: I3532bf68ba59800b2084dee252d7fd0807e0c68a
Signed-off-by: sokchetra eung <quic_eung@quicinc.com>
2022-03-30 16:06:31 -07:00
Jigar Agrawal
b9cc540346 msm: camera: cdm: Fix the CDM Reg dump
Fix the CDM register dump and the command buffer dump.

CRs-Fixed: 3115371
Change-Id: I8b047f365187362593038724b29b98f1f40e47df
Signed-off-by: Jigar Agrawal <quic_jigar@quicinc.com>
2022-01-26 23:06:23 -08:00
Pavan Kumar Chilamkurthi
1fa1a77a37 msm: camera: cdm: Add support for testing irq line
Trigger cdm reset to test irq line on presil platforms.

Use below command to trigger after boot up.
echo 1 > /d/camera/cdm/test_irq_line

IRQ line verification can also be done at bootup if
CONFIG_CAM_TEST_IRQ_LINE_AT_PROBE is defined during
compilation.

Both above are valid if CONFIG_CAM_TEST_IRQ_LINE is
enabled during compilation.

CRs-Fixed: 3071027
Change-Id: I9e8c559cd954dfdcfc9b536366e622a03efe1672
Signed-off-by: Pavan Kumar Chilamkurthi <quic_pchilamk@quicinc.com>
2021-12-23 01:14:45 -08:00
Jigar Agrawal
42d92dea61 msm: camera: cdm: Correct the CDM iommu handle
Correct the CDM iommu handler by changing the
false pid and mid values written in the cdm
header file. Also, adding a support to read the
pid and mid from the dtsi file, since there is
already support for the PID values available in the
dtsi.

CRs-fixed: 2982542
Change-Id: I319a32fdcba44a6a96b79e4e67b0a2cc0e01bc4c
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-09-29 12:55:45 -07:00
Vikram Sharma
57bff5aede msm: camera: ope: Handle OPE smmu fault with pid info
Kernel apis provide information fault caused pid and mid data.
Handle the OPE smmu fault using pid and mid data. Based on the
mid data, dump only corresponding port info which caused the
fault. Pid and mid values are target dependent, these values
will be updated on the ope node dt entries.

CRs-Fixed: 2857868
Change-Id: I909f1787e71e67e5ed1d3464dfeb506418d151e4
Signed-off-by: Vikram Sharma <vikramsa@codeaurora.org>
2021-02-24 23:40:40 -08:00
Jigar Agrawal
bfab1a634a msm: camera: cdm: Improve cdm debug registers dump
Improve the cdm debug register dump to dump more
registers and more information.

CRs-Fixed: 2874806
Change-Id: Ica9a5b63bbb30c59463c6b2c0115a452def0fcf8
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-02-09 17:49:28 -08:00
Alok Chauhan
63bca8c33d msm: camera: cdm: Improve error handling during cdm hang
Reduce logging as part of error handling to avoid
flooding kernel log with excessive log. Apart from
that send feedback to client irrespective of cdm
reset status.

CRs-Fixed: 2826285
Change-Id: I9b0d8c6f64ced4972bb20e26774508573c815e4f
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
2020-12-02 10:38:53 +05:30
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
Jigar Agrawal
d74902f0cf msm: camera: cdm: Add CDM hang detect and debug registers dump support
Add support to dump the cdm core debug registers and CDM hang detect
support for better debugging purpose in case of cdm timeout at config
ife. Add a debugfs for CDM command buffer dump for cdm hang events.
Fix the possible NULL derefernce while dumping the cdm registers.
Turn on debugfs using following command in adb shell:
echo 1 >> /sys/kernel/debug/camera_isp_ctx/enable_cdm_cmd_buffer_dump.

CRs-Fixed: 2748715, 2782720, 2770565
Change-Id: Ibb9aa1d232d742ca1b6e64c16e9718bfc0bc8624
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2020-10-01 12:41:57 -07:00
Jigar Agrawal
5298a2471e msm: camera: cdm: Support CDM2.1 for new Chipset
Add support single-context CDM for CDM2.1.

CRs-fixed: 2770438
Change-Id: I894ebc9fc770fe25c7cd1c18099d3c06af319245
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2020-09-10 10:01:01 -07:00
Trishansh Bhardwaj
685eb68649 msm: camera: cdm: Add priority group support
This change adds priority group support for CDM 2.1.

CRs-Fixed: 2682747
Change-Id: I4e97e12d916a72d41f2cf8e92cf71d15ede91da5
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
2020-06-08 19:40:35 +05:30
Trishansh Bhardwaj
159ea8087f msm: camera: cdm: Add support for CDM 2.1
This change adds CDM 2.1 support.

CRs-Fixed: 2682747
Change-Id: I9e0782a5e7d8e22706048469669772c21d883d89
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
2020-06-04 22:51:21 +05:30
Trishansh Bhardwaj
172d34b6f7 msm: camera: common: Merge camera-kernel.3.1 changes in camera-kernel.4.0
msm: camera: tfe: Fix variable initialization issues
msm: camera: isp: Dual tfe event check with proper hw idx
msm: camera: smmu: Add support for non-contiguous mermory region
msm: camera: smmu: Use iommu best match algo for camera
msm: camera: ope: Optimize allocation of IO configuration
msm: camera: ope: Fix for KW Issues
msm: camera: ope: Add support for stripe level height configuration
msm: camera: tfe: Enable the delay line clc
msm: camera: ope: Fix false alarm for OPE HW timeout
msm: camera: tfe: Support register dump per request
msm: camera: ope: Increase max number of stripes
msm: camera: ope: Change packer and unpacker format in case NV12
msm: camera: tfe: Add packet code get command for tfe
msm: camera: ope: Trigger recovery in case of violation on write bus
msm: camera: ope: Protect ope hw reset with mutex
msm: camera: ope: Add a check for valid request in cdm callback
msm: camera: ope: Remove the BW & clock vote in release context
msm: camera: ope: Reduce OPE BUS memory
msm: camera: ope: Fix return value for ope acquire
msm: camera: ope: Fix false alarm for OPE request timeout
msm: camera: ope: Avoid deadlock during recovery after HW hang
msm: camera: tfe: tfe debug enhancement
msm: camera: cdm: Fix irq_data value in case of inline irq
msm: camera: flash: Switch off flash on provider crash
msm: camera: ope: Initialize ope hw mutex structure
msm: camera: cdm: Flush all available FIFOs during reset
msm: camera: cpas: Add mandatory bw option for axi ports clocks
msm: camera: ope: Use vzalloc to allocate the write bus ctx structure
msm: camera: ope: Fix handling of init hw failure
msm: camera: tfe: Enable per frame register dump for rdi only context
msm: camera: cdm: Protect cdm core status bits with mutex
msm: camera: cdm: correct the error check in cmd submit irq
msm: camera: ope: Fix unclock access during HW reset
msm: camera: ope: Program frame level settings after idle event
msm: camera: ope: Delay releasing of resources for last context
msm: camera: isp: Increase default SOF freeze timeout
msm: camera: smmu: Add map and unmap monitor
msm: camera: isp: Add trace events across ISP
msm: camera: smmu: Profile time taken for map, unmap
msm: camera: ope: Start context timer on receiving new request
msm: camera: tfe: Reduce stack size during set axi bw
msm: camera: cdm: Check for HW state before dumping registers
msm: camera: ope: Reduce stack footprint during acquire
msm: camera: tfe: Disable clock if tfe2 is not supported
msm: camera: cdm: Avoid cdm pause incase of BL submit
msm: camera: tfe: Optimize CSID IRQ logging
msm: camera: ope: Move request id validity check outside of lock
msm: camera: tfe: Correct the tfe hw manager dump logic
msm: camera: ope: Synchronize flush and submit BLs
msm: camera: cdm: Protect cdm reset status
msm: camera: cdm: Handle cdm deinit sequence properly
msm: camera: tfe: Reduce reset timeout to 100ms
msm: camera: ope: Fix hang detection
msm: camera: ope: Make non-fatal logs as debug and info logs
msm: camera: tfe: set overflow pending bit to zero after HW reset
msm: camera: ope: Do not disable CDM during error handling
msm: camera: ope: Add support for OPE Replay
msm: camera: ope: Stop OPE in case of init failure
msm: camera: ope: Synchronize process cmd and flush request
msm: camera: cdm: Fix CDM IRQ handling
msm: camera: tfe: LDAR dump for TFE
msm: camera: ope: Fix the length check for debug buffer
msm: camera: cdm: Fix CDM reset logic
msm: camera: ope: Dump debug registers in case of HW hang
msm: camera: tfe: Support the RDI bus port for line based mode
msm: camera: cdm: Handle out of order reset done events
msm: camera: ope: Consider other contexts during timeout
msm: camera: ope: Put GenIRQ in last stripe BL
msm: camera: tfe: Process the rdi interrupts for rdi only resource
msm: camera: jpeg: Check the HW state before accessing register
msm: camera: csiphy: Update csiphy power-up sequence for lito v2
msm: camera: cdm: Secure freeing of request lists using locks
msm: camera: cpas: Add support for Scuba camnoc
msm: camera: csiphy: Clear secure phy flags on release
msm: camera: tfe: validate the tfe bw num paths
msm: camera: ope: Reorder the reset order in ope acquire
msm: camera: ope: Dump debug registers in case of reset failure
msm: camera: ope: Add logic to detect hang in CDM
msm: camera: isp: Increase max count of cfg to support more init packets
msm: camera: core: Fix cpas axi clk rate overflow.

CRs-Fixed: 2668666
Change-Id: I882ca4bd117bebc7d1c62bc82299d69d7b5c9388
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
2020-06-03 11:48:47 +05:30
Trishansh Bhardwaj
d907c2c7cb msm: camera: cdm: Add support for different CDM hardware
Different CDM hardware have different capability and registers.
With old register space, handling new features and operations
would have been a complex task. This change takes care of old
version of CDM and also changes the regspace to provide every
register's access to CDM.
This change further adds support for "arbitration" in case of
multi-context CDMs.
Exports reset functionality to clients, detection of CDM hang.
Flushing the CDM requests and dumping the FIFO content for all
contexts.
It also adds submitting "debug_gen_irq" as BL_done IRQ is only
an indication for availability of FIFO's. The AHB operations
are completed can only be known if the added "debug_gen_irqs"
gets executed and are received by the CDM.

CRs-Fixed: 2594541
Change-Id: I9846b1c5320ba652c5d3b7d83d616d2dabc843e1
Signed-off-by: Abhilash Kumar <krabhi@codeaurora.org>
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
2020-01-16 17:45:41 +05:30
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