Change the default sink from ETR to ETF since this means ETM tracing
can be enabled to the high bandwidth ETF without requiring sink
switching.
Change-Id: Ia4826a0dd76e208db9a9398278a688228e8c1304
Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
Instead of writing FFCR bits 12 and 6 at once, sequence them i.e.
write bit 12 first to set ETB to stop on flush and followed by
setting bit 6 to trigger manual flush.
This should avoid any possible race between flush completing
before bit 12 getting set.
Change-Id: I0567701d34cb33a35d6bd876636a296532b9e400
Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
Change STM traceid from 3 to 16 so that ETM and STM can be used
concurrently if required. ATIDs 0 to 15 are reserved for ETM - one
for each core.
Change-Id: Ic51cf3b8baa9c22be69c952a20281b238750de5d
Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
Since we moved to separate enable nodes for each ETM, using pm_qos
to prevent power collapse of the target cpu while we enable or
disable ETM is less efficient and also susceptible to a race with
cpu hotplug.
Move to using smp call to enable and disable trace to avoid above
deficiencies with the newly re-structured code.
Change-Id: I65c726dbd6275af8db0d40db5034299287a02e91
Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
8064 funnel has 8 ports so allow all to be used. Typo corrections.
Change-Id: I2a442048a2100ab07f34d453f538f89babd9d514
Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
Memory reservation is now required for carve outs. Add appropriate
memory reservation driver support for the TMC ETR carve out.
Change-Id: I31cda1317d31555b70a034eae4c6fdadacd36fdb
Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
With maxcpus=1, only core0 will be running with other cores in
reset until they are explicitly hotplugged on. To avoid reading
ETM registers for cores that are in reset during probe, use only
ETM0 for populating configuration info. For other ETM probes,
copy the info from ETM0.
Change-Id: I9ae4539b004956a026e919323413f9e3c7d5ba4a
Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
Since we can use ftrace event to also log printk to STM, remove
direct logging of printk to STM.
Change-Id: I903e2584b40565513342864827455f0a6cbf2260
Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
Program STM to allow TRIGOUTHETE output (that feeds into the CTI input)
to be asserted when hardware events occur. Also program the STM sync
frequency to 1023 byte interval.
Change-Id: Ia4c9c73d61a50dfc5eb2df5f52921831b647df0e
Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
Ensure that buffer pointer points to the right location while
trying to read TMC in ETR circular buffer mode when we wrap
around.
TMC in ETR circular buffer mode tracks the physical address
in the RWP register (in contrast to pure offsets). Hence
subtract it from the base physical address to get the offset.
Change-Id: Ice1170dcd63928dd8304c421800848e036386b88
Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
Add coresight CSR (CoreSight Slave Registers) device and BAM register
definition for TMC-ETR to support ETR to USB output.
Change-Id: I1f9081a0a684a9a6d5b08361be1e09c323a2d4fe
Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
Support for etr to usb trace output using QDSS BAM to USB BAM
transfers.
Change-Id: Ibb6f8d0cf1d9799668cb22ccaa13966139c8dea5
Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
Change CONFIG_MSM_QDSS to granular CORESIGHT configs covering
various CoreSight drivers. This better represents the CoreSight
device topology and allows more flexibility in choosing the
drivers required for a particular platform or chip.
Conflicts:
arch/arm/configs/msm8960-perf_defconfig
arch/arm/configs/msm8960_defconfig
arch/arm/configs/msm8974-perf_defconfig
arch/arm/configs/msm8974_defconfig
arch/arm/configs/msm9625_defconfig
arch/arm/mach-msm/Kconfig
drivers/coresight/Kconfig
drivers/coresight/Makefile
drivers/coresight/coresight-etm.c
drivers/coresight/coresight-priv.h
Change-Id: I5ae44442c24c88673f2045ad24dc89e4d86d23cb
Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
In cherry-picking patches from tip, the LTC charger driver and pm8921
BMS driver header were updated without updating the copyright
marking from "Code Aurora Forum" to "The Linux Foundation".
Fix this by updating the copyrights now
Change-Id: I3a24feaa6af5acbdca4fc6499398205a1c93dcfe
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
Add minimum amount of wait period in adreno_waittimestamp
to avoid instances of malformed wait period (such as msecs=0)
arguments from userspace and in turn avoid false hang detections.
CRs-fixed: 437738
Change-Id: I5cd40dc7589747e7fffeb6d5cc2001b73d6d845e
Signed-off-by: Harsh Vardhan Dwivedi <hdwivedi@codeaurora.org>
Mutex should be released only if the function locked it
at the beginning.
Change-Id: If83d615a1777a1ccb2a13d070e1b67d002662cb8
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
With video layer in MDP composition, there is no need to apply destination
over blend rule, as z-order of layers take care of proper staging of layers
by default. Apply constant blend to the video layer when in MDP composition
CRs-fixed: 437965
Change-Id: I7476659f12cdf06018bf6ace829a836c86ae97e8
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
Flushing an endpoint involve polling ENDPTFLUSH and ENDPTSTAT
registers. The worst case timeout is 100 msec for each endpoint.
The reason for failure is unknown. When flushing an endpoint
fails, successive flushing of remaining endpoints are also failing.
Hence skip flushing remaining endpoints. Reset this condition
upon USB bus reset.
(cherry picked from commit 2a630fb9b83b31e607ef61f3b61959cc1b095349)
CRs-Fixed: 445916
Change-Id: I54cf860c0d290ffa3fc0d7e41af32b4be48937ef
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
The endpoint must be flushed prior to retiring pending requests.
This is done during disabling an endpoint. Don't flush an endpoint
if there are no pending requests. According databook flushing
endpoint may take large amount of time. This optimization will
make USB disconnect/reset processing a little bit faster.
(cherry picked from commit 58db2c1f94451d7a352d2ad1a1b1e9732f4f0a11)
CRs-Fixed: 445916
Change-Id: I2a8b185d7f6f295485bc1d1b1794f42471149491
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
The ep_disable() function nukes all pending requests before
disabling the endpoint in hardware. The endpoint is flushed
during nuking. Don't flush the endpoint again.
(cherry picked from commit a89f80f9942e5dc2796ad742f9d01f6aa68e1267)
CRs-Fixed: 445916
Change-Id: I84020dceef751dbdde1233068a414a72d1c1b609
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
This reverts commit 994ff121f0c2e3ff00fa38ae2f8dfde4bda1b332.
PM8921 MPP7 no longer must be kept high at all times for targets
using PCDDR3 memory because newer hardware ensures that memory is
always powered when necessary.
Change-Id: I4919abceb875b9ea22e6b2c0bd617280deb7e65b
Signed-off-by: David Collins <collinsd@codeaurora.org>
Signed-off-by: Ajay Dudani <adudani@codeaurora.org>
The runtime PM is disabled for a device during suspend. It is
enabled again just before resuming the device. The resume method
of USB interface drivers are called while resuming a USB device. As
USB device is the parent of an interface, the interface resume is
blocked till USB device resume is completed. If interface driver
call any runtime PM API before interface runtime PM is enabled, it
fails with -EACCESS error.
The USB runtime wrapper usb_autopm_get_interface() decrements PM usage
counter when get_sync() is failed. The current code is decrementing
the PM usage counter even when an error code is returned from
usb_autopm_get_interface(). Due to this double decrementing, the KS
bridge interface PM usage counter is becoming negative after several
suspend and resume cycles. Once the PM usage counter becomes negative,
the interface runtime PM state will never become active. That means,
USB device suspend can happen even when a Tx URB is pending from ks
bridge driver.
The fix is trivial. Don't decrement PM usage counter when error code
is returned from usb_autopm_get_interface().
(cherry picked from commit 361d9af92470ebeeb0a42f73e6eb457ab279b282)
Conflicts:
drivers/usb/misc/ks_bridge.c
CRs-Fixed: 437214
Change-Id: I96c9e1797c137cd158c424ebf6342f607cee6d78
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
In Overlay_play , panel power on check was at wrong place
it has to be after Unblank.
Change-Id: If910f83ef57499b5f771bc7d3d1bdfa814d5c019
Signed-off-by: Kalyan Thota <kalyant@codeaurora.org>
Vote for SFAB clock when requesting to set to crypto high
performance mode.
The SFAB clock needs to be bumped up to its optimal
value when operating in high bandwidth mode (for max
crypto performance)
Change-Id: Ifea68a15d48f737a855acd05e59ac20d4438a9cd
Signed-off-by: Mona Hossain <mhossain@codeaurora.org>
Give the correct address of shared virtual buffer
address to be used during start_app.
Change-Id: Iebe10304c9c295c34eb3e1aeba9255e7c91609cc
CRs-fixed: 434753
Signed-off-by: Hariprasad Dhalinarasimha <hnamgund@codeaurora.org>
Signed-off-by: Mona Hossain <mhossain@codeaurora.org>
Loading of app is stuck waiting for lock on app_access_lock
being released. This mutex is already locked prior to invoking
load_fw.
Removing the mutex lock (already called before invoking load_fw),
in load_fw, fixes the issue with the loading getting stuck.
Change-Id: Ia095bf268c6c1c08dfe1544280567ba4bd4661d6
Signed-off-by: Mona Hossain <mhossain@codeaurora.org>
Add API to allow kernel space clients to bump up
CE clks for improved performance
Change-Id: Iecd13cf4efe9b2b1415be56d3ec9e4dc040918f8
Signed-off-by: Mona Hossain <mhossain@codeaurora.org>
Add support for setting the Crypto HW to operate in
high bandwidth mode before issuing a request to load
image.
This is needed for better performance when using crypto
HW to authenticate the image before loading it.
Change-Id: Ib976d8227e605b9aad8191c6fe8f1dcc5d28e90e
Signed-off-by: Mona Hossain <mhossain@codeaurora.org>
Add support for kernel space client:
- add support for starting secure app by kernel client
- add support for shutting down secure app by kernel client
- add support for sending command to secure app loaded by
kernel space client(s)
The above is needed for allowing kernel modules to communicate
with app running in secure domain.
Change-Id: I3ae3a7648714eb7d7f4801b2f8e7cd94b5c64bdf
Signed-off-by: Mona Hossain <mhossain@codeaurora.org>
Signed-off-by: Hariprasad Dhalinarasimha <hnamgund@codeaurora.org>
Signed-off-by: Mona Hossain <mhossain@codeaurora.org>
All interactions with secure applications on TZ by non-secure
apps on HLOS need the crypto clocks on.
Without this, simple operations as loading secure apps in
Trust zone fail.
Change-Id: I37097cb401508f7582de014e502f3709170ca6b2
Signed-off-by: Ramesh Masavarapu <rameshm@codeaurora.org>
sdmx process should be invoked with the requested
number of bytes rather than with the number of bytes
available in the buffer.
Change-Id: I4541cc4ff15d5c23ca9aad6a85a4d815ece7b21c
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
secure-demux processing function expects to receive a fixed
start address aligned to 4KB along with a read pointer, the
code provided the current address along with a read pointer
set to 0 as fixed value. This may cause the start address not
to be aligned to 4KB.
Change-Id: Ibd4a4c70c3b874df328de9d3fea0437cbdf53028
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Secure mode should be set on feed basis therefore TS and section
feeds should expose API to to set their secure mode. The secure-mode
is saved as part of the feed structure which already exists
instead of allocating special memory to save this info.
Change-Id: Ib081ac893a1f0aa3ee4ac4f333459010b095d7fe
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Addressing the PAN PTS case failure TC_BNEP_BRIDGE_TX_BV_01_I
CRs-fixed: 418765
Change-Id: Ied43be30e41afec4088c5b331eda1431015ebb3e
Signed-off-by: Mallikarjuna GB <gbmalli@codeaurora.org>
Due to simultaneous disconnects from HCI and SCO
this race condtion arrives. While doing SCO disconnect
a null pointer check for HCI connection should be present
to avoid any crash due to this condtion.
CRs-Fixed: 415887
Change-Id: I23f0a7a256e267650db0abc2fc510b964b64c50c
Signed-off-by: Nitin Srivastava <nitinsr@codeaurora.org>
Signed-off-by: Mallikarjuna GB <gbmalli@codeaurora.org>
This is to handle back to back SSR and also spurious
notifications from the smd and the BT on/off or Airplane
mode toggling while SSR is in progress.
CRs-fixed: 425768
Change-Id: I851d8d785c2ff5445d3b8aa95225f1cb63654002
Signed-off-by: Bhasker Neti <bneti@codeaurora.org>
Signed-off-by: Mallikarjuna GB <gbmalli@codeaurora.org>
When pairing is cancelled during the pass key request UI pop
up, call pairing complete after sending SMP_CMD_PAIRING_FAIL
which would clean up all the pairing callbacks and send
notification to the above layers.
Change-Id: I0d3e9bdc19dc2fcae280d3c70ddea976ecb218c7
Signed-off-by: Archana Ramachandran <archanar@codeaurora.org>
CRs-fixed: 430016
Signed-off-by: Sunny Kapdi <sunnyk@codeaurora.org>
Signed-off-by: Mallikarjuna GB <gbmalli@codeaurora.org>
Change has to be reverted to address one user interaction case,
in the process of addressing one issue it made mandate to have
user interactions in some BT scenarios, the issue is fixed via
f8fffe8423933433c30dda4f9a92afc71e8def21 and it addressees all
the user scenarios properly.
More details on this issue is provided in CR: 413132 analysis
section in the prism.
This reverts commit 45df0f99094aefc2564951495ab0005a18d62de3.
Change-Id: I56611cb2646789c71f4012e906a7bbada1236c00
Signed-off-by: Bhasker Neti <bneti@codeaurora.org>
Signed-off-by: Mallikarjuna GB <gbmalli@codeaurora.org>
While turning off BT, sleep is getting called in the soft isr context
from work queue which is queued from a code section guarded under the
bh lock,
To resolve this released the bh lock before queing the work, as it wont
impact any BT functionality.
CRs-fixed: 405917
Change-Id: I1b872d724b4d0d384cc5314e0f493facd9829a54
Signed-off-by: Bhasker Neti <bneti@codeaurora.org>
Signed-off-by: Mallikarjuna GB <gbmalli@codeaurora.org>
If the bonded remote device is removed from the list of paired
devices in the DUT, it is still possible to connect to the DUT
from the remote device without any user confirmation.
CRs-fixed: 413132
Change-Id: Iea3e4cf41e5403c3e304ca5f82cf42266be35b79
Signed-off-by: Bhasker Neti <bneti@codeaurora.org>
Signed-off-by: Mallikarjuna GB <gbmalli@codeaurora.org>
When whitelist APIs are used for establishing LE connection
between the phone and remote LE device, few times
ATT requests like Read by Group Type request are received by
the phone from the remote device before the L2CAP channel has
been set up completely. Hence the LE server in the phone
sends a "Request not supported" error response since
the L2CAP channel has not yet been created. This fix checks
the state of the L2CAP channel after sleeping for a while
and sends the ATT request to be processed by the upper layers
when the L2CAP channel is up.
CRs-fixed: 415648
Change-Id: Ifbaf75fe612195b3c6ce49629106cac09dd0a437
Signed-off-by: Subramanian Srinivasan <subrsrin@codeaurora.org>
Signed-off-by: Mallikarjuna GB <gbmalli@codeaurora.org>
Based on the user requirement for auth type, update even
the pending security level. This will make sure the authentication
requirement matches the action at kernel space on connection
establishment.
CRs-Fixed: 385463
Change-Id: I94c7e621c105bb2180e6e722cc8cca17869ff2e5
Signed-off-by: Srinivas Krovvidi <skrovvid@codeaurora.org>
Signed-off-by: Mallikarjuna GB <gbmalli@codeaurora.org>
Extradata is appended at the end of each output buffer
in non secure video use case but in secure video playback,
the client/CPU don't have access to the output buffer
to parse the extradata. This change allows the client/CPU
to parse the extradata by allocating separate buffers for
video hardware to store extradata.
Change-Id: I12927ea3d142b9cecd6fb1ae1086c5624d0e08d6
Signed-off-by: Deepak Verma <dverma@codeaurora.org>
In order to support extra data during secure playback,
video core meta data buffers need to be allocated from
MFC heap. This is required as both HLOS and video core
have read-write access to this heap. As each meta buffer
size is 8KB and there can be 32 meta & output buffers,
increase the MFC ION heap size by 256KB.
Change-Id: I033d24c9d02a879e38c5f6d86b2b6c0a767ec25c
Signed-off-by: Deepak Verma <dverma@codeaurora.org>
This change adds support for demuxing of encrypted streams which current
software demux implementation does not support.
User-space API is extended to allow setting of key ladder information
needed in order to perform decryption.
If secure demux application is available, demuxing does not take place in
the dvb demux sw filter anymore but instead is performed in the new secure
demux, regardless of whether the stream is encrypted or not.
Otherwise, the dvb demux sw filter will be used as before and demuxing of
encrypted streams will not be available.
Change-Id: If75a7b03d1f13d3b012250b87c25eaf6d6cbc399
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Report counters for transport error indicator, continuity-counter
errors and total number of TS packet constructing a PES in the
PES events so that applications can decide whether to decode
or drop the packet based on the errors information.
Change-Id: I8680163783a12c4f2518cd83fa0b3c7dfa882c34
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>