This change adds validity check for ife out res. If ife out res is
NULL we can run into crash or issues.
CRs-Fixed: 2915741
Change-Id: I8722b2a4e2634bda42f0080e00bf09050bbd6b91
Signed-off-by: Vikram Sharma <vikramsa@codeaurora.org>
KASAN identified global-out-of-bounds issue on:
msm_cam_hw_cdm_dt_match
Due to no null-terminating struct in the array.
CRs-Fixed: 2883523
Change-Id: I36e4811f239993e1e6de158df959157217c28bfe
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
In WQ congestion case do not trigger UMD recovery as for back to back
apply, apply failure is expected because ISP is in still in applied
state.
CRs-Fixed: 2840473
Change-Id: Ib57e1db1e5bf8f20e5e454d985efc002d50e3ba6
Signed-off-by: Wyes Karny <wkarny@codeaurora.org>
There is chance that handle error info get scheduled
after cdm deinit. As clock and regulator gets disabled
as part of deinit so this can cause issue for cdm hw
interaction as part of handle error.
Added cdm power state check before dumping CDM HW
status at the time of error.
CRs-Fixed: 2833653
Change-Id: I4bf01ce3900196909cf66ffdb24607c50ab03295
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
In process timer, if there are no empty taks then it
returns without unlocking context mutext. This lead
to deadlock later if other tasks are waiting on this
lock.
CRs-Fixed: 2823721
Change-Id: I478d1797be59d975e9d58e005a5fad5c22656f51
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
Add support to dynamically switch pix_pattern of read clients
based on data received in each request.
CRs-Fixed: 2811530
Change-Id: Icb3ebd33cae59b8db87bc0011d6560492ad29c3a
Signed-off-by: Rishabh Jain <risjai@codeaurora.org>
In corner case, there is a chance that userspace can submit
request while flush is ongoing. In some cases submitted request
can get flushed and corresponding data structures memory gets
freed.
Add a logic to check for pending request before submitting request
to cdm hw.
CRs-Fixed: 2815901
Change-Id: I74096201e204f204c4f15d14698b4e9af6435f55
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
After Hw Bl cmd write, we are decrementing write count.
Again after committing BL we are decrementing write count.
Due to this there is a chance of write count becoming -1 thus
leading to CDM overflow issue. Hence decrement write count
only after committing BL.
CRs-Fixed: 2768031
Change-Id: I8faf6ea7d5e9e34e1e034c89132ed131b4d6cafc
Signed-off-by: Shravya Samala <shravyas@codeaurora.org>
Increase max bl limit for OPE to 24 to support maximum
48 stripes.
CRs-Fixed: 2761455
Change-Id: I961be1344fac0084649df321225e94a50d4e5a98
Signed-off-by: Rishabh Jain <risjai@codeaurora.org>
In case if the CPAS registration is failed before freeing the
memory of the subdev, subdev need to be unregistered so that
subdev list entry will not become NULL and other subdev can
be added.
CRs-Fixed: 2708016
Change-Id: I464c73411596fc562fc7a190ddfa130f23ee487a
Signed-off-by: Tejas Prajapati <tpraja@codeaurora.org>
CCI register dump is only enable when dump flag is defined. Remove
this flag and add control via debugfs entry. This change helps
debugfs entry to control cci device individually on the fly for
debugging rather than rebuild.
CRs-Fixed: 2692379
Change-Id: Ic13dc903e861e7c49bf3b375a66b96bfbe5d9c70
Signed-off-by: shiwgupt <shiwgupt@codeaurora.org>
While dumping OPE req list we were not protecting it in context mutex,
this can result into unexpected behaviors. This change take care of
protecting the dump logic with mutex.
CRs-Fixed: 2750458
Change-Id: I916822b498cde3922274c18a06b98c898bff1d65
Signed-off-by: Vikram Sharma <vikramsa@codeaurora.org>
Limit CAM_ERR log in case of no empty task.
CRs-Fixed: 2756270
Change-Id: I688bcff64af135ede221cab0a83c2582efb81330
Signed-off-by: Shravya Samala <shravyas@codeaurora.org>
Check for available slots in FIFO before submitting
gen_irq and debug_gen_irq BL.
CRs-Fixed: 2747279
Change-Id: Iff47aa861f13221e5295d9a3f3521a2514351933
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
In case if the CPAS registration is failed before freeing the
memory of the subdev, subdev need to be unregistered so that
subdev list entry will not become NULL and other subdev can
be added.
CRs-Fixed: 2708016
Change-Id: I464c73411596fc562fc7a190ddfa130f23ee487a
Signed-off-by: Tejas Prajapati <tpraja@codeaurora.org>
Calculate the total clk of all the ctx
irrespective of the use case for the ctx. Remove
dev_type check to add all the ctx clk while
calculating total clk.
CRs-Fixed: 2754351
Change-Id: I5c1681ac1a88cfec752ff58fd8b1f6ac5d05b28a
Signed-off-by: Tejas Prajapati <tpraja@codeaurora.org>
Add support to disable regulator in release dev
CRs-Fixed: 2726194
Change-Id: I9c14989c9902ecdba8a84af0a0a029d8b98a2362
Signed-off-by: shiwgupt <shiwgupt@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>
The cci configuration will be transitioned to a new API that does not
require routing through the v4l layer. This is work-in-progrss so in
the mean time prevent the device from being exposed as configurable
from userspace.
The ioctl will still be exposed to kernel users so fix the arg size
as well. We want size of struct not pointer.
CRs-Fixed: 2702760
Change-Id: I9c7bd8f76980603dbf27e1c5bc9b19f8a3b8a39a
Signed-off-by: Fernando Pacheco <fpacheco@codeaurora.org>
If camera service exits after configdev and before startdev the phy
variables to keep track of the secure bits will be modified and the next
session will be based on this secure bits that was previously set. This
change clears the phy secure bits if the service exits.
CRs-Fixed: 2726185
Change-Id: I69420aed164f66f221569ff60f8771eff40e1548
Signed-off-by: Tony Lijo Jose <tjose@codeaurora.org>
OPE driver maintain the current clock value field per instance
based on clock rate set for OPE clock. OPE driver sets the clock
to turbo during acquire time but doesn't update the internal field
for multiple acquire request. This causes power regression as further
clock calculation happens on previously set clock values for multiple
acquire request.
Corrected the logic to always update current clock value based on clock
rate set during acquire time.
CRs-Fixed: 2724827
Change-Id: Iba377d8918bda37b4d3267e677414a7b9e5a82ce
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
CSID is not able to recover from the fatal errors like lane
overflows, continuous unbound frames and ESD errors. To recover
from such errors, it is necessary to restart the sensor as
just starting the ISP hw do not make any change as the sensor
can still be in bad state.
This commit implements tasklet based CSID recovery mechanism.
On detecting an error in CSID interrupt, tasklet is scheduled
which in turn will call the ISP hw manager to notify the ISP
context, from here a notification is sent to CRM to send a
message to trigger full recovery. This full recovery includes
the sensor release and start.
This feature is debugfs based. Based on need this can be turned
on.
CRs-Fixed: 2674109
Change-Id: I7e4612e9bd24a20691146ae0b9dc6f77ccbc0714
Signed-off-by: Shravya Samala <shravyas@codeaurora.org>
Debug changes for bus overflow issues.
In many error cases it is required to know the bandwidth
applied on axi ports and camnoc axi clock rate values.
Added cpas api to print the current axi bus votes, camnoc axi
clock and ahb vote level.
This api can be called for isp errors such as bus overflow, pxl
overflow cases.
CRs-Fixed: 2731550
Change-Id: I75454c131cce7204b50614703f9914482f3ca7ab
Signed-off-by: Shravya Samala <shravyas@codeaurora.org>
Reduced total number of contexts for TFE from 8 to 4.
CRs-Fixed: 2720374
Change-Id: I03eed741e5cf72c431d7cc5b7f9a418537d1c6f7
Signed-off-by: Shravya Samala <shravyas@codeaurora.org>