Commit Graph

22 Commits

Author SHA1 Message Date
Karthik Jayakumar
7c8204a42d msm: camera: common: Enable debugfs compile check
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>
2020-07-01 10:59:24 -07:00
Jigarkumar Zala
279dfebf8c msm: camera: common: Fixes the exit module code flow
Fixes exit call flow as a part of rmmod.

CRs-Fixed: 2675526
Change-Id: I47111a737cb06d9bb3d0a417a471c5c9fb545999
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2020-06-09 12:08:22 -07:00
Camera Software Integration
f458d8e16a Merge "msm: camera: sync: Increase number of fences in sync" into camera-kernel.lnx.4.0 2020-05-26 13:14:29 -07:00
Pavan Kumar Chilamkurthi
74410fea6b msm: camera: sync: Add SYNC_CANCEL support in sync driver
Add SYNC_CANCEL definition and signal CANCEL instead of
ERROR in flush cases.

CRs-Fixed: 2673810
Change-Id: I1bd83e382f9b38f5f020a5af3b883083e211e3d2
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
2020-05-20 12:48:36 -07:00
Mukund Madhusudan Atre
bfdaaba4eb msm: camera: sync: Increase number of fences in sync
Some mfhdr usecases require more than 1024 fences because of
delayed request processing and bypass. Increase maximum number
of fences or sync objects to 2048.

CRs-Fixed: 2598592
Change-Id: If11fa2986fce0cd97c14370d29a117230134d6f5
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2020-05-11 14:26:17 -07:00
Karthik Jayakumar
28be26b740 msm: camera: sync: Fix kbuild config checks for synx driver
External configs should be checked by using IS_REACHABLE/IS_ENABLED
macro's to check if the config option is set for the build target.

CRs-Fixed: 2584631
Change-Id: I07a0d95391a83a2264f826e2935d67686d295317
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2020-04-22 10:43:31 -07:00
Ayush Kumar
320ae57bb9 msm: camera: core: Fix context release timing issue
When sync object is invalid and num_in_map > 1,
it will lead to context ref leak. Check sync
object first, then register sync call back.

CRs-Fixed: 2594185
Change-Id: I2d39ce3ea43bbe7bc05420b86b37fdfba4aa795a
Signed-off-by: Ayush Kumar <ayushkr@codeaurora.org>
2020-03-13 12:16:46 -07:00
Mukund Madhusudan Atre
0a649b3063 msm: camera: common: Fix failures in v4l2 unregister during error
Missing video unregister was causing list delete corruption.
Also, there were double free errors in Sync and CRM driver. Fix
v4l2 issues by adding the missing unregister calls and changing
release callback to empty, because we are freeing it during
cleanup. Improve logging during bind/unbind to better reflect what
is happening.

CRs-Fixed: 2584631
Change-Id: Idc5db655d22df54e8bdb470d29896e10f6987796
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2020-02-28 16:02:56 -08:00
Mukund Madhusudan Atre
5cb000ee7f msm: camera: common: Add component helper support in camera
Due to the asynchronous nature of platform probes, inter
dependency between drivers needs to be taken care during
kernel boot up. Component helper provides the facility of
adding matching drivers in a list ordered in the way we want
to bind those drivers. The CRM driver acts as component master
to make sure all slave drivers are bound before it returns
from its own bind call. Add support for serializing platform
probes through component framework.

CRs-Fixed: 2584631
Change-Id: I345da1d2b9cccf6021ac6fc899143013b7714ec4
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2020-02-05 22:58:13 -08:00
Alok Pandey
cc79abb0a5 msm: camera: sync: correcting atomic read operation
This change rectifies the reading of atomic variable.

CRs-Fixed: 2591537
Change-Id: I13c289bc00a07d5c2289e2e3f13245bbc521d4ee
Signed-off-by: Alok Pandey <akumarpa@codeaurora.org>
2020-01-30 13:18:30 -08:00
Jigarkumar Zala
376b7a3351 msm: camera: sync: Enable driver registration with dtsi match
Currently sync driver is independent from dtsi matching in order
to get it probe. Update the logic to make sure probe is getting
invoked if respective dtsi is present.

