This change adds ipc logging support for qdss function
driver.
Change-Id: I53be137a161bd7a4b0c4be250938e8fa46b2254e
Signed-off-by: Pratham Pratap <prathampratap@codeaurora.org>
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
Do not release CVP persist buffer until all outstanding frames
are handled by firmware.
Change-Id: I4cbff7898f57db82bd3ab2ee8a9a15873e458f2d
Signed-off-by: George Shen <sqiao@codeaurora.org>
idle_tick is a periodic timer which sends the interrupt to cpu
for every jiffy. If next event is read before stopping the cpu
idle_tick it gives the next tick expiry time as the next event.
Current logic reading the cpu next event time before stopping
the idle tick gives shallower sleep length recorded. This prevents
cluster low power mode to get selected since next wakeup is seen
either very near to current time or as already expired.
Fix this to read next event after idle_tick has been stopped.
Change-Id: I8016c7911dc48450668a8a6bc7a6d01d4423da32
Signed-off-by: Raghavendra Kakarla <rkakarla@codeaurora.org>
New version of interface for mapping and unmapping buffer
to remote process on DSP with additional mapping control flags.
All mappings of user allocated memory are tagged with file descriptor.
Change-Id: I2fb20df3f39476f92dbe0a6ec10e0b6065f90749
Acked-by: Viswanatham Paduchuri <vpaduchu@qti.qualcomm.com>
Signed-off-by: Himateja Reddy <hmreddy@codeaurora.org>
As part of v4l2_fh_open call at rtc6226 driver
open time memory is allocated via kzalloc() and
the same memory is not released at the time of
rtc6226 driver open failure case.
Remove the open and release v4l2_fh file as
it not required for rtc6226 driver.
Change-Id: I98195b9b0731d5392b82c3d12e393c6ffaad702c
Signed-off-by: himta ram <hram@codeaurora.org>
Add missing export symbol for wdog trigger available API.
Change-Id: Ib9fa8de3c8fa906bc8d09073e1df5509aa0c55e2
Signed-off-by: Siddharth Gupta <sidgup@codeaurora.org>
Secondary VM resources are accessible only after it is booted.
Change-Id: I589c191f0724106208e35705e50a3c3a66df5f8f
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
The coresight driver is freeing up d_req as part of notify
from write_complete. Accessing write_done form qdss_close,
wait_for_completion will be stuck there causing watchdog
bark.
Fix this by making f_qdss independent of coresight driver
from initializing complete. Initialization of completion
now occurs from alloc_req.
Change-Id: Ie6b1cd445ed6bb38c1a555f6c4c41068090e4fac
Signed-off-by: Udipto Goswami <ugoswami@codeaurora.org>
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
Removing the APIs related to ctrl_read since those are
not used by any client of f_qdss.
Change-Id: Idf7f1ffd8afe8a72f83e036a7986d35f2f71bea8
Signed-off-by: Udipto Goswami <ugoswami@codeaurora.org>
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
When qdss_close is called we try to dequeue the pending and started
requests and then free those requests. But when async completion is
enabled the completion callback could be called after freeing up
that request which may lead to list corruption. Handle this by
ensuring that the requests are freed only after the completion
callback is done for all the requests.
Change-Id: I3e5b1bad06f281422a71c84a617feb65027c2c84
Signed-off-by: Elson Roy Serrao <eserrao@codeaurora.org>
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
When qdss_close is called the pending requests sent to the
controller are not stopped and as a result the completion
call back can occur at any time. If the qdss bridge driver
frees the requests before the completion callback may result
in use after free. Call dequeue on the pending requests in
qdss close so that the requests are terminated instantly.
Change-Id: I2752a598e8b104a6803064343743f591adc924e4
Signed-off-by: Elson Roy Serrao <eserrao@codeaurora.org>
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
Currently, ucsi_qti_notify() is checking the received data from
charger firmware (PPM) to see if there is any connector status
response with partner accessory information (e.g. analog audio).
It does this based on setting a flag (cmd_requested_flags) when
UCSI_GET_CONNECTOR_STATUS command is sent from UCSI framework to
PPM so that the response for that command can be read and clients
registered for getting notification on partner accessory can get
notified. However, in a certain scenario, multiple response for
different commands can be received from PPM. See a possible
example below.
1. UCSI framework sends UCSI_GET_CONNECTOR_STATUS command
2. ucsi_glink driver sets cmd_requested_flags, waits for response
3. UCSI framework sends UCSI_GET_CURRENT_CAM command
4. ucsi_glink driver gets a response for UCSI_GET_CONNECTOR_STATUS
and schedules notify_work since ucsi_qti_notify() is called
with cmd_requested_flags set.
5. ucsi_glink driver gets a response for UCSI_GET_CURRENT_CAM and
this can end up reading "flags" because cmd_requested_flags is
not cleared yet. However, this causes a buffer overflow because
ucsi_qti_read() passes "val" pointer passed from UCSI framework
which is of 1 byte length and ucsi_qti_notify() ends up reading
"flags" which is at an offset 2 of length 9 bytes.
6. ucsi_qti_notify_work() clears cmd_requested_flags.
Fix this by checking the message length in ucsi_qti_notify()
to ensure that status->flags is read only when a response is
received for UCSI_GET_CONNECTOR_STATUS. Also, relocate the
clearing of "cmd_requested_flags" flag.
CRs-Fixed: 2678391
Change-Id: Iac1d5c58e1ed2fd0f3bc153da23cddf0700cc097
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Presently, clients must re-register to receive IRQ lend notification.
Every client presently must do this and there is no use-case to require
clients to re-register to receive IRQ lend notification. Return the
internal IRQ lend state to WAIT_LEND after release, instead of
unregistered.
Change-Id: I17504e2850ae60e68d755b587ff6d0c3e78926d9
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
Presently, hh_irq_wait_for_lend translates supplied vm_name to vmid.
However, if this function is called prior to RM populating this table,
then wait_for_lend call fails with -EINVAL. Translating vm_name to vmid
in wait_for_lend is unnecessary, and only done because it was convenient
in private data structure. Thus, add vm_name to the private data
structure and translate vm_names upon receiving a lend notification.
Change-Id: Iaa51aaab42508ffa121a550afa0568a048327dca
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
Incorrect unit of BW vote was used by CVP driver when voting
for DDR bandwidth. Fix the issue in this change.
Change-Id: I916f54750fa6b9858a02a50a851cf83e2e06c8b1
Signed-off-by: George Shen <sqiao@codeaurora.org>
CVP driver can handle DSP2CPU command and CPU2DSP command
at same time.
Change-Id: I2b609896aadd22554e44fb5ecb4a613b70d96903
Signed-off-by: George Shen <sqiao@codeaurora.org>
Clean up compiler warnings in haven control driver.
Change-Id: I6246a108f2e30c812071df9e5c1adbce12853fbf
Signed-off-by: Elliot Berman <eberman@codeaurora.org>