The lineptr interrupt is expected to be triggered and have the
ability to be updated instantly whenever the panel is fetching
data. Previously, enabling lineptr was tied to kickoff and disabling
to pp_done work. Add capability to change the lineptr value instantly,
when auto-refresh is enabled and avoid disabling lineptr during that time.
Once enabled, lineptr can only be disabled when 0 is written to the node
while auto-refresh is enabled.
Change-Id: I9a1a478c857efd988984a0efb0a2b6475030c7ec
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
IPA might have Information leak and device crash due to
kernel heap overread in IPA driver when processing
WAN_IOC_ADD_FLT_RULE_INDEX ioctl. The fix is to add
check on max number of filter rules send to modem.
Change-Id: I454e04d05cfcb7af8fc4bd2b4a1bade55c4684d0
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
qseecom_send_modfd_cmd converts ION buffer's virtual address to
scatter gather(SG) list and then sends them to TA by populating
SG list into message buffer. As the physical memory address in
SG list is used directly by TA, this allows a malicious TA to
access/corrupt arbitrary physical memory and may lead to the
process gaining kernel/root privileges. Thus, make changes to
have the QSEEComm driver passing a list of whitelist buffers
that is allowed to be mapped by TA, and the QSEE kernel, in turn,
should add checks to the register_shared_buffer syscall to make
sure the shared buffers an application is mapping falls within
one of these whitelist buffers.
CRs-fixed: 1021945
Change-Id: I776ead0030cad167afcf41ab985db7151a42d126
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
Adjust phy-qcom-ufs-qmp-v3 settings based on post silicon validation.
Change-Id: Ide0ca4714679bb576a8069bdd7720507074ccc47
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
Buck damage was seen to go away once the dead time were increased
in addition to increasing the OOB comparator threshold.
CRs-Fixed: 1055113
Change-Id: I8979d203fc7c35ec23e23874c8dd8f980a1cc619
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Commit 85635da429 ("qcom-charger: smb138x: fix buck damage on
v1.1 hardware") introduced wa_flags as the first member
in the struct. However there are implict assumptions in the driver that
the first member is the library structure. This causes memory corruption
and an eventual watch dog bite reset.
Fix it by ensuring that the library struct is explicitly initialized
from the parent struct.
CRs-Fixed: 1055113
Change-Id: I38474a228ec7b245dc330b4a37847c9f1bf29c2a
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
'commit 5b42bd749e8c ("usb: gadget: gsi: Optimize TRB's buffer allocation
functionality")' removed handling of EVT_HOST_READY event with state
STATE_INITIALIZED to optimized USB GSI state machine. This handling is
required for specifically when RNDIS interface is being enabled through
device manager, otherwise RNDIS interface doesn't get private IP address
back. Fix this issue by adding back handling of EVT_HOST_READY event with
state STATE_INITIALIZED.
CRs-Fixed: 1050838
Change-Id: I7010005b37b4709f54de58d52a56cb7f5e88bd08
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
header change for CNE to pass gateway
info to IPA
Change-Id: I0f0a84a12c3ba514f7309b16c73f5b8ed631626d
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
Fix a static analysis issue at IPA driver,
IPA unit-tests I/S. Do not dereference a pointer even
if it can potentially be NULL.
CRs-Fixed: 1055710
Change-Id: Ie7eff49f136fe429ef10c6067ce7d8aae2694d3a
Signed-off-by: Ghanim Fodi <gfodi@codeaurora.org>
Focaltech's CTP FT6436 is able to behave like a proximity sensor.
Enable the driver support this new feature.
Also cleared the chekpatch warning on 3.18 kernel.
Change-Id: I7a6ec3a387536c512637b0bd8dab95e7cceca212
Signed-off-by: Mao Li <maol@codeaurora.org>
Signed-off-by: Sudhakar Manapati <smanap@codeaurora.org>
Signed-off-by: Abinaya P <abinayap@codeaurora.org>
Update the Display-Port PHY and PLL configuration
with the recommended settings. Remove the
support for 9.72Ghz VCO frequency. Update the divider
settings to support the new frequency plan.
Update the Phy Aux settings and voltage/pre-emphasis
settings according to recommended configuration.
Change-Id: Ic4d206da3dc6b45214e7601e7556cfb0bef81a7d
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
Add compatibility checks for the new LM configs sent by dest
scalar with the DSC slice width/height during validation. Without
this check, the DSC config check would fail at a later point during
ctl start.
Change-Id: I55e483be5629cfe26cca3b740d206845a1caa903
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
msmcobalt has a different command mode MISR CRC register offset. Correct
the offset for the MISR control and signature registers, and correct the
block_id by lookup the INTF number from CTL.
CRs-Fixed: 1049910
Change-Id: If4fb44d217ed84067a0732334523ddb1e435e4e7
Signed-off-by: Benjamin Chan <bkchan@codeaurora.org>
sysctl_sched_wake_to_idle is a means to allow or disallow a global
task placement preference for idle CPUs. It has been unused thus
far since we've preferred to use a per-task flag instead to control
placement for individual tasks. Using this global flag, however, does
allow greater flexibility for testing and system evaluation.
Incorporate sysctl_sched_wake_to_idle in the placement policy.
Change-Id: I7e830bc914eb9c159ae18f165bc8b0278ec9af40
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
Do the aggregation for frequency only when the total group busy time
is above sched_freq_aggregate_threshold. This filtering is especially
needed for the cases where groups are created by including all threads
of an application process. This knob can be tuned to apply aggregation
only for the heavy workload applications.
When this knob is enabled and load is aggregated, the load is not
clipped to 100% @ current frequency to ramp up the frequency faster.
Change-Id: Icfd91c85938def101a989af3597d3dcaa8026d16
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
The load reporting during frequency alert notifications is broken under
load aggregation. When aggregation is enabled, the total group busy
time is accounted towards the maximum busy CPU of a frequency domain.
If this CPU has a notification pending, it's group busy time alone is
accounted and other CPU's group busy time is completely ignored.
Similarly if any CPU other than maximum busy CPU has a pending
notification, its group busy time is accounted twice.
Maintain the frequency alert notification flag per frequency domain.
When the notification is pending, don't clip the load to 100% @ fur
for any of the CPUs in the frequency domain.
Change-Id: Iebc7d74d6fafa20430fa1c7d80f34a6ab198832d
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
When sysctl_sched_enable_thread_grouping is set to 1, any new tasks
created are put in the same group as their group leader.
Change-Id: If1837dd7c8120c8b097cfffa1dc52eb4781f1641
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Related tasks are grouped together based on their sched_group_id.
The userspace implementation requires world write permissions to
this /proc/<PID>/sched_group_id file.
Change-Id: I92e6fd3ca693387aeb0664cc75afde06f75d4a9f
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Add a flag to the trace event that indicates why we picked a particular
CPU. This is very useful information/statistic that can be used to
analyse the effectiveness of the scheduler.
Change-Id: Ic9462fef751f9442ae504c09fbf4418e08f018b0
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
notify_migration() is a HMP specific function that relies on all
of its contents to be stubbed out for !CONFIG_SCHED_HMP. However,
it still maintains calls to rcu_read_lock/unlock(). In the !HMP
case these calls are simply redundant. Move the function under
CONFIG_SCHED_HMP and add a stub when the config is not defined so
that there is no overhead.
Change-Id: Iad914f31b629e81e403b0e89796b2b0f1d081695
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
Most code pertaining to CONFIG_SCHED_HMP has been moved to a separate
file "hmp.c" in order to facilitate kernel upgrades. Fewer changes in
the original scheduler files means fewer conflicts. Some parts of code,
however, could not be moved to the separate file either because of
dependencies with other non-HMP code or because the changes are specific
only to the scheduling classes where the code resides.
Change-Id: Ib067ac75e5a494008dcb3c67586b622c1b3962ce
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
Code sections found either CONFIG_SCHED_HMP or !CONFIG_SCHED_HMP
have become quite fragmented over time. Some of these fragmented
sections are necessary because of the code dependencies. Others
fragmented sections can easily be consolidated. Do so in order
to make kernel upgrades a lot simpler.
Change-Id: I6be476834ce70274aec5a52fd9455b5f0065af87
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
Fix compile issues observed when CONFIG_SCHED_HMP is not turned on.
There are still targets that may want that config option turned off.
Change-Id: I29e69356da8d003d13d8cd3927a0b166cc1ef95e
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
The config option has been removed. Update all defconfigs to reflect
that.
Change-Id: Ia1aa0405e8d7c7c48fe8023691b57fba00c6a22b
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
With the SMMU attached, need to provide
netdev name when calling dma_map_single
instead of passing NULL to prevent DMA
allocation errors.
Change-Id: Ic126739d20ff6cd148b2f424746555419fcfca70
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
Derive extradata plane size using internal MACRO rather
than getting from Venus. This helps to keep clients and
driver in sync.
CRs-Fixed: 1011881
Change-Id: I2b3536f5eb2742d6b6855140c40724f6425d1578
Signed-off-by: Praneeth Paladugu <ppaladug@codeaurora.org>
CONFIG_SCHED_FREQ_INPUT was created to keep parts of the scheduler
dealing with frequency separate from other parts of the scheduler
that deal with task placement. However, overtime the two features
have become intricately linked whereby SCHED_FREQ_INPUT cannot be
turned on without having SCHED_HMP turned on as well. Given this
complex inter-dependency and the fact that all old, existing and
future targets use both config options, remove this unnecessary
feature separation. It will aid in making kernel upgrades a lot
simpler and faster.
Change-Id: Ia20e40d8a088d50909cc28f5be758fa3e9a4af6f
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
The QHMP version of the scheduler is no longer available from this
kernel vesion onwards. sched-zone.txt should be used instead for
the upgraded zone scheduler. Remove the original sched-hmp.txt
and reuse the name for sched-zone.txt.
Change-Id: I9b033101b903dc49b8683025602d2af395501daa
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
While tracking C-states makes sense under CONFIG_SMP as well, cstate
information is currently unused under CONFIG_SMP. Move it under
CONFIG_SCHED_HMP for now since that is the only place it is relevant
at the moment.
Change-Id: Ifc5812cfe14ebf2b4d447100dcd87f02ab29ff7a
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
PELT extensions for HMP have never been used since the early days
of the HMP scheduler. Furthermore, changes to PELT itself in newer
kernel versions render some of the code redundant or incorrect. These
extensions have not been tested for a long time and are practically
dead code. Remove it so that future upgrades become easier.
Change-Id: I029f327406ca00b2370c93134158b61dda3b81e3
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
Migration notifiers were created to aid the CPU-boost driver manage
CPU frequencies when tasks migrate from one CPU to another. Over time
with the evolution of scheduler guided frequency, the scheduler now
directly manages load when tasks migrate. Consequently the CPU-boost
driver no longer makes use of this information. Remove unused code
pertaining to this feature.
Change-Id: I3529e4356e15e342a5fcfbcf3654396752a1d7cd
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
GFX retention mode does not save GFX rail power. The feature
increased MX rail power. Fixing the problem requires more overhead
than removing it. The feature has never been enabled in any targets.
So remove the feature.
CRs-Fixed: 1053516
Change-Id: I5f118138eca307f7cc16405ff9c8897ecd510c12
Signed-off-by: George Shen <sqiao@codeaurora.org>
Add DCVS plan to support new GPU frequencies and voltage corners
on msmcobalt v2.
CRs-Fixed: 1056661
Change-Id: Ie0bde4d908189da86077b69be52c51f2a35596a8
Signed-off-by: George Shen <sqiao@codeaurora.org>
Add separate voter clocks for controlling the mmss_camss_jpeg0_clk
from two clients on MSMCOBALT.
CRs-Fixed: 1049594
Change-Id: I530e35054fd512574bca9e5937317099f58d2bb6
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
Adapt IPA driver code where it has different handling
according to IPA H/W version, to support IPAv3.5 and
IPAv3.5.1 H/W versions.
Change-Id: I2e5bd023d643d2fbba32f226c5eb85c39b620f3b
CRs-fixed: 1055677
Signed-off-by: Ghanim Fodi <gfodi@codeaurora.org>
The kernel panic could happen in CPU interrupt context. CPR3 panic
callback function does ioremap which cannot be executed in an interrupt
context. Fix the issue by doing a ioremap during driver initialization.
CRs-Fixed: 1056786
Change-Id: I191127fafb26bcf10ea25f972fe5af122debf292
Signed-off-by: Tirupathi Reddy <tirupath@codeaurora.org>
Add initial device trees for msmcobalt QRD SKUK board.
Change-Id: I9426d3651c704fbef302c6d49170c9e996cb9179
Signed-off-by: Xiaogang Cui <xiaogang@codeaurora.org>
Add support for USB atomic notifier callbacks when host controller
drivers reports death of controller on some fatal error.
Current implementation doesn't help to recover from this condition.
Controller platform drivers can register for this callback and take
necessary steps to reset and add hcd again.
CRs-fixed: 1048766
Change-Id: Ie9064e669424096fee8c35cddccab29faf60cc6b
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
Get msmfalcon defconfigs up to date with msmcobalt
defconfigs, in order to bring in all the latest changes.
Change-Id: Ia670dab963bd337bf3aa395e15f4ec8e8f213e1c
Signed-off-by: Srinivas Ramana <sramana@codeaurora.org>
Add null pointer exception check for pointers which
may be NULL after memory allocation failure and may
be deferenced.
This patch is propagated from msm-3.18 kernel.
'commit 5c6aa1bb97a3 ("input: ft5x06_ts: add NULL
pointer check")'
Change-Id: Ied34d548bff27f8f6da9f4c81896e4505cdce218
Signed-off-by: Sarada Prasanna Garnayak <c_sgarna@codeaurora.org>
Signed-off-by: Sudhakar Manapati <smanap@codeaurora.org>
If Hibern8 enter/exit fails and we also see some UIC errors at the same
time, we would see following 2 recovery paths running in parallel to
restore the host and device communication.
Context-1: ufshcd_uic_hibern8_exit() -> ufshcd_link_recovery() ->
ufshcd_reset_and_restore()
Context-2: ufshcd_err_handler()->ufshcd_reset_and_restore()
This change fixes this race by making the ufshcd_link_recovery() to wait
for the already scheduled ufshcd_err_handler() to finish running and then
schedule the error handler again to make sure that host-device link is
reestablished.
While we are fixing the above race, similar race could happen between
ufshcd_eh_host_reset_handler() and ufshcd_err_handler() hence fix the
error handling in ufshcd_eh_host_reset_handler() same way as fixed in
ufshcd_link_recovery().
CRs-fixed: 1037647
Change-Id: Ic7a17a907e70122968c324e3cbe6e0421c28a2c9
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
When device switch to suspend state the gpio and pinctrl need to be
configured properly to prevent the touch controller current leakage in
device suspend state. The pinctrl must be configure first before
the gpio configuration. Select the pinctrl sleep state and after that
in gpio configuration part free both IRQ and reset gpio, and also set
direction of reset gpio to be input. If the gpio and pinctrl is not in
proper state the touch controller will not switch to the deep sleep state
and it will start consume current during the device suspend state.
To prevent this leakage current issue, pinctrl and gpio must be
configured properly.
This patch is propagated from msm-3.18 kernel.
'commit 494eae39f2a4 ("input: ft5x06_ts: pinctrl and gpio config in
suspend/resume path")'
Also cleared checkpatch errors on msm-3.18 kernel.
Change-Id: I0ec72bbbf12320ad22608522d1250614c6686fe3
Signed-off-by: Sarada Prasanna Garnayak <c_sgarna@codeaurora.org>
Signed-off-by: Sudhakar Manapati <smanap@codeaurora.org>
devm_pinctrl_get() does not release the ownership of mux function
of pins in the associated pin-group whenever a failure occurs in
driver probe routine. i.e struct pin_desc's mux_owner field is
still marked as being in use after a failure occurs in probe.
As a result of this, if another driver tries to acquire the
ownership of same pin, it gets an error while applying that
setting. To fix this, explicitly release the mux function
ownership of the the pin, by adding a new pin-group in pinctrl
DT and a new pinctrl state in touch device's DT node. This new
pin-group does not have a function setting (qcom,pin-func property).
This new state is explicitly activated during a probe failure
and driver remove routine to release the mux function ownership.
The patch also reorganizes the pinctrl related code in driver.
This patch is propagated from msm-3.18 kernel.
'commit f09a0560dde9 ("input: focaltech: release pinctrl resources
on probe failure")'
Change-Id: I16a97fefc64dd171deb800b481aa74a797c9ad55
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
Focaltech touch controller does not go to sleep in suspend because
the pinctrl operation inadvertently resets the touch controller.
Remove the pinctrl operation in suspend and resume callback to
prevent this spurious reset.
This patch is propagated from msm-3.18 kernel.
'commit 7e2ea02b16de ("input: ft5x06_ts: fix the Focaltech CTP
current leakage issue")'
CRs-Fixed: 1046961
Change-Id: Ifa02c0287195d7ce55fb2d8ac49ec1c8ae5baec9
Signed-off-by: Mao Li <maol@codeaurora.org>
Migrate the Focaltech driver to use pinctrl framework for GPIO
configuration so that driver is compatible with targets that
use and targets that don't use pinctrl framework.
This patch is propagated from 3.18 kernel
'commit 266d1fe0f630 ("input: ft5x06_ts: add support for
pinctrl framework")'
Change-Id: I84fc2a6d30f831b4b054780b107ce105614855ea
Signed-off-by: Mao Li <maol@codeaurora.org>
Upgrade the firmware only if same vendor id is found both in existing
fw and new fw to be upgraded.
This patch is propagated from 3.18 kernel
'commit dba19fc86781 ("input: ft5x06_ts: check vendor id before
upgrade FT firmware")'
Change-Id: Idfc50da45891a1475ac6b35d80c7d725607cbf81
Signed-off-by: Mao Li <maol@codeaurora.org>