CRs-Fixed: 2590413
Change-Id: I69124e49d68e223d082521a9431cb7e8d846e8d7
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2020-01-15 16:39:25 -08:00
Mukund Madhusudan Atre
42021c8b76 msm: camera: common: Add device caps for full devices during probe
The v4l2 registration requires all devices that are not subdevs
to have device caps field to be non zero. Add device caps for
CRM and SYNC devices during probe.

CRs-Fixed: 2582994
Change-Id: I804e7bc00d597debc39d1f71259cf607c60ed069
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
2019-12-20 17:44:51 -08:00
Jigarkumar Zala
03b6c2140f msm: camera: common: Make platform register centralized
Currently camera modules platform registration/remove function
is being called as a part of module_init function individually.
Building camera as module, current infrastructure cannot support
it, as DLKM only support single module_init/exit function.
This change enables that support by combining all platform
entry/remove functions centrally. Also, remove all submodule
makefiles and combined into one root makefile in order to generate
single kernel object file to dynamically loading the kernel module
in case of DLKM compilation.

CRs-Fixed: 2569808
Change-Id: I59db3ed6cef60123e474db2f222c39836056bd6e
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2019-12-04 12:33:01 -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
524b1ab1d4 msm: camera: config: Makefile fixes to support legacy kernel build system
Adds fixes to makefile in order to support legacy kernel build systems.

CRs-Fixed: 2560543
Change-Id: Iab571871e5171aab501c41496cc09e3c5d942985
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2019-11-06 13:26:57 -08:00
Camera Software Integration
62977f2492 Merge "msm: camera: sync: Dump fence info in case of fence exhaust" into camera-kernel.lnx.1.0 2019-11-06 07:07:36 -08:00
Karthik Jayakumar
2a7ffe9697 msm: camera: sync: Dump fence info in case of fence exhaust
Add error message in case of fence exhaust.
Add support to dump fence table in case of fence exhaust.

CRs-Fixed: 2556458
Change-Id: I9910a04c69b54fe99541524b6581fa9994fd523f
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2019-10-31 14:19:17 -07:00
Trishansh Bhardwaj
3619ae634b msm: camera: reqmgr: Logs v4l2 event queue failure
Kernel uses v4l2 events to communicate with userspace.
If userspace is not dequeuing events and kernel is pushing more events
then v4l2_event_queue fails silently.
This change uses v4l2 callbacks to log v4l2_event_queue failure.

CRs-Fixed: 2541894
Change-Id: I98f8f609f615104ec6dde569bf1f39de1eb368fc
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
2019-10-15 17:46:51 -07:00
Trishansh Bhardwaj
f648ceeca6 msm: camera: req_mgr: Increase v4l2 queue length
EIS have 6 fences per request and uses 15 frame window. On camera close
it signals ~90 fences at once. This can overflow v4l2 event queue.

Increase v4l2 queue length for sync events to prevent overflow.

CRs-Fixed: 2498880
Change-Id: Ie886318168e326c1525b4f8be5cacc5f70d0c477
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
2019-09-09 18:36:39 -07:00
Jigarkumar Zala
5b016ad220 Camera: Correct makefiles for correct header inclusion
Correct some Makefiles and drivers header inclusion.

Change-Id: Iec3e6e0333ae55e8f1cff9780723e0dad954ff83
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2019-08-09 16:27:18 -07:00
Jigarkumar Zala
f1135e91b9 msm: camara: sync: Add callback registration logic for synx
Synx driver is dependent on camera driver for registering callback
functions of sync driver. This change invert the logic, and camera
driver will register the callback functions for synx driver at the
time of sync driver probe.

Change-Id: I2dbee15ba4c7a9dde336a4bb1f2a4dddcd90348b
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2019-07-09 10:34:33 -07:00
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