Consolidate ion usage functions and bring all ion related
usage into one single function. This helps to easily
write a different allocation wrapper in case a new allocator
need to be used in future.
CRs-Fixed: 2852327
Change-Id: I717ee5a976ae0f148dcdd5a050204514566c823d
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
On encountering a sof freeze we dynamically enable csid sof irq logs.
These need to be disabled to avoid excessive logging based
on threshold count.
CRs-Fixed: 2830502
Change-Id: Ie5a67de047be9f6085323939543a14483c546a03
Signed-off-by: Chandan Kumar Jha <cjha@codeaurora.org>
Add lite flag to csid caps.
Change-Id: I9d5dd2feeb845084a593559e5907c9238f8e3b0f
CRs-Fixed: 2830502
Signed-off-by: Gaurav Jindal <gjindal@codeaurora.org>
In current implementation, cam_ctx_req has a array of
hw_update_entries, in_map_entries and out_map_entries. Each
context has array of N requests. Memory for all contexts is
allocated during probe. This causes a huge memory remaining
unutilized.
This commit moves the memory allocation to context acquire time
and freeing this memory during context release. In place
of using array, now dynamic allocation is used.
A top level calculation shows a memory reduction of around 2M-
2.5M with this change including all the camera drivers.
CRs-Fixed: 2830502
Change-Id: Id63cf2a52272e2a419704dc95100694e384330c3
Signed-off-by: Gaurav Jindal <gjindal@codeaurora.org>
If there is a use-case where lite can be used to support PIX resources,
as a part of acquire, a hint will be sent to indicate that lite can
be acquired. This hint is used to acquire the lite csid based on the
use-case.
CRs-Fixed: 2830502
Change-Id: Ib0a005ed64cd7ffec579195948f0fcb8b24ea837
Signed-off-by: Gaurav Jindal <gjindal@codeaurora.org>
For some chipsets, CSID lies outside the IFE domain. To handle
the cmd buffer programming in such cases, we need to handle
the CSID meta and add change bases accordingly. Reg update for
CSID is also optimized.
Change-Id: I77cceb62681bc46b4ac8a4f54e4051401b02ba36
CRs-Fixed: 2830502
Signed-off-by: Gaurav Jindal <gjindal@codeaurora.org>
Currently, VFE reset information is hardcoded and cpas hw version checks
are used to determine register information. In some hardware versions,
from Waipio onwards, VFE top doesn't support reset and can only be
triggered externally from CSID.
This change adds support for VFE reset for Waipio and allows for loading
of register and hardware information from hardware specific header
files. It also adds the ability to query for supported IRQ based on the
hardware.
CRs-Fixed: 2846451
Change-Id: I915b7a7926f6380c6a650fa10e0c2a65e14a0ec0
Signed-off-by: Anand Ravi <ananravi@codeaurora.org>
Few timer related apis are deprecated, which
resulted into compilation errors.
CRs-Fixed: 2845715
Change-Id: I11a446c589e34552800f706cb774aedc36ec5cd2
Signed-off-by: Shravya Samala <shravyas@codeaurora.org>
CSI2 RX PHY selection and lane swapping shift values are missing in the CSID
480 header file. The values default to zero which results in SOF freeze.
Adding these values restores the RDI functionality post-CSID-refactor.
CRs-Fixed: 2830502
Change-Id: I32c75a4b3a911cb871fd404f9e6d5addd626bb50
Signed-off-by: Anand Ravi <ananravi@codeaurora.org>
This change adds the missing irq registers in CSID 680 lite header files
and also adds fixes required for register update to be received.
CRs-Fixed: 2830502
Change-Id: I1e37936decd3765eb3e75a28f7d3115613dc39b9
Signed-off-by: Anand Ravi <ananravi@codeaurora.org>
Add blob support to get the mup value for dynamic mode switch
from user space.
CRs-Fixed: 2830502
Change-Id: Ia90d8e38aab69c372d80e6817cc950d741648dcb
Signed-off-by: Chandan Kumar Jha <cjha@codeaurora.org>
During acquire, dynamic_sensor_switch_en flag is passed. This is used
to set the enable the bit in CSID rx.
As a part of config_dev, MUP and num_exposures are set.
CRs-Fixed: 2830502
Change-Id: Ie8a42f32b6fc61decff4fe1bddcb8ef41754af3d
Signed-off-by: Gaurav Jindal <gjindal@codeaurora.org>
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
Update the csiphy2.1.0 programming sequence for the update
on 11/19/2020.
CRs-Fixed: 2833124
Change-Id: Ie5c00423bc9dea42996108eeb6722ec975ca065f
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
Abstract the firmware loading and processor boot/shutdown
mechanisms. The device interface is best suited to dealing
with the sequence.
Note this also cleans up some descriptions in struct cam_icp_hw_mgr
that were left over when the debugfs entries were renamed.
CRs-Fixed: 2842016
Change-Id: I1574c799a2b023c02137b32572f8284fe7523188
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
Overflow error irq are not enabled. Debug logs are missing
in dual sync function.
This commit:
Adds error irq mask in CSID.
Enables overflow errors and mup frame drop.
Adds logs for dual sync configurations.
Changes return value to IRQ_HANDLED in path bottom_half.
Optimizes function to print path irq status.
CRs-Fixed: 2830502
Change-Id: I6d03ee659082769152cb1ac14a5486e03c273289
Signed-off-by: Gaurav Jindal <gjindal@codeaurora.org>
In case of sHDR we need to configure same TPG for different vc-dt
corresponding to each exposure channel.
CRs-Fixed: 2823940
Change-Id: I9b754b7f4d0d8e13d81c9c928e2fcc06e05203c0
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
Enhance SFE irq handling, debug capabilities and support
line based config for SFE RDI0-2 WMs.
CRs-Fixed: 2841729
Change-Id: I2057310608f2833819f50f0d61b154421de3b0ad
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
camera io function call needs to use directly
from upstream api's.
CRs-Fixed: 2835738
Change-Id: I54c00bf784721984d060c34e472c6eea4e5ca012
Signed-off-by: Jeyaprakash Soundrapandian <jsoundra@codeaurora.org>
With auto compare flags enabled, compilation fails for some conditions.
This commit changes the comparison condition.
Change-Id: I411ab5127afba3d4073092d8fc44aa36982fbb27
CRs-Fixed: 2830502
Signed-off-by: Gaurav Jindal <gjindal@codeaurora.org>
Add sensor dimensions for all the paths and fix some minor issues.
Fix error handling scenarios.
Change-Id: Idf0e9a58d38c389821ff2c72c0662c7252df3765
CRs-Fixed: 2830502
Signed-off-by: Gaurav Jindal <gjindal@codeaurora.org>
Remove all uses of struct timeval due to deprecation of the API in linux kernel
5.5+. The API is deprecated due to an overflow issue in the year 2038 on 32-bit
architectures.
CRs-Fixed: 2835738
Change-Id: I1d0ebb30cd77e9465121425a3cf7af80127bed6e
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>