Enable watchdog node for sdm660 which is
used to detect system hang.
Change-Id: I463f7320a068b678370b295558689c37d8073fb7
CRs-fixed: 1056777
Signed-off-by: Amey Telawane <ameyt@codeaurora.org>
If download mode disabled, msm-poweroff driver compilation will
throw errors.
Fix them by moving download mode support under the flag.
Change-Id: I7a3f946d72cb4e500e3e762e4a6a5f2c8b90cb8c
Signed-off-by: Lingutla Chandrasekhar <clingutla@codeaurora.org>
Add device nodes for I2C, SPI, UART and also Audio and QCA slimbus
which are disabled by default. Need to enable along with slave instances.
Change-Id: I8e9486b6774a993c14c1363adaa62435e8c0d58b
Signed-off-by: Shrey Vijay <shreyv@codeaurora.org>
For set rate, dp_pixel_clk_src rcg requires the correct parent
source to configured so add support for the same.
Change-Id: I9c8ae2904b47dbe0bc6845e2ca38fbd2f126a7e5
Signed-off-by: Amit Nischal <anischal@codeaurora.org>
Use correct property name for passing voltage values for voting
core_ldo which is required for QMP PHY.
Change-Id: I042905f5971c653f580a6f4388555744ff3160cc
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
Update vdd-current-level as per latest hardware documentation
and interrupt related properties of sdhc2 for sdm660.
Change-Id: I93fa440bc7ae0f72cb19949fdb9e4c5f6322d253
Signed-off-by: Sayali Lokhande <sayalil@codeaurora.org>
There are few compiler errors and warnings when CFS_BANDWIDTH
config is enabled but not SCHED_HMP.
Change-Id: Idaf4a7364564b6faf56df2eb3a1a74eeb242d57e
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
HMP scheduler boost feature related functions are referred in SMP
load balancer. Add the nop functions for the same to fix the
compiler errors with !SCHED_HMP.
Change-Id: I1cbcf67f728c2cbc7c0f47e8eaf1f4165649dce8
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
PMI GPIO1 is used to enable and disable WLED for msm8998 QVR,
we should also invert the gpio level according to HW design.
CRs-Fixed: 1101647
Change-Id: If29e41d12a697d7fd6671f1134a1e798c80c3523
Signed-off-by: Yahui Wang <yahuiw@codeaurora.org>
Added attributes for forcing a buffer mapped as coherent or
non-coherent by using the DMA_ATTR_FORCE_COHERENT and
DMA_ATTR_FORCE_NON_COHERENT.
Change-Id: Ifecad81dd96b99ab63854bddce378ff775c22d38
Acked-by: Viswanatham Paduchuri <vpaduchu@qti.qualcomm.com>
Signed-off-by: Sathish Ambley <sathishambley@codeaurora.org>
This reverts commit c996cdd384 ("USB: rndis:
Free the rndis response queue during REMOTE_NDIS_RESET_MSG"). RNDIS host
sends GET_ENCAP_RESP for every RESP_AVAILABLE_NOTIFICATION from device.
As result if REMOTE_NDIS_RESET_MSG comes device rndis driver frees all the
previous responses and once notify request gets completed for previous
RNDIS request message it sends reset message completion resonse. When
response available request corresponding to RNDIS reset message gets
completed host RNDIS driver sends GET_ENCAP_RESP and device sends stall
because all RNDIS responses are freed due to RNDIS reset message.
Change-Id: I8a785d1ea8175c5c6aa08cda5cdd00cfd0c561b5
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
When SSR happens at WLAN driver, the cfg80211 stop AP can fail at driver.
Make sure that the beacon interval is reset, even when this API fails.
Change-Id: I459f55ce5f4bc44c4d0e20170bd50a83c2d609b4
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
CRs-fixed: 1078172
Avoid race condition in driver when encoding param by
reading contents from a local copy instead of msg buffer
itself which can be mapped to user space.
Change-Id: I405ca6c7fcb0afa112e0851907b5dca805ac5411
Signed-off-by: Ahmed Sheikh <ahmedsh@codeaurora.org>
When rotator job finished, driver needs to send out done signaling to
notify fbdev driver to perform a commit. However, there are occasions
that the SMMU disabling take quite long time and delaying the fbdev
commit time. To reduce this unpredict latency, move the SMMU disabling
much later in the rotator done handling, and also remove unnecessary
SMMU disabling call during commit phase.
CRs-Fixed: 1100633
Change-Id: I76ad017661aa6f760a2adc3579f59a7b66ab8e40
Signed-off-by: Benjamin Chan <bkchan@codeaurora.org>
If read function is waiting for interrupt and after that
NFCC goes to recovery, MW will call ioctl (0) and ioctl (1),
In ioctl (0) call we are disabling interrupt so read function
was waiting for interrupt and ioctl call has disabled interrupt,
now there is no possibility interrupt will be enabled again
because only read function enables the interrupt.
Enabled interrupt in ioctl (1) so that we can receive data
after reset/recovery.
Change-Id: I1677a50129534b1eaa4b8c20820a15db299cd9c1
Signed-off-by: Gaurav Singhal <gsinghal@codeaurora.org>
Vote minimum possible voltage corner on system regulator in
regulator disable path when the CPR controller manages an
underlying LDO of type LDO300.
Also, fix the regulator get failure print when vdd-supply
not specified for CPRh controllers.
CRs-Fixed: 1108988
Change-Id: Ic1c7b6fd4bf93dd213b2f639aa21b47890906478
Signed-off-by: Tirupathi Reddy <tirupath@codeaurora.org>
Properly initialize local variable in the SDE rotator WB done handler.
Under error condition, it is possible that the handler access the
uninitialized variable.
CRs-Fixed: 1110015
Change-Id: I4c76fd6400c528f5dd7773aa9b3718dd86b2b01a
Signed-off-by: Benjamin Chan <bkchan@codeaurora.org>
Some platforms don't configure qcom,secondary-pon-reset like 8998.
So set boot_reason when "qcom,system-reset" node exists to avoid
setting a wrong value to boot_reason.
CRs-Fixed: 1102732
Change-Id: I9e9ff2f2d0ffac6baa5d0663664001eb30638e87
Signed-off-by: Mao Jinlong <c_jmao@codeaurora.org>
Add IPA stats support on AP+STA mode for V2 driver
when CNE queries. Also add metering funtionality
on WIFI interface to stop the data transfer
when quota reached on WIFI-case.
Change-Id: I51a771423e6a35ea0453b978be484d0464bddf14
Acked-by: Chaitanya Pratapa <cpratapa@qti.qualcomm.com>
Signed-off-by: Utkarsh Saxena <usaxena@codeaurora.org>
Do not send CMD13 after sending switch command for HS, HS_DDR,
HS200 and HS400 modes. It seems that below problem can occur -
1. After sending switch CMD6, card will switch to mentioned bus speed
mode.
2. At this moment the controller will be in different bus speed mode,
unless the timing of the controller is switched to match with that of
card.
During this time, if CMD13 follows CMD6 to switch the bus speed
mode in card. Then it may cause timeouts or other errors because
of mismatch in timing of controller and card.
Thus send CMD13 to see the status once both controller and card are
switched to same timings.
Change-Id: If796c8cfce2cbdc1bce460460e3276886ae1be0c
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
Signed-off-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org>
Signed-off-by: Sayali Lokhande <sayalil@codeaurora.org>
When mod_delayed_work() is concurrently executed, there a potential
live lock scenario due to pool->lock contention.
Lets say both CPU#0 and CPU#4 calls mod_delayed_work() on the same
work item with 0 delay on a bounded workqueue. This workitem has
run on CPU#4 previously. CPU#0 wins the work item PENDING bit race
and proceeds to queueing. As this work has previously run on CPU#4,
it tries to acquire the corresponding pool->lock to check if it is
still running there. In the meantime, CPU#4 loops in
try_to_grab_pending() for the workitem to be linked with a pwq so
that it can steal it from pwq->pool->worklist. The CPU#4 essentially
acquires and releases the pool->lock in a busy loop and CPU#0 may
never gets this lock.
---------------- --------------------
CPU#0 CPU#4
--------------- --------------------
blk_run_queue_async()
mod_delayed_work_on() queue_unplugged()
--> try_to_grab_pending() returns blk_run_queue_async()
0 indicating PENDING bit is set
now.
__queue_delayed_work() mod_delayed_work_on()
__queue_work() try_to_grab_pending()
{
--> waiting for the CPU#4's acquire pool->lock()
pool->lock release pool->lock()
}
Change-Id: I9aeab111f55a19478a9d045c8e3576bce3b7a7c5
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
nt36850 wqhd command panel will be used for sdm660 QRD,
so enable it for sdm660 QRD.
CRs-Fixed: 1107352
Change-Id: Ia7a691949bfef8777f78e846b6fb92e01658441f
Signed-off-by: Yahui Wang <yahuiw@codeaurora.org>
Add TLB dump entries to setup memory space for the cpuss dump
driver to dump TLB entries.
Change-Id: I7514969c1540d18d2102088b43d959adec68152f
Signed-off-by: Runmin Wang <runminw@codeaurora.org>
When perf_group_detach is called on a group leader,
it should empty its sibling list. Otherwise, when
a sibling is later deallocated, list_del_event()
removes the sibling's group_entry from its current
list, which can be the now-deallocated group leader's
sibling list (use-after-free bug).
Bug: 32402548
Change-Id: I99f6bc97c8518df1cb0035814368012ba72ab1f1
Signed-off-by: John Dias <joaodias@google.com>
Git-repo: https://android.googlesource.com/kernel/msm
Git-commit: 6b6cfb2362f09553b46b3b7e5684b16b6e53e373
Signed-off-by: Dennis Cagle <d-cagle@codeaurora.org>
This fixes CVE-2016-7042.
Fix a short sprintf buffer in proc_keys_show(). If the gcc stack protector
is turned on, this can cause a panic due to stack corruption.
The problem is that xbuf[] is not big enough to hold a 64-bit timeout
rendered as weeks:
(gdb) p 0xffffffffffffffffULL/(60*60*24*7)
$2 = 30500568904943
That's 14 chars plus NUL, not 11 chars plus NUL.
Expand the buffer to 16 chars.
I think the unpatched code apparently works if the stack-protector is not
enabled because on a 32-bit machine the buffer won't be overflowed and on a
64-bit machine there's a 64-bit aligned pointer at one side and an int that
isn't checked again on the other side.
The panic incurred looks something like:
Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: ffffffff81352ebe
CPU: 0 PID: 1692 Comm: reproducer Not tainted 4.7.2-201.fc24.x86_64 #1
Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011
0000000000000086 00000000fbbd2679 ffff8800a044bc00 ffffffff813d941f
ffffffff81a28d58 ffff8800a044bc98 ffff8800a044bc88 ffffffff811b2cb6
ffff880000000010 ffff8800a044bc98 ffff8800a044bc30 00000000fbbd2679
Call Trace:
[<ffffffff813d941f>] dump_stack+0x63/0x84
[<ffffffff811b2cb6>] panic+0xde/0x22a
[<ffffffff81352ebe>] ? proc_keys_show+0x3ce/0x3d0
[<ffffffff8109f7f9>] __stack_chk_fail+0x19/0x30
[<ffffffff81352ebe>] proc_keys_show+0x3ce/0x3d0
[<ffffffff81350410>] ? key_validate+0x50/0x50
[<ffffffff8134db30>] ? key_default_cmp+0x20/0x20
[<ffffffff8126b31c>] seq_read+0x2cc/0x390
[<ffffffff812b6b12>] proc_reg_read+0x42/0x70
[<ffffffff81244fc7>] __vfs_read+0x37/0x150
[<ffffffff81357020>] ? security_file_permission+0xa0/0xc0
[<ffffffff81246156>] vfs_read+0x96/0x130
[<ffffffff81247635>] SyS_read+0x55/0xc0
[<ffffffff817eb872>] entry_SYSCALL_64_fastpath+0x1a/0xa4
Change-Id: I23554b54eb9b82f44554a3ef620200de9f6ea55a
Reported-by: Ondrej Kozina <okozina@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Tested-by: Ondrej Kozina <okozina@redhat.com>
cc: stable@vger.kernel.org
Signed-off-by: James Morris <james.l.morris@oracle.com>
Git-repo: http://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git
Git-commit: 03dab869b7b239c4e013ec82aea22e181e441cfc
Signed-off-by: Dennis Cagle <d-cagle@codeaurora.org>
If a user happens to call ION_IOC_FREE during an
ION_IOC_ALLOC on the just allocated id, and the
copy_to_user fails, the cleanup code will attempt
to free an already freed handle.
This adds a wrapper for ion_alloc that adds an
ion_handle_get to avoid this.
Bug: 31568617
Change-Id: I476e5bd5372b5178a213f1fea143d270cf9361ed
Signed-off-by: Daniel Rosenberg <drosen@google.com>
Git-repo: https://android.googlesource.com/kernel/msm/
Git-commit: 20a5411d0115b16826f3d327b6abb0192c8a2001
Signed-off-by: Dennis Cagle <d-cagle@codeaurora.org>
__qseecom_update_cmd_buf_64() called __qseecom_allocate_sg_list_buffer()
to allocate memory from within a for loop. Should it fail on any other
than the first time through the loop, the prior allocations will not be
deallocated, make change to deallocate memory in this error case.
Change-Id: I8cb71a3b141249d8266aec4890632f200d147405
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
Add alias name for the temperature sensors for msm8998. This information
will be read by KTM and will be communicated to thermal-engine.
Change-Id: Ia0a579f1ead211cefa42fc846a32aa3419b1259b
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
When VCONN is enabled while OTG is disabled the CC line which is not
configured for VCONN can be internally pulled down. If the Type-C plug
were removed then Type-C detection would still see that Rd is applied and
not detect the removal.
Fix this by ensuring that OTG is enabled while VCONN is enabled. If OTG
were disabled due to an over-current event then VCONN must also be
disabled.
Implement a retry mechanism if over-current is detected on either VCONN or
VBUS.
Change-Id: Iccfb923bce8f06c7c1270943211ce134ea9ef616
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
Since clusters can vary significantly in the power and performance
characteristics, there may be a need to have different CPU selection
policies based on which cluster a task is being placed on. For example
the placement policy can be more aggressive in using idle CPUs on
cluster that are power efficient and less aggressive on clusters
that are geared towards performance. Add support for per cluster
wake_up_idle flag to allow greater flexibility in placement policies.
Change-Id: I18cd3d907cd965db03a13f4655870dc10c07acfe
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
GPU RBCPR clocks needs to registered separately, as GFX CPR would require
the rbcpr clocks to register the regulator handle.
Change-Id: I59def76e7dd69600be8faf47eb867a97ab04739e
Signed-off-by: Amit Nischal <anischal@codeaurora.org>
Signed-off-by: Taniya Das <tdas@codeaurora.org>
A race condition bug in function 'mbim_bind_config' allows to
change 'mbim->xport' type to invalid value. This allows
mbim_ioctl() to copy the uninitialized data to userspace. Fix
this by avoiding copy_to_user() call when transport type is invalid.
Change-Id: If8e8b6d4e2c347e1aff529bed0a798128eaea07c
CRs-Fixed: 1102418
Signed-off-by: Arumuga Durai A <cadurai@codeaurora.org>
Change SVS clock for vfe_clk_src from 384MHz to 480MHz.
Change-Id: Ieff3fed56bc669e5b36022bb3282f17120cf949f
Signed-off-by: Ramesh V <ramev@codeaurora.org>
In the current implementation DSI timing db(Double Buffering)
mode is set as part of DSI controller initialization. This is
causing DSI command transfer failures when sending panel init
commands during device resume for some platforms like SDM660.
Since on these platforms DSI_CMD_OFFSET and DSI_CMD_LENGTH
register has now become double buffered and hence would need a
control flush, for these registers to take effect. But control
flush in driver does not happen until panel init is done properly.
So removing the programing of timing db registers from DSI host
initialization sequence as this is already taken care during dynamic
refresh rate change usecase.
Change-Id: Ia08788127f4d132530e3f3a28efd9d7ee9869483
Signed-off-by: Sandeep Panda <spanda@codeaurora.org>