Replace request_firmware API so that no warning messages
are generated when the file is not found. sysfs callback
mechanism is enabled if direct filesystem lookup fails.
CRs-Fixed: 2841729
Change-Id: I6dd892690ca9d38a90a6e0623d87421e889dbeca
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
Reset the flag post shutdown, instead of resetting it prior
to calling into HYP.
CRs-Fixed: 2841729
Change-Id: If0bed24a22e1084135df81dc5a72b395e92adb2c
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
Use paddr when loading FW elf segments to support TCM.
CRs-Fixed: 2722486
Change-Id: I5ab9805d44ede38c8163df73f09eea49c44eab82
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
Starting from waipio, ICP [lx7] FW is to loaded using
secure PIL. For debug purposes also added support for
non secure image loading for lx7.
CRs-Fixed: 2722486
Change-Id: I30026fb8e65f323ab73336e0ae787a2359bc934f
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
Use fw_uncached region instead of secondary heap region. Pass
this region information to FW through CSR registers.
Allocate Qtlb, cmd_q, msg_q, dbg_q from fw_uncached region
instead of shared mem region. Allocate Sec heap also from
fw uncached region instead of its own dedicated region.
CRs-Fixed: 2722486
Change-Id: Ib88b2202ca1b610946c712fcca936b72d4eecd15
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
The LX7 firmware loading sequence will rely on the
Peripheral Image Loader (PIL) framework to load and
authenticate the image. Enable the driver to utilize
the framework.
CRs-Fixed: 2842016
Change-Id: I3351fd843baf096ac57257a88b7e78325a10a3bf
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
The devices interface allocation flow assumes that there is only
one possible processor. This will no longer be the case and
we must update the flow to support any choice of processor.
CRs-Fixed: 2842016
Change-Id: I7f7767a5b5f9e8c9de08f0692014e3f84d69e3d1
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
Add initial support for the LX7 processor.
Support for firmware loading and processor boot are
still pending. 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: 2722486
Change-Id: I626cc27e26e1ebac8ec6b4509ab5da2a013457b1
Signed-off-by: Karthik Anantha Ram <kartanan@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>
Use the a5 firmware name from soc info instead of hard coding.
CRs-Fixed: 2825675
Change-Id: Ifb089857777ae4d48c1c7ab6f12259a711c46152
Signed-off-by: Vikram Sharma <vikramsa@codeaurora.org>
Check ICP HW state before processing any IRQ to avoid
any unclocked access.
CRs-Fixed: 2816854
Change-Id: I31fc03f655b1068f5d171385891eba7d281bd4fd
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
Whenever there are NRT request then bump-up ipe clock
to max. Clock will get reduced as part of context timer expires.
CRs-Fixed: 2793751
Change-Id: I28a0b32bd52b58e293439042008711ea454a64f3
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
If io config send failure happens, currently dumping the
io configuration for debug purpose. If more io configuration
data is there, it will cause excessive logs. So removed
io configuration dump in icp driver. On acquire failure,
acquire node can dump the same.
CRs-Fixed: 2800304
Change-Id: I4c6a7973eb789de8c3384311bce033070e07692f
Signed-off-by: Ravikishore Pampana <rpampana@codeaurora.org>
Drop references to A5 within the debugfs entries so that they
may be reused with other processors.
CRs-Fixed: 2722486
Change-Id: I2680a98dd3d38906e616712da3d6e2835ebb9a85
Signed-off-by: Fernando Pacheco <fpacheco@codeaurora.org>
The A5 references sprinkled throughout the hw manager will no
longer make sesne within the context of two possible processors.
We will instead prefer the more generic "icp" term to reference
the processor in use e.g. icp_dev instead of a5_dev.
Note that some references to A5 remain and will be cleaned up
when LX7 is introduced.
CRs-Fixed: 2722486
Change-Id: I9af73cc2af27a2aed2f4d7baaead89a20442e9ed
Signed-off-by: Fernando Pacheco <fpacheco@codeaurora.org>
The HFI interface registers will have a different base address
on the LX7 processor. We can utilize the newly added HFI ops to
abstract the calculation of the address by kicking that info out
to the device interface. The HFI register definitions have been
tweaked to support offsets based on the calculated addresses.
CRs-Fixed: 2722486
Change-Id: I93b9b2827ec0820eaac6ee2e6a611363b96a3223
Signed-off-by: Fernando Pacheco <fpacheco@codeaurora.org>
The steps to enable and send interrupts will differ between processors.
Pull this logic out of the HFI and out to the devices, so that we can
adapt to the specific irq management of any processor.
CRs-Fixed: 2722486
Change-Id: I2a889b91ec13295aa14bb2b16252332482a1225a
Signed-off-by: Fernando Pacheco <fpacheco@codeaurora.org>
The LX7 processor will require a new mechanism to resume/collapse.
Make the current mechanism transparent to the ICP HW manager in
preparation for the new proc. By going through the hw_ops we let
the device interface decide which mechanism to use.
CRs-Fixed: 2722486
Change-Id: I719314b3f505270a33892cb247082e43dad2e92d
Signed-off-by: Fernando Pacheco <fpacheco@codeaurora.org>
This change extract the fuse info from DTSI and reads the fuse
value then communicate the same to user space using query_cpas_v2
ioctl.
CRs-Fixed: 2749665
Change-Id: Ie161dc58a7eab3e7b74a5c406ab696af0e7b546e
Signed-off-by: Vikram Sharma <vikramsa@codeaurora.org>
Handle event failure reason propagation in camera kernel
driver. Individual camera kernel driver will fill reason
codes for sync failure and send it to sync driver. Sync
driver will add this as part of sync event header and
propagate to user space.
CRs-Fixed: 2750553
Change-Id: I284390fc45757ba8291a44400e2263b9be64b092
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
Improve the error-handling code paths to prevent accesses to
uninitialized variables. This is done by either picking a sane
default for the variable or skipping accesses altogether after
an unsuccessful attempt to initialize.
CRs-Fixed: 2748220
Change-Id: Ibe383e56ec4e3f45f76f619c7d6b62c3d7dfcadb
Signed-off-by: Fernando Pacheco <fpacheco@codeaurora.org>
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>
Handle request abort cases from underlying hw mgr, hw layers.
This will handle in differentiating ERROR vs ABORT returned
from firmware in case of ICP and signal the fence accordingly.
By the time flush is issued to firmware, if a request is not
yet processed, firmware signals with Abort, which needs to be
propogated as CANCEL instead of ERROR to core context layer
so that context layer signals the fence accordingly as
ERROR or CANCEL.
CRs-Fixed: 2702771
Change-Id: I8fe6bd1c8f5cf09b99196a1caac1283032418f8c
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
Fixes exit call flow as a part of rmmod.
CRs-Fixed: 2675526
Change-Id: I47111a737cb06d9bb3d0a417a471c5c9fb545999
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
Added wrapper functions for each workq to enable workq names
in log.
CRs-Fixed: 2684378
Change-Id: If5b3671fbf20777cc891cba4b27cad6ed3a0d146
Signed-off-by: Wyes Karny <wkarny@codeaurora.org>
Add support to discard a memory region inside the full dma map
virtual address space region.
CRs-Fixed: 2580128
Change-Id: I76cc778f2437a01a4efabec836ce92c47d983d61
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
Do not rely on timer expiry to remove bw of current context
if it is getting released. If context release is coming
before timer expiry (from last request submit), we are not
removing current context's vote from hw mgr and thus
from cpas. This will accumulate the bandwidth and causes
clocks to go to turbo and also into overflow issues if
the bw variables in cpas are wrapping around in long
hours testing.
CRs-Fixed: 2617278
Change-Id: I11d837bf7224ac4573fee32518f7f57ad9bf49f0
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
When user space detects an error or does not receive
response for a request, Lets do a reset(LDAR) is triggered.
Before LDAR, user space sends flush command to the
kernel space.
In order to debug the cause for this situation and to dump
the information, user space sends a dump command to the
kernel space before sending flush.
As a part of this command, it passes the culprit request id
and the buffer into which the information can be dumped.
Kernel space traverses across the drivers and find the culprit hw
and dumps the relevant information in the buffer.
This data is written to a file for offline processing.
This commit dumps the information for NRT devices; JPEG,
LRME, FD and ICP.
For LRME, FD, JPEG context information is dumped.
FOR ICP, fw image is dumped.
Change-Id: I123e9b8289521a40d88156ba9bd0003ad9602f01
CRs-Fixed: 2602180
Signed-off-by: Gaurav Jindal <gjindal@codeaurora.org>
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>