Commit Graph
743 Commits
Author SHA1 Message Date
Vikram Sharma b06743ea61 msm: camera: isp: Check ife out res validity
This change adds validity check for ife out res. If ife out res is
NULL we can run into crash or issues.

CRs-Fixed: 2915741
Change-Id: I8722b2a4e2634bda42f0080e00bf09050bbd6b91
Signed-off-by: Vikram Sharma <vikramsa@codeaurora.org>
2021-06-07 18:30:53 +05:30
Ayush Kumar d48a76255d msm: camera: cdm: Add support for CDM 2.1
This change adds CDM 2.1 support.

CRs-Fixed: 2960970
Change-Id: I8cca47a59304c15c7673de398454ab0e99506dab
Signed-off-by: Ayush Kumar <ayushkr@codeaurora.org>
2021-06-06 01:34:12 +05:30
Linux Build Service Account 93d7100135 Merge 7305ccde14 on remote branch
Change-Id: Ic4b170d5b7c9cbf5a0e45d85b32a38a221e40a03
2021-05-07 01:34:25 -07:00
Karthik Jayakumar 7305ccde14 msm: camera: cdm: Fix of_match table null entry
KASAN identified global-out-of-bounds issue on:
msm_cam_hw_cdm_dt_match
Due to no null-terminating struct in the array.

CRs-Fixed: 2883523

Change-Id: I36e4811f239993e1e6de158df959157217c28bfe
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2021-04-28 17:58:01 +05:30
Linux Build Service Account 60fa0a895f Merge 57996acb86 on remote branch
Change-Id: Ib7716e5075eef2f2d1b4d18626b32e29502dc781
2021-01-21 20:53:08 -08:00
Camera Software Integration 57996acb86 Merge "msm: camera: reqmgr: Do not trigger UMD recovery in WQ congestion" into camera-kernel.lnx.3.1 2020-12-29 06:21:53 -08:00
Linux Build Service Account a00f91f3d7 Merge 55ad64a296 on remote branch
Change-Id: I3d4fbd9d60383a27a903813089d6832e729e313d
2020-12-23 02:26:03 -08:00
Wyes Karny acb41133c9 msm: camera: reqmgr: Do not trigger UMD recovery in WQ congestion
In WQ congestion case do not trigger UMD recovery as for back to back
apply, apply failure is expected because ISP is in still in applied
state.

CRs-Fixed: 2840473
Change-Id: Ib57e1db1e5bf8f20e5e454d985efc002d50e3ba6
Signed-off-by: Wyes Karny <wkarny@codeaurora.org>
2020-12-09 18:57:08 +05:30
Alok Chauhan 55ad64a296 msm: camera: cdm: Added cdm power state check
There is chance that handle error info get scheduled
after cdm deinit. As clock and regulator gets disabled
as part of deinit so this can cause issue for cdm hw
interaction as part of handle error.

Added cdm power state check before dumping CDM HW
status at the time of error.

CRs-Fixed: 2833653
Change-Id: I4bf01ce3900196909cf66ffdb24607c50ab03295
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
2020-12-09 12:44:04 +05:30
Sridhar Gujje a405c45b1c Merge "msm: camera: ope: handle unlocking in process timer" into camera-kernel.lnx.3.1 2020-11-28 08:56:32 -08:00
Camera Software Integration 9606835395 Merge "msm: camera: ope: Add support to dynamic switch pix_pattern" into camera-kernel.lnx.3.1 2020-11-24 00:26:57 -08:00
Alok Chauhan 43188bce45 msm: camera: ope: handle unlocking in process timer
In process timer, if there are no empty taks then it
returns without unlocking context mutext. This lead
to deadlock later if other tasks are waiting on this
lock.

CRs-Fixed: 2823721
Change-Id: I478d1797be59d975e9d58e005a5fad5c22656f51
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
2020-11-23 13:02:13 +05:30
Rishabh Jain 9466904129 msm: camera: ope: Add support to dynamic switch pix_pattern
Add support to dynamically switch pix_pattern of read clients
based on data received in each request.

CRs-Fixed: 2811530
Change-Id: Icb3ebd33cae59b8db87bc0011d6560492ad29c3a
Signed-off-by: Rishabh Jain <risjai@codeaurora.org>
2020-11-11 09:36:04 +05:30
Alok Chauhan b91c235d7f msm: camera: ope: Avoid submitting NULL request to CDM
In corner case, there is a chance that userspace can submit
request while flush is ongoing. In some cases submitted request
can get flushed and corresponding data structures  memory gets
freed.

