Commit Graph
733 Commits
Author SHA1 Message Date
Camera Software Integration 7dec63cea8 Merge "msm: camera: isp: validate in_port before accessing" into camera-kernel.lnx.3.1 2020-05-12 01:53:43 -07:00
Alok Chauhan cbc03dba7f msm: camera: ope: Change parameters to find time difference
Change the earlier and later parameters to calculate the time
differene.

CRs-Fixed: 2675079
Change-Id: I113e084da870470b2186c05f64c414a69e741946
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
2020-05-11 12:30:44 +05:30
Linux Build Service Account 4dd5eea5ca Merge 1ed6c5c6d4 on remote branch
Change-Id: Ie1531734ac2c2e6880e099b01112b0bf19710d3e
2020-05-07 12:35:31 -07:00
Camera Software Integration f7e9138b9a Merge "msm: camera: flash: Add qti flash property for scuba" into camera-kernel.lnx.3.1 2020-05-07 03:27:20 -07:00
Tejas Prajapati a873fb67b3 msm: camera: isp: validate in_port before accessing
in_port information we are getting from the UMD and accessing
it directly without validation which might lead to
corruption and device failure.

CRs-Fixed: 2629969
Change-Id: I0a1c57db9b94f9657427872ae6797635c6aed668
Signed-off-by: Tejas Prajapati <tpraja@codeaurora.org>
2020-05-06 23:06:44 -07:00
Ravikishore Pampana 2a3f5094e8 msm: camera: tfe: Do tfe-csid and tfe probe based on fuse feature
Some ISP hardware id instances are disabled on some target skus.
Cpas driver has fuse information based on the dtsi entries.
ISP hw driver queries the cpas driver whether hw instance is
supported or not. If ISP hardware is supported on the target then
continue the isp hardware probe.

CRs-Fixed: 2670876
Change-Id: I6b2316d87aeabccbdf74e151e0e25ff77ed6634f
Signed-off-by: Ravikishore Pampana <rpampana@codeaurora.org>
2020-05-01 09:30:49 +05:30
Camera Software Integration 1ed6c5c6d4 Merge "msm: camera: ope: Add context state check in process cmd" into camera-kernel.lnx.3.1 2020-04-29 12:23:02 -07:00
Camera Software Integration 4740996fc4 Merge "msm: camera: smmu: Protect create handle with mutex" into camera-kernel.lnx.3.1 2020-04-29 12:22:49 -07:00
Camera Software Integration ea5de4ac80 Merge "msm: camera: ope: Add LDAR dump support" into camera-kernel.lnx.3.1 2020-04-29 12:22:38 -07:00
Camera Software Integration 5413678ed4 Merge "msm: camera: ope: enable pp modules hw status dump" into camera-kernel.lnx.3.1 2020-04-27 10:33:15 -07:00
Camera Software Integration 7b3b59578e Merge "msm: camera: ope: Fix OPE clock issue" into camera-kernel.lnx.3.1 2020-04-27 10:33:06 -07:00
Camera Software Integration be3a1adba5 Merge "msm: camera: ope: Handle reset IRQ delay" into camera-kernel.lnx.3.1 2020-04-27 10:32:45 -07:00
Alok Chauhan 8237ce6cc9 msm: camera: smmu: Protect create handle with mutex
mutex lock is missing while creating smmu handle. This
gives warning on mutext_unlock.

Added mutext lock for create smmu handle.

CRs-Fixed: 2671612
Change-Id: Ia1880c335ed9cacc4d6d34e9184599a4467efdcd
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
2020-04-27 00:37:36 +05:30
Alok Chauhan db9d8b9b89 msm: camera: ope: Add context state check in process cmd
There is chance that release hw run before process cmd workq
which got scheduled as part of config hw. This causes workq
to continue the context though it got released as part of
release hw.

Added a context state check in process cmd workq handler to
avoid submitting request to cdm hardware.

CRs-Fixed: 2670524
Change-Id: I7009d4b60bd97b9f6d46df51790c127a2cf18205
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
2020-04-27 00:36:05 +05:30
shiwgupt 5a7da6d114 msm: camera: flash: Add qti flash property for scuba
Add qti flash property with updated max current DT property

