kref operation is atmoic operation, so no need to use mutex
to protect it, and the cam_mem_put_cpu_buf is also called
in spinlock context, so we can't use mutex lock in this
function. This change removes the mutex lock for kref
variable protextion.
CRs-Fixed: 3786887
Change-Id: Ic05bdafacf06cde6a8d8dbae7512e5d22eb7f514
Signed-off-by: Depeng Shao <quic_depengs@quicinc.com>
(cherry picked from commit bb64b99c83b3bb6da0c241eda74ebe8a19b51840)
Adds proper sanity on virtual cdm right operation to avoid
OOB register space access. After getting the mapped buffers
through cam_mem_get_cpu_buf() in kernel, userspace is still
able to access those buffers. So, the validation of offsets
and sizes does not have any advantage if userspace can alter
those parameters after we have validated them. That's why we
copied the information in kernel before we validate that.
CRs-Fixed: 3778045
Change-Id: I3b53549419b40a92333263e29d93220577d691e9
Signed-off-by: Yash Upadhyay <quic_yupadhya@quicinc.com>
- Validation of settings_array_offset which is populated
from umd as sizeof(CSLTPGSettingsConfigCmd).
CRs-Fixed: 3788500
Change-Id: Ic848d537f1b56bcfc47b295b063e9670313c9a33
Signed-off-by: Abhilash Mahapatra <quic_abhmah@quicinc.com>
Currently krefcount is using by umd and kmd. Due to sometimes
there is issue in umd, such as release twice. That maybe causes
buffer release before kmd access the buffer. This commit add
a new refcount to track umd in use buffers and use current krefcount
to track kmd in use buffers. For the same buffer use in kmd and umd
only when all refcount become zero, the buffer start to release.
CRs-Fixed: 3692103
Change-Id: I5a58d9bab4c82bdb192d6a6a3d2b3d254dc04c9e
Signed-off-by: zhuo <quic_zhuo@quicinc.com>
TFE is programming WM's bw limiters with default value
without considering if it's already set via blob from UMD.
Skip bw limiter programming for TFE WMs for which
limiter values programmed via blob.
CRs-Fixed: 3767707
Change-Id: I30190def8b2a08c577b3bf1fa71fd2fe3db53c86
Signed-off-by: Alok Chauhan <quic_alokc@quicinc.com>
I2C cmd is coming from user space which can be modified due to
access to shared memory. This change scopes the data locally so
as to avoid vulnerability of count being modified by external
means while executing due to being in shared memory.
CRs-Fixed: 3707472
Change-Id: I8a89e23e99b80b089ed4c4cf3098feead752356e
Signed-off-by: Shivi Mangal <quic_smangal@quicinc.com>
(cherry picked from commit 4e00cc5f9f81bf471d58ee5d6beb210a5326fcff)
Handle out_of_sync_frame_drop interrupt as non fatal till
3 successive occurences. fix prevention of mup bit override
when programming RDI.
CRs-Fixed: 3638271
Change-Id: Ie2f7ef476b76b5074b12b0eb503ae0be1100611a
Signed-off-by: Pranav Sanwal <quic_psanwal@quicinc.com>
Decrease max value of usleep_range during sensor power on/off
CRs-Fixed: 3698124
Change-Id: If152fce49331fa057cf6bcb63f99b17b184dd00e
Signed-off-by: liji <quic_liji@quicinc.com>
(cherry picked from commit a4c76acef4188da15247304a58d262b4d2bb9c8d)
This change fixes prevent issues like incorrect
sizeof expression and incorrect format specifiers
in cam_isp.
CRs-Fixed: 3751374
Change-Id: Ia1383a655412176c4de30ef17412c2ff900f768e
Signed-off-by: Shivakumar Malke <quic_smalke@quicinc.com>
Fixes missing logging parameter in few of the logs.
CRs-Fixed: 3758192
Change-Id: Ic4d351fdf11213c515d975bda48a299e885e123d
Signed-off-by: Yash Upadhyay <quic_yupadhya@quicinc.com>
For Camera DMA and Synx object, multiple locking and
unlocking of fence object of fence object.Added check
to avoid double locking and unlocking.
CRs-Fixed: 3747628
Change-Id: I3ff9d448196c223d34f5e9ea049ff93154002422
Signed-off-by: Sourabh Soni <quic_soursoni@quicinc.com>
During ICP component bind, if any failure occurs, the icp_dev
struct is not freed. This change addresses that scenario.
CRs-Fixed: 3750367
Change-Id: Iee00b154bd209441b72ce8498999d85e6b940793
Signed-off-by: Nirmal Abraham <quic_c_nabrah@quicinc.com>
PP overflow, Pdaf violation issues were observed after
flush in stop sequence on crow. This change fixes csid
halt sequence for any usecase by correctly setting halt
mode and cmd while enabling and disabling ipp/ppp paths.
Here we are setting halt cmd to resume at frame boundary
at start and halt at frame boundary at stop.
CRs-Fixed: 3628412
Change-Id: I804e8077676e461376b49446ffbf74d0fb8c092e
Signed-off-by: Yash Upadhyay <quic_yupadhya@quicinc.com>
Currently, onthego sysfs module only supports
configuration for one PHY at a time, and the
PHY cannot be selected, the configuration
committed will be applied to whichever PHY that is
streamed on after the settings is committed.
This change adds support to program multiple
settings for each PHY, and support for specifying
a particular PHY for which the setting is to be
applied.
CRs-Fixed: 3681877
Change-Id: Ia9555491dbfe40c83837897ac20662d9491dd82d
Signed-off-by: Li Sha Lim <quic_lishlim@quicinc.com>
multiple targets can have same kernel config which can break
existing camera bezel compilation. Added support for multiple
project compilation for camera.
CRs-Fixed: 3740838
Change-Id: I6d0a6ccdbf0bdd4b090e45a0464d96c06b7bc4af
Signed-off-by: Alok Chauhan <quic_alokc@quicinc.com>
This change add support for EPD mode high data
rate sensors which send EPD instead of EOT. This
change is only for CPHY EPD sensors and not applicable
to DPHY EPD sensors. For CPHY EPD sensor, EOT error masked.
CRs-Fixed: 3736696
Signed-off-by: Alok Chauhan <quic_alokc@quicinc.com>
Change-Id: I5ef0dac8e590daa1c4f3bc217f7da81a7a193dfe
On checking IRQ status on cdm hang detection, if the
inline IRQ is set then the cdm has triggered IRQ, but
there could be workqueue scheduling delay causing cdm's
config timeout. To prevent the timeout due to scheduling
delay check both work record and irq status and return
true if its delay.
CRs-Fixed: 3433175
Change-Id: Iaa34f8ff9b57e7da9f80677a7da9b4f9a53dad14
Signed-off-by: Yash Upadhyay <quic_yupadhya@quicinc.com>
For I-EXP to 2-EXP usecase in autoHDR (without SFE), the
condition which checks whether packet is applied was failing.
Req N-1 : 1-EXP, pd=1, dev_mask = 0xd,
Req N : (2-EXP) added to CRM, dev_mask changed to 0xf for 2 IFE's,
Req N-1: after packet applied, the condition which checks
applied_map(0xd) with dev_mask(0xf) was failing.
Correct this by comparing the applied_map with the active device's
bit map.
Signed-off-by: Nirmal Abraham <quic_c_nabrah@quicinc.com>
Change-Id: I2172208ce81d2d0e71a5f0e4eb57f3f7b5745194