In the case of workqueue congestion move the skip frame logs to
rate info limit.
CRs-Fixed: 2800932
Change-Id: I96988ff73ae182d55eb3f3d15de9b02f13c34b39
Signed-off-by: Wyes Karny <wkarny@codeaurora.org>
This change handles a race while destroying session. Protecting the
session destroy with session lock.
CRs-Fixed: 2799907
Change-Id: Ia1f90a56f6bfed00439b8012e41bfae9e8f739a3
Signed-off-by: Vikram Sharma <vikramsa@codeaurora.org>
Flash operation is currently being done at EPOCH timeframe. In order
to support flash operation at EPOCH extra frame needs to skip to avoid
partial lit on previous request. Moving flash operation to EOF saves
one frame and also give more stability to perform the operation with
higher stablility with removing partial lit. This change gives flash
hardware extra time to perform the operation for turn on/off the flash
hardware.
CRs-Fixed: 2795719
Change-Id: I08b82527006d8a9c81c5a5be0768705051cbd3f1
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
Signed-off-by: Depeng Shao <depengs@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 a edge case if there are only pd 1 devices then avoid reset
slot if last buf done req if last applied req. If rd_idx is equal to
last bufdone index then reset previous slot. Based on max PD in the
link calculate max retry attempt before triggering recovery to UMD.
Also fill trigger information during notify error.
CRs-Fixed: 2776184
Change-Id: Ifabf660df7861b78e7801dc7eebe0c5e71908e74
Signed-off-by: Wyes Karny <wkarny@codeaurora.org>
In bubble cases and if not recovered, error logs causing
excessive logging issues. Change the error and warn logs to
rate limited in error bubble and apply failure cases.
CRs-Fixed: 2785070
Change-Id: Ia7268cfc7b672c24f3161cd65c53df5ee357e7ee
Signed-off-by: Ravikishore Pampana <rpampana@codeaurora.org>
Not calling unmap_hw_va if get_slot() fails causes a stale
entry in smmu CB. since get_slot failed, memmgr table
returns error and memmgr, umd doesn't keep info about this
map entry though smmu CB still has this mapping - This
causes any further map calls on the same 'fd' as smmu
return MAP_EXISTS but CSL bookkeeping doesn't have it.
CRs-Fixed: 2788167
Change-Id: Ibb1450f089b9f175ccdbcfb4f5ecc245a5539bd1
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
This change resets the number of sync links in
case unsync link fails due to any reason, which
will result in device crash, since the number of
sync links can be increased to an invalid value,
then we will get an invalid link.
CRs-Fixed: 2786144
Change-Id: I61bbac9849ce80c319de40ffae411f61c8deeaa9
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
When workqueue is congested, CRM may apply same
request to device which will trigger recovery
due to apply fails. This change prevent CRM
triggering recovery if the time interval of
continuous applying req less than 5ms.
CRs-Fixed: 2775372
Change-Id: I45c2ed76334b1bbf4547bbf21f90cf0a6c169323
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
If bubble recovery is disabled, IFE driver should continue
to notify that epoch to CRM as opposed to dropping that frame
in IFE. In case of sHDR if bubble recovery is disabled and IFE
does not notify the epoch at which bubble was detected it will lead
to a trigger count mismatch in CRM.
CRs-Fixed: 2768309
Change-Id: I311ce80857a905496c633708a5f4ee2391679037
Signed-off-by: Karthik Anantha Ram <kartanan@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>
When multi map fails, the first mapping does not unmap
due to lack of condition.
CRs-Fixed: 2768768
Change-Id: Ib61ce8f5a73e5c27b1b19bbd23d6649c62feb0da
Signed-off-by: zhuo <zhuo@codeaurora.org>
When workqueue is congested, CRM may apply same
request to device which will trigger recovery
due to apply fails. This change prevent CRM
triggering recovery if the current idx is same
with last applied idx.
CRs-Fixed: 2761601
Change-Id: I6ccf44f050a18e8a2a35916f61513ad852e7bdee
Signed-off-by: Depeng Shao <depengs@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>
Add third link to support 3 concurrent camera in
sync. This change contain support same max pipeline
delay and different max pipeline delay as well.
CRs-Fixed: 2723787
Change-Id: I25e50e8e9a19c4c306a01dd3b700f8a990f3eb66
Signed-off-by: Ayush Kumar <ayushkr@codeaurora.org>
Some sensor drivers that are not slaves to CRM, can probe earlier
than the master bind call. Return EPROBE_DEFER when camera v4l2
root device is not ready.
CRs-Fixed: 2734061
Change-Id: I5a1162f38526fc7f95127b4163183aa66f213d8f
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
Allow requests to be submitted by UMD and added by devices on
the link, irrespective of the link state.
CRs-Fixed: 2718108
Change-Id: Ie6a6f3576bc6aeb1657ee751dc72779cafec7ffe
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
dma_buf_kmap/kunmap is replaced with dma_buf_vmap/vunmap api, to
accommodate upstream driver.
CRs-Fixed: 2732008
Change-Id: Id6551d84ea09d91a18c64fbbca3a796f4eab0bb1
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
This change adds support to notify frame skip when CRM
not ready to apply a normal setting. Sensor and custom
device also want to update the HW settings in some
conditions even if a frame is skipped.
CRs-Fixed: 2691642
Change-Id: Ibd2b22655d0f6b6c90663df75a0f5fad8565e918
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
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>
Allow concurrent calls to unmap buffer by reducing the
mutex lock duration, and allow same fd for mapping user iova,
use book keeping for user smmu.
CRs-Fixed: 2559879
Change-Id: Ic3c92d4fa0ca7d1c29e621172e0b058420e1501d
Signed-off-by: Haibin Liu <haibinl@codeaurora.org>
If a request is submitted post flush and the request ID of that
request is <= last flush req ID return an appropriate error code
to indicate the same.
CRs-Fixed: 2720555
Change-Id: Ic26c4fc5f0ba490ed277b3bb301cc02d1fa027d6
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
Guards debugfs features in camera driver to only be compiled when
CONFIG_DEBUG_FS is enabled.
CRs-Fixed: 2717236
Change-Id: I0de77741301d259cbec64e8a2e27830981b2b69d
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
At a given point if there is no request to apply, carry forward
the same timeout value for the wd timer. Modify timer only in
cases where we apply a valid request.
CRs-Fixed: 2698225
Change-Id: I92a1f1c6d0154349e19fdc1582d9d8836a7db1f4
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
At the time of unbind, all debugfs entry needs to be properly
clean up. This change adds debugfs directory removal alongwith
entries under debugfs root entry.
CRs-Fixed: 2675526
Change-Id: I3eba11db032dbafe5f7d444e8c5a823639ba0e74
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
Dump csiphy registers on following fatal errors:
1. lane overflow error
2. unbounded frame error
3. SOT ans EOT reception error
4. stream underflow error
These errors irqs are set at csid end, Currently there is no
interface to send message from one subdevice to other if the subdev is
not a real time device. This change adds an interface to notify the
no real time subdev.
CRs-Fixed: 2696744
Change-Id: I522167d1639ac298bc739a8a5a380a01356f0776
Signed-off-by: Vishal Verma <vishverm@codeaurora.org>
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
In case of long exposure shots, watchdog timer needs
to be modified for init exposure seeting also to avoid trigger.
CRs-Fixed: 2706105
Change-Id: Ife8b3ec32103aff71d281e11b68e0d48f4ef79e1
Signed-off-by: Chandan Kumar Jha <cjha@codeaurora.org>
Fixes exit call flow as a part of rmmod.
CRs-Fixed: 2675526
Change-Id: I47111a737cb06d9bb3d0a417a471c5c9fb545999
Signed-off-by: Jigarkumar Zala <jzala@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>
During unmap these internal buffers will be freed immediately
afterwards, therefore there is no need to do cache operation.
CRs-Fixed: 2627074
Change-Id: Ica4ebb93eb212604268c3450a92d075197783537
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
Added wrapper functions for each workq to enable workq names
in log.
CRs-Fixed: 2684378
Change-Id: If5b3671fbf20777cc891cba4b27cad6ed3a0d146
Signed-off-by: Wyes Karny <wkarny@codeaurora.org>
If there is a valid request CRM will apply that request to the
custom device, in scenerios during which there is no setting to
be applied to a custom device at a given epoch CRM needs to invoke
the custom device to program default settings for the next frame.
CRs-Fixed: 2524308
Change-Id: I4701c602ab68b9f64266f03a9b200d15a808165e
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>