CRs-Fixed: 2655601
Change-Id: Ic52a0bdae81347f5dc9f1bbe6560ae67f6e13de0
Signed-off-by: shiwgupt <shiwgupt@codeaurora.org>
2020-04-23 21:43:21 +05:30
Alok Chauhan 1c4493f0cb msm: camera: ope: Add LDAR dump support
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.
In order 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 log about culprit information for OPE.

CRs-Fixed: 2669222
Change-Id: Ida5cbee7a36917f7276a0f9accf2c35f24bf69c9
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
2020-04-23 21:19:15 +05:30
Rishabh Jain 2dfb765b4a msm: camera: ope: Fix OPE clock issue
Due to non-availability of all clock levels, while downgrading
or upgrading the clock rate, ope is voting for zero clock rate.
Fix issue by voting for nearest non-zero clockrate while
upgrading or downgrading the clock rate.

CRs-Fixed: 2649906
Change-Id: I2f3488084e0aa32ecfa84bcbebad887a1ef8409d
Signed-off-by: Rishabh Jain <risjai@codeaurora.org>
2020-04-22 23:05:39 +05:30
Camera Software Integration 7ce0928ab9 Merge "msm: camera: sensor: Turn off the flash while flushing" into camera-kernel.lnx.3.1 2020-04-22 01:23:54 -07:00
Camera Software Integration 68769acbec Merge "msm: camera: tfe: Support tfe pdaf port" into camera-kernel.lnx.3.1 2020-04-22 01:23:34 -07:00
Alok Chauhan 70d9d84976 msm: camera: ope: enable pp modules hw status dump
Enable pp module hw status register during violation.

CRs-Fixed: 2663871
Change-Id: I7f1988c7aeaae7b32f0df1316163f4b99f0194a3
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
2020-04-21 15:20:24 +05:30
Camera Software Integration a240e4e683 Merge "msm: camera: tfe: check cdm hang in the tfe config timeout" into camera-kernel.lnx.3.1 2020-04-21 00:26:52 -07:00
Rishabh Jain db1e8beb7f msm: camera: ope: Handle reset IRQ delay
If reset irq is not received within allocated time,
check for irq status to confirm if irq is delayed or
reset failed.
In case of irq delay, clear the irq status and mark it
as success.

CRs-Fixed: 2663505
Change-Id: I1b3658e2ada973f531ddba8bc2378b0440c9088a
Signed-off-by: Rishabh Jain <risjai@codeaurora.org>
2020-04-20 23:31:39 +05:30
Depeng Shao 6128405ac6 msm: camera: sensor: Turn off the flash while flushing
Turn off the flash while flushing if the flushed request
turns off the flash.

CRs-Fixed: 2576732
Change-Id: I546fc6b6ee79f492af905d163515eb19eed78f41
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
2020-04-17 04:26:45 -07:00
Ravikishore Pampana b46d4b0156 msm: camera: tfe: check cdm hang in the tfe config timeout
TFE driver submit the config packet to cdm and wait for call back.
If call back has not received with in 60ms, then tfe return failure which
cause tfe stream on failure. Some time cdm call back is not coming
due to cdm worker thread execution delay. So add mechanism to check if
cdm worker thread delay happened then wait for some more time
and check it again.

CRs-Fixed: 2664317
Change-Id: I2eb975a2c70b5889238e9cf706c703022f1bf2f5
Signed-off-by: Ravikishore Pampana <rpampana@codeaurora.org>
2020-04-15 21:17:20 +05:30
Ravikishore Pampana 3bd49ac000 msm: camera: tfe: Support tfe pdaf port
Added Pdaf support to tfe driver. TFE camif module register
will configure by user space as per the use case. So removing
the camif module register configuration from tfe driver.
Tfe pdaf port bus shares same write master as rdi2, but pdaf
should be configured as line based and proper packer format.

