This change fixes a known issue:
Operands in a bitwise operation have different size.
CRs-Fixed: 3523401
Change-Id: Ic7ef67a5bc5413c137fee7693efb2d7ad53ceb50
Signed-off-by: Stark Lin <quic_starlin@quicinc.com>
Now isp state monitor is moved into dbg_monitors, but some function
is still using isp state monitor in struct cam_isp_context. we should
use isp state monitor in dbg_monitors and need to remove isp state
monitor from struct cam_isp_context.
CRs-Fixed: 3514701
Change-Id: Ib993f25234654ad5be74617d6ddb82355ece33bc
Signed-off-by: mingpan <quic_mingpan@quicinc.com>
camera-kernel:
7658ef4a Merge "msm: camera: cpas: handle return value in cpas start sequence" into camera-kernel.lnx.dev
7a9a0042 Merge "msm: camera: isp: Add support for composite config in csid v980" into camera-kernel.lnx.dev
328af2b1 Merge "msm: camera: uapi: Add support for composite config in CSID v980" into camera-kernel.lnx.dev
445799d8 Merge "msm: camera: isp: Add UAPI to get RCS flag" into camera-kernel.lnx.dev
Change-Id: I29330bfa8bcba1484d8379e89f7ff21c30f51ce3
Signed-off-by: hchintal <quic_hchintal@quicinc.com>
On v980, context-based IPPs are introduced, per TFE hw. This
change programs the IPP_IRQ_COMP_CFG0 register, which has
information on how the IPP ctxt paths from CSID (post CAMIF)
are mapped to the ctxt paths in TFE.
Since this information can change dynamically, per frame basis,
this is programmed by UMD through command buffer. This change
provides the support for it.
CRs-Fixed: 3321317
Change-Id: I845bba4b7fd09eeb42821b5b7f1cbc6022abe631
Signed-off-by: Li Sha Lim <quic_lishlim@quicinc.com>
Signed-off-by: Gaurav Jindal <quic_gjindal@quicinc.com>
Signed-off-by: Mukund Madhusudan Atre <quic_matre@quicinc.com>
Signed-off-by: Suraj Dongre <quic_sdongre@quicinc.com>
New register IPP_IRQ_COMP_CFG0 needs information regarding active
contexts in CSID CAMIF, and TFE from userspace. This change
provides the support for it.
CRs-Fixed: 3321317
Change-Id: I9cd85a4392f4f5602c3865526acc3bc13cbf8472
Signed-off-by: Li Sha Lim <quic_lishlim@quicinc.com>
RC value is getting modified during CPAS start in error
scenario. Handle return value which helps to retain
the original rc value.
CRs-Fixed: 3477436
Change-Id: I7006c60c1c5903c85f18f6eb385859b43b0cedc9
Signed-off-by: Chandan Kumar Jha <quic_cjha@quicinc.com>
Few ports with UBWC needs RCS enablement. This commit adds
hint from userland to indicate if RCS can be enabled. This
information is passed as a part of acquire.
CRs-Fixed: 3321317
Change-Id: Ic7375de0091ab3aebec70cc521be85585362555d
Signed-off-by: Gaurav Jindal <quic_gjindal@quicinc.com>
camera-kernel:
2fb1d4b5 Revert "msm: camera: isp: Add support to stream on csid for v980 hw".
Change-Id: I9d0ef82694f21aa3b7fc40d1e1a1afd5af839696
Signed-off-by: hchintal <quic_hchintal@quicinc.com>
Add support for camera modules to be built,
with Bazel DDK framework for pineapple.
CRs-Fixed: 3378634
Change-Id: I9f1d7562ea3aad6e0c198e3818099fc9f6b4aa97
Signed-off-by: Soumen Ghosh <quic_soumeng@quicinc.com>
Add support to allocate IPP1/2 resources and handle corresponding
configuration. Add support to skip camif and cfg1 register
programming so that the cmd buffer settings could take effect.
CRs-Fixed: 3321317
Change-Id: I959666aa14618741148320a50e53f252882b6874
Signed-off-by: Mukund Madhusudan Atre <quic_matre@quicinc.com>
Address the inconsistency in a function prototype
across multiple kernel versions.
Change-Id: Ib5d3c3df74a89a019b0f1f858746888ce0101512
CRs-Fixed: 3509086
Signed-off-by: Vijay Kumar Tumati <quic_vtumati@quicinc.com>
Signed-off-by: wasikhan <quic_wasikhan@quicinc.com>
Dump cpas vote info when CRM dump request, just like
cam_req_mgr_dump_state_monitor_info.
CRs-Fixed: 3441303
Change-Id: Ic5c2e671a27593ef1c25fa650c2148dd88c9968f
Signed-off-by: mingpan <quic_mingpan@quicinc.com>
When crm close, call free link which free in_q.
The in_q ptr is null. It will result in null
in_q ptr deref when call notify trigger. So need
add spin lock to protect req data.
CRs-Fixed: 3488142
Change-Id: I25101f00e07bd56f1449085f2c6ce3ce3141adc3
Signed-off-by: Wang Kan <quic_wkan@quicinc.com>
Use SCM 7 call during the process shutdown. This is to
workaround a race condition between the close of camera FD
and the invoke driver FD that leads to a device crash.
Additionally, keep the Domain ID clocks on only during
protect or unprotect operations.
CRs-Fixed: 3509086
Change-Id: Ic091aa737df10bb2b41190c2f850c31fd17af9b2
Signed-off-by: Vijay Kumar Tumati <quic_vtumati@quicinc.com>
Add support to pre-process acquire information for csid ipp
paths, and make sure correct resource is acquired. Add support
to have destination mask consolidated for camif resource in vfe.
Add hw context id info for vfe output resource acquire. Add
support for exceptions in context config for certain bus ports.
CRs-Fixed: 3321317
Change-Id: I5a812c29c1aaa72d186d0398a024c0da76ec862b
Signed-off-by: Mukund Madhusudan Atre <quic_matre@quicinc.com>
Signed-off-by: Suraj Dongre <quic_sdongre@quicinc.com>
problem:
scm calls to enable/disable SAFE signal introduced due to HW limitation
in some targets from ife causing overall system delay whenever
camera starts and other HW components also making scm calls.
solution:
prevent redundant SCM calls for SAFE signal.
CRs-Fixed: 3511194
Change-Id: Ib6692d599e9ec9e9182a9e6eb0aef52322cbfdef
Signed-off-by: Pranav Sanwal <quic_psanwal@quicinc.com>
IFE cpas state monitor enhancement by printing ctx id,
hw index, frame id, event id and request id.
CRs-Fixed: 3368290
Change-Id: I41a01382ec2bc6f0c7b9f89c8bb20da42774a65c
Signed-off-by: Wang Kan <quic_wkan@quicinc.com>
camera-kernel:
1f7b1774 Merge "msm: camera: isp: Add Multi Context IRQ support in CSID Driver" into camera-kernel.lnx.dev
b1dd6a97 Merge "msm: camera: isp: Add support for Multi Context IO Buffer Config" into camera-kernel.lnx.dev
2594b82b Merge "msm: camera: isp: Transfer rightly hw err info from ife to isp ctx" into camera-kernel.lnx.dev
8d5f3851 Merge "msm: camera: sensor: Add process evt interface for i2c sensor" into camera-kernel.lnx.dev
877b58c6 Merge "msm: camera: common: Fix isp log errs and format errs" into camera-kernel.lnx.dev.
Change-Id: I7b413a292645660f3ea27423ce3390b820f2d8d9
Signed-off-by: hchintal <quic_hchintal@quicinc.com>
Adds support in Multi Context IRQs in CSID Driver.
CRs-Fixed: 3321317
Change-Id: I49e1645b1f655b02e8097158798e23259598b8ee
Signed-off-by: Gaurav Jindal <quic_gjindal@quicinc.com>
In case of multi context supported targets for MC ports,
before configuring the bus related registers, correct context
needs to be configured to update the correct registers in the
respective context domain.
This commit adds support for context selection register
and update the io buffers for each context sequentially.
CRs-Fixed: 3321317
Change-Id: Icd660c2dfa56fad0d349679701a638943a0e833c
Signed-off-by: Gaurav Jindal <quic_gjindal@quicinc.com>
Fix isp log errs and format errs.
CRs-Fixed: 3499636
Change-Id: Ieb5b81b95dea440b1da17cb5bc9be86f75b7c4f6
Signed-off-by: Wang Kan <quic_wkan@quicinc.com>
When check CSID frame size err, is not bus overflow, result in
the err event data don't get error type info and can't transfer
hw err info rightly from ife hw to isp ctx. So first let err
event data get err type info.
CRs-Fixed: 3500372
Change-Id: Ia90a8c28028ae63174d30d2513e6d1f042810d43
Signed-off-by: Wang Kan <quic_wkan@quicinc.com>
This change is to validate session, device and link handle.
Also, checks whether the device handle belongs to
correct session handle or not.
CRs-Fixed: 3496553
Change-Id: I6b86bf7d0908a280e90e085a3b3e1727facdf8c6
Signed-off-by: Karthik Dillibabu <quic_kard@quicinc.com>
camera-kernel:
2ed8378c Merge "msm: camera: isp: Avoid race condition to prevent list corruption" into camera-kernel.lnx.dev
4fcf71ff Merge "msm: camera: sensor: Check the result of i2c transfer" into camera-kernel.lnx.dev.
Change-Id: I49de5733995595180987f43220b86c802164885b
Signed-off-by: hchintal <quic_hchintal@quicinc.com>
in case of back-to-back bubble requests, We do internal recovery.
We don't have locks for list protection in the internal recovery flow.
From the core dump, we had seen that we were handling bubble in one core
but we had done list modification on another core during internal
recovery without list protection, which results in list corruption.
We are accessing the request queue during internal recovery without
any locks which are resulting in list corruption.
We need to use locks to prevent list corruption in the internal
recovery flow.
CRs-Fixed: 3444802
Change-Id: Id72077647795e51e112b030d4fb75d80299c1bed
Signed-off-by: Chandan Kumar Jha <quic_cjha@quicinc.com>
The i2c transfer interface returns the num of message is
processed if there is no issue, this change checks if the
result of i2c transfer is same with the num of message,
the return value is assigned as 0 if they are same.
CRs-Fixed: 3495774
Change-Id: I408038120ac2371f1ed031daa364c2e2563e3606
Signed-off-by: Depeng Shao <quic_depengs@quicinc.com>
It is wrong to use crop_v_en_shift_val and early_eof_en_shift_val
to do AND operation with cfg1, instead, we should use
BIT(crop_v_en_shift_val) and BIT(early_eof_en_shift_val). Besides,
register rup_aup_cmd_addr is not a readable register, so we can't
read it's value from it.
CRs-Fixed: 3500551
Change-Id: Ied566a968b0403498ce859544659f9dbe40ce770
Signed-off-by: mingpan <quic_mingpan@quicinc.com>
Sometimes need to avoid access clock/regulator/icc api, this change
add support bypass clock/regulator/icc wrapper through enable
some debugfs parameters and devicetree.
CRs-Fixed: 3445248
Change-Id: I0546975bf063625b39b771c776813e7dbff84e06
Signed-off-by: zhuo <quic_zhuo@quicinc.com>
In VFE top, currently it is assumed that frame timing
IRQs will be part of status 1 register. Remove that
assumption to support v980 hw as well. Also, when
frame irq debug is enabled in ife hw manager, don't
trigger callback, as we just want to see if frame
reached IFE/TFE or not.
CRs-Fixed: 3321317
Change-Id: I544727d4bec628b9041531015f24bf73e8ae2be1
Signed-off-by: Mukund Madhusudan Atre <quic_matre@quicinc.com>
For v980, new formats are added. This change also
fixes mismatch of plain16_10_lsb format between
kmd and userspace.
CRs-Fixed: 3321317
Change-Id: I1d951d3e55b37b11ebe6dad67bea220d47998d59
Signed-off-by: Li Sha Lim <quic_lishlim@quicinc.com>
This change adds support to detect early
unmapping of buffers from UMD, and signal
when the error occurs by sending an error
code to UMD.
At present, buffers are allocated and/or mapped
by UMD, and the following sequence occurs.
KMD prepares packets sent during a config ioctl,
and these packets reside in the mapped buffers;
HW blocks then access these buffers, and may
write output to other mapped buffers(io buffers);
Once HW is done(upon a buf done), KMD signals
this event to UMD;
UMD may free/unmap these relevant buffers.
This change adds support to detect cases where a
free/unmap happens before/while HW is accessing
these buffers.
This feature is enabled by default, but a debugfs
variable disable_buf_tracking is added under smmu
which will enable the user to disable the feature.
Camera server needs to be restarted whenever this
variable is set/unset for changes to take place.
CRs-Fixed: 3382609
Change-Id: I39c3f0c373743c10bc2e6304ffbdc820e3c95970
Signed-off-by: Li Sha Lim <quic_lishlim@quicinc.com>
HWPD is associated with several modules, but only image size violation
displayed in the kernel when an error occur. Now we will pass the error
code of HWPD violation to UMD to help UMD to take necessary action and
dump relevant info.
CRs-Fixed: 3440015
Change-Id: I6483b228a8eeaac3bf54f5f83f8f8deab3da6250
Signed-off-by: Stark Lin <quic_starlin@quicinc.com>
Allocate memory based on what is configured to FW. Avoid
hardcoded allocations, thereby reducing the memory
footprint. The change also updates size check for a SMMU
mapping, if the size of the buffer is beyond the assigned
va range fail the mapping.
CRs-Fixed: 3477543
Change-Id: I3c2e262f57cdfdbd51255679b2405d855d7d5353
Signed-off-by: Karthik Anantha Ram <quic_kartanan@quicinc.com>
Reduce size of the buffer to drain the dbg_q. Add a mutex for
dbg_q, and in HFI read validate the input buffer size prior
to copying the queue contents into the input buffer.
CRs-Fixed: 3477543
Change-Id: I2043f3db6189ebfc8b8ead8db0266a83bc94b6a2
Signed-off-by: Karthik Anantha Ram <quic_kartanan@quicinc.com>
Monitor frame events driving the state machine.
To better understand what led to the state machine stalling update
debug info that is logged on errors.
CRs-Fixed: 3309151
Change-Id: Iccf0efd82069b342e5d4b1731292604d37263b0b
Signed-off-by: Karthik Anantha Ram <quic_kartanan@quicinc.com>
Correct the check for comparing SMMU client names when
trying to create new handles.
CRs-Fixed: 4653426
Change-Id: I04e0d75e87bf88f1ae05b7d61b6853ac6794d6eb
Signed-off-by: Karthik Anantha Ram <quic_kartanan@quicinc.com>
Current logic of logging passes the strings as arguments to
logging Macros. This converts them into string literals and
increase the data section size.
This commit changes the logic to convert the tags into
strings inside a function, thus optimizing the data section size.
Top level estimations shows the reduction of 1.5MB .ko size.
CRs-Fixed: 3470008
Change-Id: Ifcd5bedc374e8c5f36b8c0be5ae050959b432666
Signed-off-by: Gaurav Jindal <quic_gjindal@quicinc.com>