Add a logic to check for pending request before submitting request
to cdm hw.

CRs-Fixed: 2815901
Change-Id: I74096201e204f204c4f15d14698b4e9af6435f55
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
2020-11-10 16:05:10 +05:30
Linux Build Service Account 2f785d35e4 Merge 86afe4d27e on remote branch
Change-Id: If117dc4b8922f979dc041e2fe60cbe2918d8501c
2020-10-23 20:38:50 -07:00
Linux Build Service Account 5ae83f94fd Merge 3b6dc3d456 on remote branch
Change-Id: I33c861fe4076f11e2706f386a08b9a0960e5a3b3
2020-09-22 06:02:53 -07:00
Camera Software Integration 86afe4d27e Merge "msm: camera: ope: Increase max bl limit" into camera-kernel.lnx.3.1 2020-09-18 04:35:01 -07:00
Camera Software Integration 1eb9cf9ad8 Merge "msm: camera: cdm: Decrement write-count only after Bl commit" into camera-kernel.lnx.3.1 2020-09-18 04:34:45 -07:00
Shravya Samala 7bacf1d4c1 msm: camera: tfe: TPG stop Call
Move TPG stop call before checking if
Deinit call is required or not.

CRs-Fixed: 2777023
Change-Id: I9c7be620c2ba2762324129e547efc1d2a8dd6f40
Signed-off-by: Shravya Samala <shravyas@codeaurora.org>
2020-09-15 12:52:54 +05:30
Shravya Samala 92a550e962 msm: camera: cdm: Decrement write-count only after Bl commit
After Hw Bl cmd write, we are decrementing write count.
Again after committing BL we are decrementing write count.
Due to this there is a chance of write count becoming -1 thus
leading to CDM overflow issue. Hence decrement write count
only after committing BL.

CRs-Fixed: 2768031
Change-Id: I8faf6ea7d5e9e34e1e034c89132ed131b4d6cafc
Signed-off-by: Shravya Samala <shravyas@codeaurora.org>
2020-09-15 11:53:59 +05:30
Rishabh Jain 397738b979 msm: camera: ope: Increase max bl limit
Increase max bl limit for OPE to 24 to support maximum
48 stripes.

CRs-Fixed: 2761455
Change-Id: I961be1344fac0084649df321225e94a50d4e5a98
Signed-off-by: Rishabh Jain <risjai@codeaurora.org>
2020-09-11 15:46:09 +05:30
Camera Software Integration 3b6dc3d456 Merge "msm: camera: cci: Enable compilation for cci dump code" into camera-kernel.lnx.3.1 2020-09-02 21:05:40 -07:00
Camera Software Integration a8823950bf Merge "msm: camera: ope: remove the check for dev_type" into camera-kernel.lnx.3.1 2020-09-02 21:05:16 -07:00
Camera Software Integration 8f426ed3a2 Merge "msm: camera: ope: Handle race while dumping ope req list" into camera-kernel.lnx.3.1 2020-08-30 21:20:12 -07:00
Camera Software Integration 13569c8631 Merge "msm: camera: req_mgr: Limit CAM_ERR log in case of no empty task" into camera-kernel.lnx.3.1 2020-08-30 21:19:49 -07:00
Tejas Prajapati 0d3f721ed9 msm: camera: sensor: unregister subdev if cpas registration fails
In case if the CPAS registration is failed before freeing the
memory of the subdev, subdev need to be unregistered so that
subdev list entry will not become NULL and other subdev can
be added.

CRs-Fixed: 2708016
Change-Id: I464c73411596fc562fc7a190ddfa130f23ee487a
Signed-off-by: Tejas Prajapati <tpraja@codeaurora.org>
2020-08-28 14:29:34 +08:00
Linux Build Service Account 9151be408b Merge c106d6bed3 on remote branch
Change-Id: Ibdd36bfcf9c3651e8428d6d827f856eb0d43660b
2020-08-27 00:05:21 -07:00
Camera Software Integration b99117a3f4 Merge "msm: camera: sensor: unregister subdev if cpas registration fails" into camera-kernel.lnx.3.1 2020-08-25 11:32:29 -07:00
shiwgupt d7fd56eb46 msm: camera: cci: Enable compilation for cci dump code
CCI register dump is only enable when dump flag is defined. Remove
this flag and add control via debugfs entry. This change helps
debugfs entry to control cci device individually on the fly for
debugging rather than rebuild.