CRs-Fixed: 2664724
Change-Id: Idcf481eefda24e37ffebb58ed1c8d9e9d3ca6241
Signed-off-by: Ravikishore Pampana <rpampana@codeaurora.org>
2020-04-15 19:31:41 +05:30
Alok Chauhan 0a0ebfa0ad msm: camera: ope: Add check for number of stripe
There is possibility that ope driver gets invalid
number of stripes. Add a check to validate it and
return failure to user-space.

CRs-Fixed: 2664479
Change-Id: Ic80d3376b853e500b793b0b5d051288f2a2640ba
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
2020-04-15 13:10:16 +05:30
Alok Chauhan 28a7d67a1d msm: camera: ope: Add a check to validate dmi cmd address
Add a check to validate DMI command address before writing
DMI in command buffer. This can avoid cdm doing null pointer
de-reference.

CRs-Fixed: 2664479
Change-Id: If99da6fd23f73c1c666cdcec60b0f68eb300425e
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
2020-04-15 12:54:27 +05:30
Camera Software Integration aa560639b8 Merge "msm: camera: csiphy: Secure cam usecase not working" into camera-kernel.lnx.3.1 2020-04-10 01:33:37 -07:00
Camera Software Integration 87ccefa6bf Merge "msm: camera: isp: variable should be accessed only if match is found" into camera-kernel.lnx.3.1 2020-04-10 01:32:34 -07:00
Camera Software Integration afd06d2181 Merge "msm: camera: cdm: Add a check for fifo list in cdm workqueue" into camera-kernel.lnx.3.1 2020-04-08 01:16:53 -07:00
Tejas Prajapati 82fc667b43 msm: camera: isp: variable should be accessed only if match is found
There is a possibility that the priority variable would
be accessed even for the HEAD node which would result in
out of bound errors, so access the elements of the
structure only if the handler is found.

CRs-Fixed: 2646173
Change-Id: I0540658b9c9487f6e3a4601a488a1add1e790dda
Signed-off-by: Tejas Prajapati <tpraja@codeaurora.org>
2020-04-07 04:55:35 -07:00
Camera Software Integration 46b5f2a7e2 Merge "msm: camera: ope: Fix OPE hang dump" into camera-kernel.lnx.3.1 2020-04-07 00:56:21 -07:00
Camera Software Integration 75c7a7c149 Merge "msm: camera: core: Fix cpas axi clk rate overflow" into camera-kernel.lnx.3.1 2020-04-05 00:36:22 -07:00
Camera Software Integration 073940efb1 Merge "msm: camera: isp: Increase max count of cfg to support more init packets" into camera-kernel.lnx.3.1 2020-04-02 12:37:10 -07:00
Alok Chauhan dcc74ba3c1 msm: camera: cdm: Add a check for fifo list in cdm workqueue
CDM workqueue stores the last fifo bl tag done entry
for which it's got scheduled. There is possibility
that flush can execute before workqueue and remove
all the fifo entries. This can skip the work for new
requests if new bl tag matches with last bl tag done
entry and cdm don't send notification to clients.

Add a check to validate fifo list for empty entry
in cdm workqueue function.

CRs-Fixed: 2653649
Change-Id: I788f6d1e4c1c011a2a9ed690ddeff2b1bde0e569
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
2020-04-02 20:29:53 +05:30
Rishabh Jain a6acefc700 msm: camera: ope: Fix OPE hang dump
OPE is using memhandle to fill bl information.
So, updating the hang dump logic to use memhandle
instead of iova address to fill bl related information.
IOVA address will be fetched from memhandle inside
dump logic.

CRs-Fixed: 2655671
Change-Id: I536aef71050964c985db359662732f26f026c3d8
Signed-off-by: Rishabh Jain <risjai@codeaurora.org>
2020-04-01 14:26:23 +05:30
Anil Kumar Kanakanti bd6f064168 msm: camera: csiphy: Secure cam usecase not working
Secure CP control register always assume that it contains 7 bit
mask for each PHY. But this register format is different based on
target. Update secure CP control bitmask generation logic for each
PHY index based on phy_version.
So we have below 3 combinations to handle at SW.
1.Old Titan Targets : 7 bits for each PHY.
2.PHY 1_2_1 : for 4 pHYS 7 bits and for
remaining 2 PHYs 8 bits are reserved.
3.Mimas (PHY 2_0_1): 8 bits for each PHY.

