This reverts commit ba6bd90a30.
Perparing for taking more optimized patch suggested to upstream
for using smp_wmb() instead of smp_mb().
Change-Id: Idc4fbd884055d9a8f65f102862dd276abe54699d
Signed-off-by: Prateek Sood <prsood@codeaurora.org>
GPU speed-bin 2 supports fmax of 560MHz and DDR 1555MHz.
Add this config to MSM8996v3 to support required GPU fmax.
Change-Id: Ibdf9bb63c7d8f0e980fbf3c192d536adeaeec52d
Signed-off-by: Dumpeti Sathish Kumar <sathyanov14@codeaurora.org>
Using IS_ERR_OR_NULL instead of IS_ERR to also check for
null pointer.
Change-Id: If53a07db52a4d091693a49f9d084df7d4fbf257a
Signed-off-by: Vijay kumar Tumati <vtumati@codeaurora.org>
Use the appropriate lock when adding sparse bindings, to protect the
list of sparse bindings from concurrent updates by multiple threads.
Change-Id: Ice9750c96fca42f4049ed352533f4722b5166221
Signed-off-by: Lynus Vaz <lvaz@codeaurora.org>
If we find that a different thread has already added bindings at the
same offset we wanted to add to the sparse object, don't get stuck in
an infinite loop, and return with an error.
Change-Id: I6b17c91eccb14c07e13cae24135dfe7b13f3301d
Signed-off-by: Lynus Vaz <lvaz@codeaurora.org>
In WAN ioctls user-supplied data structures
contain string members,but there's no guarantee
they're null-terminated, add the string terminator
to prevent vulnerability of string buffer overflows.
Change-Id: I17c06c94aa619a2cd3a678c495a31541a65a7741
Acked-by: Ashok Vuyyuru <avuyyuru@qti.qualcomm.com>
Signed-off-by: Mohammed Javid <mjavid@codeaurora.org>
Currently, when a channel is read in continuous mode and the read
operation fails, RR_ADC would be left enabled in continuous mode.
Disable the continuous mode in such cases so that the other read
operations which doesn't need continuous mode can go through.
Change-Id: I2bf257bd535e1e4a30e18b6257e584a5be96b69d
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
This change checks a NULL condition before initializing submitqueue.
Change-Id: I9ef6b6506b535d33e585be4988fa6433e11b3cb1
Signed-off-by: Rahul Sharma <sharah@codeaurora.org>
This changes modifies compatible name for smmu_kms_unsec_cb
to use sde terminology.
Change-Id: I31ee9620f8bb54fd582d9c6b21f5df0fda3cb975
Signed-off-by: Rahul Sharma <sharah@codeaurora.org>
This changes fixes an issue with vblank event list corruption.
we should only remove the event corresponding to a crtc from list
for which the thread was queued.
Change-Id: I9b9cef9073ba4cc377a85e21a7257d36e9b92388
Signed-off-by: Rahul Sharma <sharah@codeaurora.org>
Update release and retire fence timeline according to client
requirement to align it with correct vsync boundary and avoid
issues in jank cases.
Change-Id: Ibee64f4feea2623e8bc8459273b7193d5e7bdacc
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
Signed-off-by: Rahul Sharma <sharah@codeaurora.org>
(from https://patchwork.kernel.org/patch/9939405/)
commit 7a4408c6bd3e ("binder: make sure accesses to proc/thread are
safe") made a change to enqueue tcomplete to thread->todo before
enqueuing the transaction. However, in err_dead_proc_or_thread case,
the tcomplete is directly freed, without dequeued. It may cause the
thread->todo list to be corrupted.
So, dequeue it before freeing.
Bug: 65333488
Change-Id: I14ef48095d9f690148b1a50ea62d05dd67779505
Signed-off-by: Xu YiPing <xuyiping@hisilicon.com>
Signed-off-by: Todd Kjos <tkjos@google.com>
Git-commit: 86578a0fd70edffb11c78b5df85b8e113e44bfe1
Git-repo: https://android.googlesource.com/kernel/common
Signed-off-by: Kyle Yan <kyan@codeaurora.org>
Add device specific flag for new vmid heap shared feature.
Change-Id: I35cc0073a5fa10c715d520ebb9d77936a6820aa9
Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org>
The current implementation of synchronize_sched_expedited() incorrectly
assumes that resched_cpu() is unconditional, which it is not. This means
that synchronize_sched_expedited() can hang when resched_cpu()'s trylock
fails as follows (analysis by Neeraj Upadhyay):
o CPU1 is waiting for expedited wait to complete:
sync_rcu_exp_select_cpus
rdp->exp_dynticks_snap & 0x1 // returns 1 for CPU5
IPI sent to CPU5
synchronize_sched_expedited_wait
ret = swait_event_timeout(
rsp->expedited_wq,
sync_rcu_preempt_exp_done(rnp_root),
jiffies_stall);
expmask = 0x20 , and CPU 5 is in idle path (in cpuidle_enter())
o CPU5 handles IPI and fails to acquire rq lock.
Handles IPI
sync_sched_exp_handler
resched_cpu
returns while failing to try lock acquire rq->lock
need_resched is not set
o CPU5 calls rcu_idle_enter() and as need_resched is not set, goes to
idle (schedule() is not called).
o CPU 1 reports RCU stall.
Given that resched_cpu() is now used only by RCU, this commit fixes the
assumption by making resched_cpu() unconditional.
Change-Id: I67cbf28612004f4b78e355dd00b5abdd0f31ec13
Reported-by: Neeraj Upadhyay <neeraju@codeaurora.org>
Suggested-by: Neeraj Upadhyay <neeraju@codeaurora.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Patch-mainline: linux-kernel @ 18/09/17, 09:01
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
We need the scheduler's fastpaths to be, well, fast, and unnecessarily
disabling and re-enabling interrupts is not necessarily consistent with
this goal. Especially given that there are regions of the scheduler that
already have interrupts disabled.
This commit therefore moves the call to rcu_note_context_switch()
to one of the interrupts-disabled regions of the scheduler, and
removes the now-redundant disabling and re-enabling of interrupts from
rcu_note_context_switch() and the functions it calls.
Reported-by: Peter Zijlstra <peterz@infradead.org>
Change-Id: I8de5c9890b1db126b06d4d8fed717b3c8bfcf866
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
[ paulmck: Shift rcu_note_context_switch() to avoid deadlock, as suggested
by Peter Zijlstra. ]
Git-commit: 46a5d164db53ba6066b11889abb7fa6bddbe5cf7
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[prsood@codeaurora.org: resolve trivial merge conflicts]
Signed-off-by: Prateek Sood <prsood@codeaurora.org>
This commit applies an early-exit approach to rcu_sched_qs(), reducing
the nesting level and saving a line of code.
Change-Id: Ib5dff7a0e3a26ce8ed319fd03b15e77b7b6650db
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Git-commit: fecbf6f01fbd83e6419ccb7f61d9a6eb987f1d92
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Prateek Sood <prsood@codeaurora.org>
Even if ICE device is not found it is possible
for list device API to return non NULL pointer
which will pass all NULL checks in code. Ensure
to return proper address or NULL.
Change-Id: I1465614b86f1415376b2adffeec6e4da1a33ddd5
Signed-off-by: Neeraj Soni <neersoni@codeaurora.org>
In this case gsi_ctrl_clear_cpkt_queues function is called
which is holding spinlock and in the meantime dwc3_interrupt
occurred on same CPU which in turn is calling gsi_ctrl_clear_cpkt_queues
function and it is trying to acquire the same spinlock causing
deadlock.
This change disables the interrupts when spinlock is acquired
in gsi_ctrl_clear_cpkt_queues function.
Change-Id: Ia87a0a283ca6b6298083dddb448e4d649a4f8e89
Signed-off-by: Pratham Pratap <prathampratap@codeaurora.org>
Line reset can occur during hibernate enter, exit or
during PA_INIT. In some cases, system slowness problem
is observed when line reset happened during hibernate
enter process in auto hibernate mode of operation as
link remains in PWM-G1 mode. To fix this problem, read
PA_PWRmode, PA_TxGear and PA_RxGear if line reset is
detected and if link is in PWM-G1 mode, initiate power
mode change to expected HS gear.
Change-Id: Ic06a11c917e8954743c4dcf80b89fedeec4584ed
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
Signed-off-by: Sayali Lokhande <sayalil@codeaurora.org>
Enable CONFIG_SLUB_DEBUG_ON for MSM8996 AUTO platform in order
to get more debug capability.
Change-Id: I076395c4d4b950859afa2c1fffdc3687ba39a71d
Signed-off-by: Yue Ma <yuem@codeaurora.org>
Check whether USB is connected while doing conversion for
channels that require USB to read valid readings. If USB
is not plugged in, exit loop and return error.
Change-Id: Ib181a9e4406d88dc2988ca08e84598635e5a4716
Signed-off-by: Rama Krishna Phani A <rphani@codeaurora.org>
Change the smb138x_parallel_slave node name to smb138x_charger to be
consistent with other smb charger node names.
Change-Id: I2f325e943efbfa8d95223f830232246ee97149c4
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
On 8996 AUTO platform, too many "hdmi_i2c_xfer" warnings appear
when booting that makes boot time longer and may cause watchdog
bite. The warning is generated by WARN_ON() in hdmi_i2c_xfer()
which prints call stack like:
hdmi_i2c_xfer+0x44/0x398
__i2c_transfer+0x270/0x4b4
i2c_transfer+0x64/0xb0
hdmi_ddc_read+0x84/0xdc
sde_hdmi_scdc_write+0xac/0x178
_sde_hdmi_bridge_mode_set+0x928/0xa34
drm_bridge_mode_set+0x30/0x54
complete_commit+0x448/0x938
_msm_drm_commit_work_cb+0xb0/0x1a0
kthread_worker_fn+0xcc/0x170
kthread+0xf8/0x100
ret_from_fork+0x10/0x20
The reason is the HDMI_CTRL_ENABLE bit of REG_HDMI_CTRL register
is disabled during the reset by the first commit. This reset is
caused by the missing of HPD regulator enabling in HPD call sequence.
So to remove the HDMI i2c warning, the patch enables HPD regulator
to avoid the reset.
Change-Id: I91e853535a972f241c7aa2d28c05785569ae23db
CRs-fixed: 2093649
Signed-off-by: Yujun Zhang <yujunzhang@codeaurora.org>
Dummy transport is only way to access if_ptr. When dummy
transport is freed, if_ptr allocated for dummy transport is
not freed. This result in memory leak.
kfree of if_ptr is called before freeing dummy transport.
CRs-Fixed: 2116744
Change-Id: I832e0fcde418b7c3d992f50e817866bc9075da3c
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
Data of intent is not freed even in purge_intent_list. This results
in memory leak.
Kfree is done for data before freeing intent.
CRs-Fixed: 2116744
Change-Id: Ib99261208df1cc9b63b4cd0a35ac0c7942efb4a8
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
For some targets that have less vmalloc space this can be increased by
enabling config ENABLE_VMALLOC_SAVING. With this config we can reclaim
virtual mappings which remains unused because of non hlos carveout
reservations in lowmem.
Select the default method of reclaiming virtual memory as vmalloc saving.
Change-Id: I05bbae3b554be54f74b740404dda0cdfa89084bd
Signed-off-by: Prakash Gupta <guptap@codeaurora.org>
When the source is powered off with an external sink connected, it
will result in a call to blank and power off the source. In the
current implementation, sink is not transitioned to D3 power mode
prior to turning off the source. This can result in the sink
reporting signal lock failures as the source if powered off,
resulting in an HPD IRQ interrupt. If this interrupt is handled
after the DP controller is powered off, it can lead to unclocked
register accesses. Fix this by ensuring that sink is powered off
prior to powering off the source. In addition, ensure that no more
attention events are handled once the DP controller is powered off.
Change-Id: I08558229f7c3e603904527de58a39039b3d7615e
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
spcom server app might open the channel before the SP client app.
The asynchronous CONNECTED callback might be called while the server
is waiting for data.
Avoid locking the channel while waiting for data to avoid dead lock
while handling the CONNECTED callabck.
Change-Id: I7c576f240b60720a6f1461b3e48f4422c110e7c4
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
spcom_notify_state() is a callback called by glink upon channel connect.
It is asynchronous callback, that might be called after glink_close().
Avoid storing stale glink handle in such case.
Change-Id: I10359f38ca48f618899673f677a6409b01bc6618
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>