CRs-Fixed: 2692379
Change-Id: Ic13dc903e861e7c49bf3b375a66b96bfbe5d9c70
Signed-off-by: shiwgupt <shiwgupt@codeaurora.org>
2020-08-25 21:11:26 +05:30
Vikram Sharma 320836c10e msm: camera: ope: Handle race while dumping ope req list
While dumping OPE req list we were not protecting it in context mutex,
this can result into unexpected behaviors. This change take care of
protecting the dump logic with mutex.

CRs-Fixed: 2750458
Change-Id: I916822b498cde3922274c18a06b98c898bff1d65
Signed-off-by: Vikram Sharma <vikramsa@codeaurora.org>
2020-08-24 08:39:31 -07:00
Shravya Samala c8475ebeb8 msm: camera: req_mgr: Limit CAM_ERR log in case of no empty task
Limit CAM_ERR log in case of no empty task.

CRs-Fixed: 2756270
Change-Id: I688bcff64af135ede221cab0a83c2582efb81330
Signed-off-by: Shravya Samala <shravyas@codeaurora.org>
2020-08-24 00:44:40 -07:00
Alok Chauhan abc609e3b2 msm: camera: cdm: Avoid submitting BL if FIFO is full
Check for available slots in FIFO before submitting
gen_irq and debug_gen_irq BL.

CRs-Fixed: 2747279
Change-Id: Iff47aa861f13221e5295d9a3f3521a2514351933
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
2020-08-19 17:36:28 +05:30
Linux Build Service Account 09971cfc4e Merge 129fc4a18c on remote branch
Change-Id: I249c58189b896e32734cf90abb03da75308fcc9c
2020-08-15 01:38:34 -07:00
Tejas Prajapati 1b036ca159 msm: camera: sensor: unregister subdev if cpas registration fails
In case if the CPAS registration is failed before freeing the
memory of the subdev, subdev need to be unregistered so that
subdev list entry will not become NULL and other subdev can
be added.

CRs-Fixed: 2708016
Change-Id: I464c73411596fc562fc7a190ddfa130f23ee487a
Signed-off-by: Tejas Prajapati <tpraja@codeaurora.org>
2020-08-13 03:02:45 -07:00
Camera Software Integration c106d6bed3 Merge "msm: camera: isp: Added CSID recovery mechanism" into camera-kernel.lnx.3.1 2020-08-06 11:05:32 -07:00
Tejas Prajapati 7493e80fe1 msm: camera: ope: remove the check for dev_type
Calculate the total clk of all the ctx
irrespective of the use case for the ctx. Remove
dev_type check to add all the ctx clk while
calculating total clk.

CRs-Fixed: 2754351
Change-Id: I5c1681ac1a88cfec752ff58fd8b1f6ac5d05b28a
Signed-off-by: Tejas Prajapati <tpraja@codeaurora.org>
2020-08-06 13:17:51 +05:30
Camera Software Integration 129fc4a18c Merge "msm: camera: req_mgr: Remove unwanted v4l2 operation" into camera-kernel.lnx.3.1 2020-07-31 00:51:56 -07:00
Camera Software Integration c1c1c9fb66 Merge "msm: camera: cci: Fix incorrect use of cci config ioctl" into camera-kernel.lnx.3.1 2020-07-31 00:51:51 -07:00
Camera Software Integration f47f54b5e9 Merge "msm: camera: flash: Add support for regulator disable" into camera-kernel.lnx.3.1 2020-07-31 00:51:47 -07:00
Camera Software Integration 27bb083fa3 Merge "msm: camera: csiphy: reset the secure bits on provider exit" into camera-kernel.lnx.3.1 2020-07-31 00:51:39 -07:00
Linux Build Service Account b5010f62db Merge e5d41356bd on remote branch
Change-Id: Iee3a72d85741200e4279c5db10165c26d59ad7dd
2020-07-28 08:50:25 -07:00
shiwgupt fff3bad10f msm: camera: flash: Add support for regulator disable
Add support to disable regulator in release dev