CRs-Fixed: 2624698
Change-Id: Iac4c3c718fc96a51592e07b45458fb045c52366d
Signed-off-by: Anil Kumar Kanakanti <akanakan@codeaurora.org>
2020-03-31 21:47:40 +05:30
Camera Software Integration 7788756481 Merge "msm: camera: ope: Add logic to detect hang in CDM" into camera-kernel.lnx.3.1 2020-03-30 05:01:35 -07:00
Camera Software Integration 8dd32a1795 Merge "msm: camera: ope: Dump debug registers in case of reset failure" into camera-kernel.lnx.3.1 2020-03-30 05:01:27 -07:00
Camera Software Integration 155a2b05c0 Merge "msm: camera: ope: Reorder the reset order in ope acquire" into camera-kernel.lnx.3.1 2020-03-30 05:01:15 -07:00
Ravikishore Pampana 2c31a66902 msm: camera: core: Fix cpas axi clk rate overflow
Change the clk variable type from int32_t to int64_t
to avoid integer overflow.

CRs-Fixed: 2609090
Change-Id: I9f785ce2c1e45b1e9a238c42e86da1161bf70f75
Signed-off-by: Ravikishore Pampana <rpampana@codeaurora.org>
2020-03-30 15:11:53 +05:30
Rishabh Jain 97c8cb415e msm: camera: isp: Increase max count of cfg to support more init packets
Increase maximum count of command buffers in a request to support
more number of init packets.

CRs-Fixed: 2652124
Change-Id: I6c85cf5720076c09350b952bc09ed30fbcf27497
Signed-off-by: Rishabh Jain <risjai@codeaurora.org>
2020-03-30 10:13:55 +05:30
Camera Software Integration be3de2de38 Merge "msm: camera: tfe: validate the tfe bw num paths" into camera-kernel.lnx.3.1 2020-03-26 10:54:55 -07:00
Camera Software Integration e3e2f34f1a Merge "msm: camera: csiphy: Clear secure phy flags on release" into camera-kernel.lnx.3.1 2020-03-26 10:54:50 -07:00
Camera Software Integration abbe91cfc7 Merge "msm: camera: cpas: Add support for Scuba camnoc" into camera-kernel.lnx.3.1 2020-03-25 00:10:59 -07:00
Alok Chauhan a3770ced1a msm: camera: ope: Add logic to detect hang in CDM
It is possible that cdm clients get callback from CDM
in sometime due to delay in scheduling CDM workqueue.

Add a logic to detect this delay so that client don't
detect false hang.

CRs-Fixed: 2640897
Change-Id: I1a9fdc1ac5d6bcc1869802793632bf6bf8b4c2ca
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
2020-03-24 18:30:28 +05:30
Rishabh Jain 78a0740078 msm: camera: ope: Dump debug registers in case of reset failure
Dump debug registers and irq status register in case of reset
failure.

CRs-Fixed: 2646377
Change-Id: I1acea4761b884d0ffeba9d44e2f0e70d53f1813b
Signed-off-by: Rishabh Jain <risjai@codeaurora.org>
2020-03-24 17:37:42 +05:30
Rishabh Jain 64aa7f79a8 msm: camera: ope: Reorder the reset order in ope acquire
Initialize CDM prior to the OPE. This will help to reset
CDM before OPE.

CRs-Fixed: 2646377
Change-Id: I7136cbb04f687e7d5756431731af618718c5a2a7
Signed-off-by: Rishabh Jain <risjai@codeaurora.org>
2020-03-24 11:47:27 +05:30
Camera Software Integration 09c895e762 Merge "msm: camera: isp: Change data type for error handling" into camera-kernel.lnx.3.1 2020-03-23 12:28:42 -07:00
Camera Software Integration 84f424ba7c Merge "msm: camera: cpas: Setting the vote level on max supported clock lvl basis" into camera-kernel.lnx.3.1 2020-03-23 12:28:09 -07:00