The grouping of tasks based on oom_score_adj values change from
one framework to another. This requires corresponding changes in
the threshold values set for almk and per process reclaim.
Introduce sysfs nodes to set threshold adj for process reclaim
and adaptive LMK dynamically.
Change-Id: Ib7565bfd5d2e93aa4ff8fdd20414cac0a0f38bf7
Signed-off-by: Suyog Sarda <ssarda@codeaurora.org>
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
This reverts commit 88e036082be3 ("msm: mdss: Fix support
for ARGB1555 and ARGB4444"). Fix for this is now taken
care in HAL. Hence, no longer required.
Change-Id: I119152dd19ea55ca7c6922061571a7123be1235a
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
In cases of EDID read or parser failures, driver should expose
a default resolution to other modules to continue with the HDMI
initialization. So during bridge chip initialization sequence
update the default resolution.
Change-Id: Ia6a7f8b4d9e3f1650b9c11aafc118a2662801ba0
Signed-off-by: Sandeep Panda <spanda@codeaurora.org>
In case of DSI video mode panels, interrupt generation for DSI
FIFO overflow error is masked during DCS read commands since it
is expected. However, when the panel is under ESD attack, it is
possible that harmless DSI ACK/PHY lane errors are generated.
When a DSI error interrupt is generated, all the possible DSI
errors are checked in mdss_dsi_error API. This causes DSI FIFO
overflow recovery even though it is not expected, causing a
possible flicker on the panel. Avoid DSI FIFO overflow recovery
in such cases where the mask bit is set.
Change-Id: I2bd2810d5ee63ccf0242f8023ae6aee0f3957b93
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
In current implementation for split dsi mode when we configure
dsi phy regulator for DSI1 controller, then it affects the phy
regulator setting of DSI0 controller, since phy regulator is
shared among both the controllers. This is causing abnormal
wave form for DSI0 lanes. Fix this issue by checking for the
state of phy regulator of the other controller, while configuring
dsi phy regulator of one DSI controller.
Change-Id: I318ae88d68f0acfa3e590ab07e5b2830aa4ae967
Signed-off-by: Sandeep Panda <spanda@codeaurora.org>
Serial function driver creates debugfs files even though ports
are not allocated. Fetching/reading those files without allocation
of ports leads to crash. Check port allocation before creating
the files.
CRs-Fixed: 1003498
Change-Id: I85b050a261cca6f961d5d9058efb8b7facf242ce
Signed-off-by: Arumuga Durai A <cadurai@codeaurora.org>
Currently driver is enabling both USB core irq and async irq as part of
entering low power mode during cable disconnect. These irqs are not
required to enable during low power mode in case of cable disconnect as
USB depends on PMIC hardware for detection of cable connect/disconnect
and host mode. Hence disable those irqs as part of low power mode and
enable them only for host bus suspend and device bus suspend scenarios.
Change-Id: Id0f3f97b360c1d6adee9d6a0fd2eff1961147ea0
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
Some of the transfer parameters like DMA mode will be changed
only when CQ is in HALT state to send some legacy commands like
tuning etc.
Also, fix a typo with set_transfer_params() host op.
Change-Id: I3a9856e0d60ce6a9cc1727cd8ccd10ef33bb707c
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
Data CRC errors are observed for the data commands that are
sent immediately after tuning in HS200 mode with CQ enabled but
in HALT state. This is because tuning commands change the block
size to 128 bytes from default 512 bytes.
Change-Id: I9657b16954b54c491fa19f9d82d9141edf45e0ef
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
During the suspend of class device (mmc_host), it is
legal for the suspend to fail. For e.g in case of SDIO
the wlan may refuse to suspend at that point of time.
In such a scenario the device should not be marked as
suspended. Its state should be restored to resumed.
Otherwise, the device never enters suspend again.
write mem to /sys/power/state -> suspend is triggered
[0: ksdioirqd/mmc2:25044] HIFsuspendwow TODO
wma_suspend_fw: wow suspend successful
system_server: 1226] vfsspi_regulator_onoff: off
kworker/u16:2:23854] mmc2: mmc_host_suspend: start
wma_check_scan_in_progress: scan in progress on interface
hifDeviceSuspend: Scan in progress. Aborting suspend
kworker/u16:2:23854] wlan suspend failed error=-1
Wlan refuses to suspend above
mmc2: mmc_host_suspend: failed: ret: -1 .
mmc2: mmc_host_suspend: end -->
dpm_run_callback(): mmc_host_suspend+0x0/0x2d8 returns -1
PM: Device mmc2 failed to suspend async: error -1
PM: Some devices failed to suspend
Since wlan refuses to suspend, SDIO doesn't suspend too.
But the class device is still marked to be suspended
[state: 2] incorrectly.
It should be marked as resumed, since suspend had failed.
After this, the device never suspends:
!@suspend_thread_func: write mem to /sys/power/state
PM: suspend entry 2016-03-29 10:52:42.456889406 UTC
mmc2: sdio_irq_thread: 130: acquired wlock: state: 2 ->
incorrectly marked as suspended.
mmc2: sdio_irq_thread: 130: acquired wlock: state: 2
PM: Syncing filesystems ... done.
active wakeup source: mmc2:0001->wakeup event by mmc2
CRs-fixed: 997876
Change-Id: Ib08a72b2ab21c4d4a76bac8e65d06c13ccbd1482
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
When cluster enters a low power mode, the mode entered is stored
in last_level. During LPM driver probe last_level is initialized
to default level, if a core in that cluster is online.
If all the cores in the cluster are hotplugged after initializing
the last_level and before the per cluster data structures are
initialized, cluster enters low power mode but does not update
last_level as the data structures are not available. In this case
when a core in this cluster is coming online and last_level indicates
default level, assumes cluster did not enter any low power mode,
the update of flags to reflect the cores as active for this cluster
does not happen. This makes driver to select system level low power
mode as if this cluster is in low power mode eventhough it is out
of low power mode.
To avoid this race, prevent cores hotplug during lpm probe.
Change-Id: I1d0c51c52e54ab30239b2fca11040f134315fe61
Signed-off-by: Anil Kumar Mamidala <amami@codeaurora.org>
Thermal driver don't acquire get_online_cpus() lock before
evaluating to hotplug or online a core. This will introduce
a corner case where thermal determines to keep an offline core
hotplugged but will be brought online by other driver due to race
condition.
Thermal driver after evaluating to hotplug a core will see if it
is online. if it is online, it will proceed to hotplug it, otherwise
it will evaluate for the next core. If another driver initiates to
online a core when thermal is evaluating hotplug status, we will end up
onlining a core when thermal has a request to hotplug. Explained the
scenario below,
1. | Driver X initiates cpu 'A' online
2. Thermal gets CPU_UP_PREPARE |
Notification and allows CPU |
'A' to be online. |
3. Thermal driver evaluates |
hotplug status and sees cpu |
'A' being offline and skips |
to next CPU. |
4. | CPU 'A' online is complete and CPU
| online mask is updated.
Fix this corner case, by listening for CPU_ONLINE notification and
initiate a re-evaluation to retry hotplug, if a CPU online was supposed
to be hotplugged by thermal driver.
CRs-Fixed: 928985
Change-Id: Icc6c6bcbc2656c0712550b884b9a9b17e3fea9d1
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
The function graph tracer adds instrumentation that is required to trace
both entry and exit of a function. In particular the function graph
tracer updates the "return address" of a function in order to insert
a trace callback on function exit.
Kernel power management functions like cpu_suspend() are called
upon power down entry with functions called "finishers" that are in turn
called to trigger the power down sequence but they may not return to the
kernel through the normal return path.
When the core resumes from low-power it returns to the cpu_suspend()
function through the cpu_resume path, which leaves the trace stack frame
set-up by the function tracer in an incosistent state upon return to the
kernel when tracing is enabled.
This patch fixes the issue by pausing/resuming the function graph
tracer on the thread executing cpu_suspend() (ie the function call that
subsequently triggers the "suspend finishers"), so that the function graph
tracer state is kept consistent across functions that enter power down
states and never return by effectively disabling graph tracer while they
are executing.
Change-Id: If648ad1c6a9f584ec8377327e7e3f31b952d037a
Fixes: 819e50e25d0c ("arm64: Add ftrace support")
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reported-by: Catalin Marinas <catalin.marinas@arm.com>
Reported-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Suggested-by: Steven Rostedt <rostedt@goodmis.org>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Will Deacon <will.deacon@arm.com>
Cc: <stable@vger.kernel.org> # 3.16+
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Git-commit: de818bd4522c40ea02a81b387d2fa86f989c9623
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
Signed-off-by: Anil Kumar Mamidala <amami@codeaurora.org>
Current implementation of SPMI arbiter dispatches interrupt based on the
Arbiter's accumulator status, in some cases the accumulator status may
remain zero and the interrupt remains un-handled. Add logic to dispatch
interrupts based Arbiter's IRQ status if the accumulator status is zero.
CRs-Fixed: 1008665
Change-Id: I068f5c7d33758063878721d7cce1308fa803e3bd
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
ion handles associated with a client must be destroyed
under client->lock so as to prevent race where other path
use handle while being destroyed.
One such path is when user access heap details through
debugfs.
|rb_next()
|ion_debug_heap_total(inline)
|ion_debug_heap_show()
|seq_read()
CRs-Fixed: 1000492
Change-Id: I7bc7562400df0ae08b1aa232efe00b657339fcfb
Signed-off-by: Shiraz Hashim <shashim@codeaurora.org>
Format specifier %p can leak kernel addresses while not valuing the
kptr_restrict system settings. When kptr_restrict is set to (1), kernel
pointers printed using the %pK format specifier will be replaced with 0's.
So that %pK will not leak kernel pointers to unprivileged users.
So change the format specifier from %p to %pK.
Debugging Note : &pK prints only Zeros as address. if you need actual
address information, pls echo 0 to kptr_restrict.
$ echo 0 > /proc/sys/kernel/kptr_restrict
Change-Id: I0baf2be2d5a476e2e4267f20b99d0ddf5492469e
Signed-off-by: Mallikarjuna Reddy Amireddy <mamire@codeaurora.org>
Remove array declaration in i2c write function of Synaptics DSX
touch driver and use the malloc function to allocate the memory.
This change is added to use heap memory instead of stack memory.
CRs-Fixed: 1010986
Change-Id: I8f2f75744bb442191d7d4577795d986e10ea1cf6
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
When IPA clock is enabled, suspend bit is cleared
and if pipe is non-empty EOT is posted internally.
At the same time, there is a possibility that SPS
driver posts EOT. This can result into incorrect
state of polling state and switch to intr mode is
tried repeatedly. Make a change to check if we are
in intr mode already in addition to the polling state.
Change-Id: I1af08605f7d2d234b0e5a4e3c8928db6cff5c7b4
Acked-by: Chaitanya Pratapa <cpratapa@qti.qualcomm.com>
Signed-off-by: Sridhar Ancha <sancha@codeaurora.org>
Currently, we request USB PHY to float DP/DM lines in usbin_uv
handler whenever USBIN_UV and SRC_DET bits are not set during
a charger insertion. This is to help with charger to run APSD
on DP/DM lines without any interference from USB PHY.
Eventually during QC3.0 detection, we run fake removal and
insertion in between. During this sequence, we disable APSD in
charger as well thereby floating DP/DM lines for a period of
~800ms. On some charger adaptors, this is detected as a different
charger type failing QC3.0 detection and also failing to operate
in QC2.0 mode.
Fix this by setting DP to 0.6V and DM to floating after fake
removal and before disabling APSD. Also, do not request USB PHY
to float DP/DM lines again during fake insertion.
CRs-Fixed: 1006776
Change-Id: I3a9f2ef71b657b3926ccd2325585c9b2a4edead9
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Make sure to use pipe handle from the TX
endpoint rather than using a stored handle.
The stored handle may become invalid if SSR
happens between storing of that handle
and locking the mutex.
Change-Id: I53e8f860c2d50061b6c4e6ce2f944c1e2ed8dff2
Signed-off-by: Dilip Kota <dkota@codeaurora.org>
It is not guaranteed that MAP commands will be in their own frame. Some
commands may be embedded in a large aggregated frame of datagrams. This
patch forces MAP command processing to occur after the deaggregation
routing. This has the side-effect of incurring a malloc/memcpy latency
penalty for each MAP command. This also introduces a side-effect where
every packet after de-aggregation will need to be inspected for the
cmd bit.
Change-Id: Icc5ad1e7d622a35883f858c2c132c9679f43c79e
Signed-off-by: Harout Hedeshian <harouth@codeaurora.org>
The panel_reg_buf is a dynamically allocated buffer of size reg_buf_len
so checking sizeof(panel_reg_buf) is incorrect. Using scnprintf will
ensure that len is at most reg_buf_len - 1 after all the prints. This
allows sanity checks to be removed which were incorrectly skipping
clock disable, resulting in an extra clock reference count.
Change-Id: Ic3bb685c7b83eefef7bc207ad93d6a2a9e36fd33
Signed-off-by: Patrick Auchter <auchter@motorola.com>
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
Compare ion handles in driver instead of matching fds
to check if a buffer is already mapped or not .
Bug: 28747768
Change-Id: Ifd18d8689351c4a6a22c988d359fb413be19e142
Signed-off-by: Ashray Kulkarni <ashrayk@codeaurora.org>
Signed-off-by: Praveen Chavan <pchavan@codeaurora.org>
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
Signed-off-by: Arun Menon <avmenon@codeaurora.org>
Signed-off-by: Suman Mukherjee <sumam@codeaurora.org>
Signed-off-by: Paras Nagda <pnagda@codeaurora.org>
Signed-off-by: Vasantha Balla <vballa@codeaurora.org>
Some of the targets are not having ese gpio so if we try
to access this pin on these targets, crash is observed.
Change-Id: Ib5a2d7879f1b493bc445ab4a2d32a89f98d872b4
Signed-off-by: Gaurav Singhal <gsinghal@codeaurora.org>
we are going to use the eSE for features which are independent
from NFC, so we need to use the power request pin from the eSE.
Change-Id: I60651052d7bf97a8a0505e76904cebe2b7c69ce2
Signed-off-by: Gaurav Singhal <gsinghal@codeaurora.org>
New country XA is based on Japan. The channels 5170-5250 are marked
as PASSIVE.
CRs-Fixed: 990486
Change-Id: I6dad4ce061316680239b3f9c23e64b23a875eb75
Signed-off-by: Rajeev Kumar Sirasanagandla <rsirasan@codeaurora.org>