CRs-Fixed: 2726194
Change-Id: I9c14989c9902ecdba8a84af0a0a029d8b98a2362
Signed-off-by: shiwgupt <shiwgupt@codeaurora.org>
2020-07-24 09:58:22 +05:30
Jigarkumar Zala 100ee9dc14 msm: camera: req_mgr: Remove unwanted v4l2 operation
CCI hardware is no longer register as device node with v4l2 layer.
At time of notify message, there is missing check to read subdev
name, which cause the null pointer issue. This change removes
the sudbev node reading operation with devnode pointer as it is
not being use anywhere in functionality.

CRs-Fixed: 2702760, 2727771
Change-Id: Id362bd2edf4eea35f05115ae3a5b6c1d761bb437
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2020-07-24 02:02:52 +05:30
Fernando Pacheco 76d1c90e23 msm: camera: cci: Fix incorrect use of cci config ioctl
The cci configuration will be transitioned to a new API that does not
require routing through the v4l layer. This is work-in-progrss so in
the mean time prevent the device from being exposed as configurable
from userspace.

The ioctl will still be exposed to kernel users so fix the arg size
as well. We want size of struct not pointer.

CRs-Fixed: 2702760
Change-Id: I9c7bd8f76980603dbf27e1c5bc9b19f8a3b8a39a
Signed-off-by: Fernando Pacheco <fpacheco@codeaurora.org>
2020-07-24 02:01:56 +05:30
Tony Lijo Jose f0a73a6c75 msm: camera: csiphy: reset the secure bits on provider exit
If camera service exits after configdev and before startdev the phy
variables to keep track of the secure bits will be modified and the next
session will be based on this secure bits that was previously set. This
change clears the phy secure bits if the service exits.

CRs-Fixed: 2726185
Change-Id: I69420aed164f66f221569ff60f8771eff40e1548
Signed-off-by: Tony Lijo Jose <tjose@codeaurora.org>
2020-07-21 23:44:34 +05:30
Alok Chauhan f76c2819d6 msm: camera: ope: Maintain current clock value during acquire
OPE driver maintain the current clock value field per instance
based on clock rate set for OPE clock. OPE driver sets the clock
to turbo during acquire time but doesn't update the internal field
for multiple acquire request. This causes power regression as further
clock calculation happens on previously set clock values for multiple
acquire request.

Corrected the logic to always update current clock value based on clock
rate set during acquire time.

CRs-Fixed: 2724827
Change-Id: Iba377d8918bda37b4d3267e677414a7b9e5a82ce
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
2020-07-21 14:52:32 +05:30
Shravya Samala 5db1153338 msm: camera: isp: Added CSID recovery mechanism
CSID is not able to recover from the fatal errors like lane
overflows, continuous unbound frames and 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: 2674109
Change-Id: I7e4612e9bd24a20691146ae0b9dc6f77ccbc0714
Signed-off-by: Shravya Samala <shravyas@codeaurora.org>
2020-07-17 04:51:45 -07:00
Camera Software Integration e5d41356bd Merge "msm: camera: isp: Max context reduction for TFE in isp driver" into camera-kernel.lnx.3.1 2020-07-16 04:44:55 -07:00
Shravya Samala bcea7d87c3 msm: camera: cpas: Add api to log cpas bw, camnoc clock, ahb vote
Debug changes for bus overflow issues.
In many error cases it is required to know the bandwidth
applied on axi ports and camnoc axi clock rate values.
Added cpas api to print the current axi bus votes,  camnoc axi
clock and ahb vote level.
This api can be called for isp errors such as bus overflow, pxl
overflow cases.

CRs-Fixed: 2731550
Change-Id: I75454c131cce7204b50614703f9914482f3ca7ab
Signed-off-by: Shravya Samala <shravyas@codeaurora.org>
2020-07-14 01:17:27 -07:00
Shravya Samala 9033341cbb msm: camera: isp: Max context reduction for TFE in isp driver
Reduced total number of contexts for TFE from 8 to 4.

CRs-Fixed: 2720374
Change-Id: I03eed741e5cf72c431d7cc5b7f9a418537d1c6f7
Signed-off-by: Shravya Samala <shravyas@codeaurora.org>
2020-07-14 00:59:19 -07:00