Disable gpu interrupt inline instead of changing power states as gmu
based targets do not implement the power state machine. Make sure we
skip turning off the gpu interrupt during reset after stall on fault.
Change-Id: I49c1702005f88eab523f00b25923c9c65193c7ca
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
memblock_alloc is not giving information of owner of the memblock_reserve,
when we pass through command line "memblock=debug".
Below information is not enough for memory statistics.
for example:
[ 0.000000] memblock_reserve: [0x000000013fbf8000-0x000000013fbf8fff] memblock_alloc+0x50/0x60.
To enhance the memblokc_dbg information or to get the exact owner of the
memblock_reserve added debug logs in different memblock alloc functions,
which is helpful for memory statistics.
After adding logs:
[ 0.000000] memblock_alloc: size: 4096 align: 4096 early_pgtable_alloc+0x18/0x98.
[ 0.000000] memblock_reserve: [0x000000013fbf9000-0x000000013fbf9fff] memblock_alloc+0x50/0x60.
Change-Id: Ibc9603f71fe3150af67398658d04c34f824b47e1
Signed-off-by: Faiyaz Mohammed <faiyazm@codeaurora.org>
Add clock rpmh data to communicate with RPMH clocks for sdxlemur.
Change-Id: I7884a5421c0174fc21fc4983f20dd7e2d454ab41
Signed-off-by: Naveen Yadav <naveenky@codeaurora.org>
Return NULL in the cases where the clk_hw is not registered with the
clock provider, but the clock consumer still requests for a clock id.
Change-Id: Ibac88bf6a89956d8dd4fdb0775606d7659efc747
Signed-off-by: Taniya Das <tdas@codeaurora.org>
Link: https://lkml.kernel.org/r/20191014102308.27441-3-tdas@codeaurora.org
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Git-commit: ffe37ede0a9eb524162c683f48da8558d5323ddb
Signed-off-by: Mike Tipton <mdtipton@codeaurora.org>
There is a possibility of failing probe after setting suspend and
s2idle ops. Register suspend ops later during probe after which
there is no failure.
While at this, also add missing dma_free_coherent call.
Change-Id: I824f5d433623a4d7309875a61c68778f74d139f7
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
Current find best target cpu is not check cpu_allowed mask, so
it is possible to place the task on wrong cpu, add cpu mask
check when find best target.
Change-Id: I8075657fa67704ab8d9d94d542a7983bcf8d034f
Signed-off-by: Biao Long <blong@codeaurora.org>
User should not be provided address out of SVM region.
Return error for any such requests from user.
Change-Id: If149044039b156f8192f405714f5c1a0571004e7
Signed-off-by: gkiranku <gkiranku@codeaurora.org>
When VM_MAYWRITE flag is used during mmap(), mprotect()
can be used later to change the protection of memstore
to allow write. Make sure this does not happen by
removing VM_MAYWRITE from the vm_flags of vma.
Change-Id: I6f69f05858ea40611d512cfa796caabeaa88cdb5
Signed-off-by: Indira Biruduraju <ibirudur@codeaurora.org>
Enable eMMC/SD card driver to be build as a loadable module
in the holi GKI defconfig file.
Change-Id: Ic13088afeaa70b9c0fddbbe03f5ca1545a1d4db5
Signed-off-by: Sarthak Garg <sartgarg@codeaurora.org>
Enable eMMC/SD card driver as a inbuilt module for holi
QGKI defconfig.
Also Enable a config flag to add Qualcomm specific code to upstream
MMC drivers.
Change-Id: Ic98253109fe656ee78c95ae21290210305f5ec4b
Signed-off-by: Sarthak Garg <sartgarg@codeaurora.org>
Due to measurement counter does not self-clear reliably, explicitly
clearing CLR_CNT in SW instead of relying on self-clear HW sequence.
SW/HW CLR_CNT enable and disable sequence requires ~1us delay to allow
clearing the count.
Increasing sample rate to 27ms to get more accurate measurement for low
frequency clocks which allows to keep logic simpler than implementing
different logic for higher vs slows clocks with respect to sample rate.
Change-Id: I054083358305124406294511b2d03554ee586557
Signed-off-by: Vivek Aknurwar <viveka@codeaurora.org>
When attempting to disable a flash node that is not configured, return
gracefully as it is not an error condition.
Change-Id: I3cf82eddc4ac078384a5278bd2832f7adceba853
Signed-off-by: Guru Das Srinagesh <gurus@codeaurora.org>
uaudio_dev_cleanup() API can be called from ADSP SSR context (from work
context) and USB headset disconnect context. When USB headset is being
removed, driver sends disconnect notification to ADSP firmware and it can
be blocked for 10 seconds (timeout) before calling uaudio_dev_cleanup().
If this thread is block (possibly due to ADSP SSR), and in parallel driver
is handling ADSP SSR notification, driver is releasing all resource
including secondary event ring. Once above thread unblocks or timeout, it
goes try to release secondary USB event ring. As uaudio_dev_cleanup() is
already being called, and release secondary USB event ring, it shall see
udev->dev as NULL. Fix this issue by adding explicit check against udev
with uaudio_dev_cleanup() API.
Change-Id: I1e2e4a61dcbea4c0570ac97677bf74b453fac82c
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
There can exist a possible race between a DRV suspend/resume and
the RPMSG probe/remove operations leading to a use after free
scenario from the RC driver. To avoid this, introduce a mutex to
lock RPMSG specific areas and mainly block GLINK from freeing the
rpdev if RC driver is currently performing any DRV suspend/resume
operation using rpmsg_trysend() or rpmsg_send().
Change-Id: If46d5af3a924bee8360fae5bfc3d42bb494f620d
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
There was a missing EXPORT_SYMBOL() for some public APIs. Add
those statements to ensure clean builds so KOs can use them.
Change-Id: Iaac851ddad0b729208804320f02133d0fa039615
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
timer wheel calculates the index for any timer based on the expiry
value and level granularity of the timer. Due to the level granularity
timer will not fire at the exact time instead expire at a time value
expires + granularity. This is done in the timer code when the index for
each timer is calculated based on the expiry and granularity at each
level:
expires = (expires + LVL_GRAN(lvl)) >> LVL_SHIFT(lvl);
For devfreq drivers the requirement is to fire the timer at the exact
time. If the timer does not expire at the exact time then it'll take
much longer to react and increase the device frequency. Devfreq driver
registers timer for 10ms expiry and due to slack in timer code the
expirty happens at 20 ms. For eg: Frame rendering time is 16ms.
If devfreq driver reacts after 20ms instead of 10ms, that's
way past a frame rendering time.
Timers with 10ms to 630ms expiry fall under level 0, to overcome the
granularity issue for level 0 with low expirty values do not add the
granularity by introducing a new function calc_index_min_granularity.
Change-Id: I60f6f4394de4b5f409829de9734645e1a0d7659e
Signed-off-by: Channagoud Kadabi <ckadabi@codeaurora.org>
Signed-off-by: Rishabh Bhatnagar <rishabhb@codeaurora.org>
[eberman@codeaurora.org: simplify to one function]
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
2G+5G+6G, total channel num is 157 until now, increase unsafe channel max
num to avoid out of buffer.
Change-Id: I1e433c0bd88290bb5493b2c4b0bda86e17b04a01
CRs-Fixed: 2752689
Signed-off-by: Jianmin Zhu <jianminz@codeaurora.org>
Signed-off-by: Manikandan Mohan <manikand@codeaurora.org>
Currently the composite driver encodes the MaxPower field of the
configuration descriptor by reading the c->MaxPower of the
usb_configuration only if it is non-zero, otherwise it falls back to using
the value hard-coded in CONFIG_USB_GADGET_VBUS_DRAW. However, there may be
times when a configuration may need to explicitly set the bMaxPower to 0,
particularly if its bmAttributes also has the Self-Powered bit set, which
is a legal combination.
This is specifically called out in the USB PD specification section 9.1,
where a PDUSB device "shall report zero in the bMaxPower field after
negotiating a mutually agreeable Contract", and is also verified by the
USB Type-C Functional Test TD.4.10.2 Sink Power Precedence Test.
This fix allows the c->MaxPower to be used for encoding the bMaxPower even
if it is 0, if the self-powered bit is also set. A typical usage of this
would be for the configFS gadget to be dynamically updated by userspace
when the Type-C connection is determined to be operating in Power Delivery
mode.
Change-Id: I9fce2123b23ca3fe250940757002669ab92cb21f
Signed-off-by: Ronak Vijay Raheja <rraheja@codeaurora.org>
For allocating memory from DMA we need to do a size check.
This validation is required to avoid any improper paging
request. We already have the range in which the size is
expected to be.
Change-Id: I20a843366a7f3e3e21cef89cf1ea5bec3f93ab2d
Acked-by: Ekansh Gupta <ekangupt@qti.qualcomm.com>
Signed-off-by: Jeya R <jeyr@codeaurora.org>