Resource aqquistion on a per transfer level incures
a noticable latency penalty. This change removes
this latency by doing resource aqquisition as part
of runtime-pm on non-shared cores.
Change-Id: I112c10f52342ca7143b2286c72bba49ba7c8e49f
Signed-off-by: Dan Sneddon <dsneddon@codeaurora.org>
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
Add support for a scm call to protect a contiguous physical address range.
Add a config option to use this api to protect the kernel text section.
Otherwise, the user may specify the region through module parameters.
CRs-Fixed: 797891
Change-Id: Ie751ec72deb1a1692093559fe8c6784e8bf912a2
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
[schikk@codeaurora.org: 3.4 kernel doesn't have
drivers/soc/qcom folder, new file scm-mpu.c has
been added in arch/arm/mach-msm/.
3.4 kernel doesn't support function scm_call2 ,
so replaced the function call with scm_call which
is supported in 3.4 kernel ]
Signed-off-by: Swetha Chikkaboraiah <schikk@codeaurora.org>
DSI panel dynamic refresh rate range varies from panel to panel.
Add support to parse dynamic refresh range from the panel device
tree. If the range is not specified, use the default range from
30 to max panel supported rate.
Change-Id: Iac5adebe187bdc7abd4e82464de81305862df794
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
Signed-off-by: Baldev Sahu <bsahu@codeaurora.org>
Enable the HPD (Hot Plug Detect) conditionally for MTP targets
to enable HDMI on the targets with HDMI port.
Change-Id: Iada5b3e4ab50d37acb094cb68698155abf2e429f
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Signed-off-by: raghavendra ambadas <rambad@codeaurora.org>
OCMEM is no longer used, hence, removing OCMEM related code from the
ADSP driver.
Change-Id: I2657923d02c462380c8d57a47493d93f073a566a
Acked-by: Kevin Smith <smithk@qti.qualcomm.com>
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
It enables mpm DPSE/DMSE HV interrupt for detection of DP/DM line
transition during TCXO and/or VDD minimization
CRs-Fixed: 780259
Change-Id: I1bb5c6108dc44ca2055dd56dd5e4ae7f6b60dd3b
Signed-off-by: Guoping Yu <guopingy@codeaurora.org>
To dynamically configure GPIO strength in firmware
send GPIO strength parameter as a part of power manager
indication to firmware.
Change-Id: Iad9351d079a61321d407ca1032add841f16c8fdd
CRs-Fixed: 765151
Signed-off-by: Anand N Sunkad <asunka@codeaurora.org>
Add support for issuing a thermal reset from msm thermal driver.
The thermal driver is capable of monitoring all the tsens
temperatures and issuing a reset right from the boot.
The reset temperature can be given as input using devicetree.
Failure to do so will disable this feature for the target.
Change-Id: Iaf8f1764d4e4e3abb7e65f1d4397d895d195636d
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
Userspace processes often have multiple allocators that each do
anonymous mmaps to get memory. When examining memory usage of
individual processes or systems as a whole, it is useful to be
able to break down the various heaps that were allocated by
each layer and examine their size, RSS, and physical memory
usage.
This patch adds a user pointer to the shared union in
vm_area_struct that points to a null terminated string inside
the user process containing a name for the vma. vmas that
point to the same address will be merged, but vmas that
point to equivalent strings at different addresses will
not be merged.
Userspace can set the name for a region of memory by calling
prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, start, len, (unsigned long)name);
Setting the name to NULL clears it.
The names of named anonymous vmas are shown in /proc/pid/maps
as [anon:<name>] and in /proc/pid/smaps in a new "Name" field
that is only present for named vmas. If the userspace pointer
is no longer valid all or part of the name will be replaced
with "<fault>".
The idea to store a userspace pointer to reduce the complexity
within mm (at the expense of the complexity of reading
/proc/pid/mem) came from Dave Hansen. This results in no
runtime overhead in the mm subsystem other than comparing
the anon_name pointers when considering vma merging. The pointer
is stored in a union with fieds that are only used on file-backed
mappings, so it does not increase memory usage.
Change-Id: Ie2ffc0967d4ffe7ee4c70781313c7b00cf7e3092
Signed-off-by: Colin Cross <ccross@android.com>
Git-commit: e39499711626c4dc296c0d8f49b60eb10dfbf4a9
Git-repo: https://android.googlesource.com/kernel/common.git
[imaund@codeaurora.org: Resolved merge conflicts caused by
removal of pad_len_spaces.]
Signed-off-by: Ian Maund <imaund@codeaurora.org>
Signed-off-by: Nirmal Abraham <nabrah@codeaurora.org>
Sub System Restart[SSR] framework allows driver to handle
unexpected crash in middle of operation.
Also, adding support clk_div dtsi entry to calculate
avtimer_lsw value.
Change-Id: I521e3c010dadd00a06a0fe8998a1759b2eb81b55
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Existing implementation does not support blink feature for
GPLEDs. Blink functionality is required if user wants to
produce fading effects using GPLEDs. Hence, adding blink
functionality to GPLEDs.
CRs-Fixed: 723698
Change-Id: I87886469b05cf75986e89ebc3f28d9a6a386401f
Signed-off-by: Abinaya P <abinayap@codeaurora.org>
Add support to check for pronto ver3 hardware is present
by reading a device tree entry
Change-Id: I01cd71ac6c00b6c1e4c5ea46b3f3c0b57a0dbd95
CRs-Fixed: 737209
Signed-off-by: Siddharth Bhal <sbhal@codeaurora.org>
One of the main goals of the IPC Logging is to allow extracting logs
from memory dumps. The current implementation has the following
limitations:
1) if logs are being dumped through debugfs at the time of the crash,
it is not possible to extract logs that were already dumped
2) it is not always possible to tell the difference between empty,
partially full, and full log pages resulting in extraction
complications
3) if the system memory is not cleared between reboots, then the same
log ID and log page may be extracted leading to duplicate log
pages
Add additional debugfs read index, timestamps for log pages, and change
the read/write indices to easily differentiate between empty, partially
full, and full log pages.
CRs-Fixed: 670345
Change-Id: I695f6e0605f3755b868ede59851f5ca919f8fb0d
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
If clients use custom serialization functions, then they may need to
define a version for deserialization support for log extraction.
Add client version support.
Change-Id: Id135f06d4142de39275b5d0caab88708d5496b5e
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
ESD feature may need to check the status of the panel by reading specific
panel register depending on the panel. Add support for ESD status check
through status register read and to configure the method used for checking
panel status through the panel dtsi entry.
Change-Id: I13b11362722eb2ad379162944eafff04ec01d1cb
Signed-off-by: Shivaraj Shetty <shivaraj@codeaurora.org>
Signed-off-by: Nirmal Abraham <nabrah@codeaurora.org>
Add support to enable or disable esd check through panel dtsi
entry. This will help in enabling the feature only for those
panels which support BTA.
Change-Id: I4ef85bb2e78b133dd9577ac3d6788e46b34fe761
Signed-off-by: Shivaraj Shetty <shivaraj@codeaurora.org>
Signed-off-by: Nirmal Abraham <nabrah@codeaurora.org>
From user space, the call procedures of red led blink are as
below:
1. turn off red led.
2. blink red led.
Each above step will be transitioned from user space to kernel
driver and trigger a led WORK. The order from user space is
very important because if the step 2 completes before step 1,
then the red led will be turned off, while the user wants to
blink it.
On kernel version 3.4, below sequences will cause the order
from user space fail:
1. CPU0 schedule a led WORK on system_wq, which is to turn off
the red led.
2. CPU1 schedule a led WORK on system_wq, which is to blink the
red led.
3. Although the first WORK is queued before the second WORK,
both of them can executed concurrently on CPU0 and CPU1.
4. CPU0's workload is very heavy because it will handle almost
all the hardware interrupt, so it is probably that the first
WORK thread is scheduled out for some time. At that moment,
the second WORK can complete faster than the first WORK.
This finally cause the red led is first blinking then been
turned off.
To solve this issue on Kernel version 3.4, we can create an
ordered workqueue which will promise us that the same led WORK
will not be scheduled on different cpu and cannot be executed on
different cpu concurrently.
On kernel version 3.10, because the default system_wq has
already promised the concurrency of the same WORK, so we don't
need to use ordered workqueue for led module.
Change-Id: I23fda20f2951bfcebb7ce7c9ecea542435496efe
CRs-Fixed: 714466 703170
Signed-off-by: Mao Li <maol@codeaurora.org>
Signed-off-by: Abinaya P <abinayap@codeaurora.org>
This patch adds DMA_ATTR_SKIP_CPU_SYNC attribute to the DMA-mapping
subsystem.
By default dma_map_{single,page,sg} functions family transfer a given
buffer from CPU domain to device domain. Some advanced use cases might
require sharing a buffer between more than one device. This requires
having a mapping created separately for each device and is usually
performed by calling dma_map_{single,page,sg} function more than once
for the given buffer with device pointer to each device taking part in
the buffer sharing. The first call transfers a buffer from 'CPU' domain
to 'device' domain, what synchronizes CPU caches for the given region
(usually it means that the cache has been flushed or invalidated
depending on the dma direction). However, next calls to
dma_map_{single,page,sg}() for other devices will perform exactly the
same sychronization operation on the CPU cache. CPU cache sychronization
might be a time consuming operation, especially if the buffers are
large, so it is highly recommended to avoid it if possible.
DMA_ATTR_SKIP_CPU_SYNC allows platform code to skip synchronization of
the CPU cache for the given buffer assuming that it has been already
transferred to 'device' domain. This attribute can be also used for
dma_unmap_{single,page,sg} functions family to force buffer to stay in
device domain after releasing a mapping for it. Use this attribute with
care!
Change-Id: Idac6a165aacb0225aee6aa4c19cd6fb0df6772d5
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com>
Git-commit: bdf5e4871f1b41150236e2337837399109469e65
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Add flash_wa regulator support in flash led driver. The regulator raise
the SMBB over temperature threshold before flash enabled, and restore to
default setting after flash disable.
CRs-Fixed: 697457
Change-Id: I66f8189f62a875dd549377b552bf4a8f40798f31
Signed-off-by: Chunmei Cai <ccai@codeaurora.org>
Flash led relies on SMBB to supply the 5V drive voltage. Add a regulator
device in qpnp-charger driver to support flash related workarounds in
SMBB.
While at it, add a SMBB temperature threshold workaround in the
regulator device. On certain devices SMBB/SMBBP over temperature
happened at default settings before flash module start thermal derating.
Raise the SMBB over temperature threshold when regulator enabled, and
restore to default setting when regulator disabled.
CRs-Fixed: 697457
Change-Id: I7b6003caebf23ea8662a21bb16f9095d1db0e7bb
Signed-off-by: Chunmei Cai <ccai@codeaurora.org>
Kernel-originated IP packets that have no user socket associated
with them (e.g., ICMP errors and echo replies, TCP RSTs, etc.)
are emitted with a mark of zero. Add a sysctl to make them have
the same mark as the packet they are replying to.
This allows an administrator that wishes to do so to use
mark-based routing, firewalling, etc. for these replies by
marking the original packets inbound.
Tested using user-mode linux:
- ICMP/ICMPv6 echo replies and errors.
- TCP RST packets (IPv4 and IPv6).
Change-Id: I95d896647b278d092ef331d1377b959da1deb042
Signed-off-by: Lorenzo Colitti <lorenzo@google.com>
Git-commit: 3356997e1e1b2aa9959f046203e6d0b193bbd7f7
Git-repo: https://android.googlesource.com/kernel/common.git
[imaund@codeaurora.org: Resolve trivial merge conflicts.]
Signed-off-by: Ian Maund <imaund@codeaurora.org>
Removing redundant parameters which are not applicable
on the IADC peripheral.
Fix the issue with "fast_avg_setup" and "decimation"
parameters to configure correctly as per channel
configuration.
Change-Id: Idfe823effc6255b57e31f37621971aab29f08020
Signed-off-by: Dipen Parmar <dipenp@codeaurora.org>
Add support for switching between dsi command mode and
video mode and vice versa at runtime. If the panel is
configured in video mode, it would be power efficient to
be able to dynamically switch to command mode on need
basis. This change adds the support by providing an IOCTL
to switch between video mode and command mode at runtime.
Change-Id: I23f0cadc0f76e0b4406c8156c3cca40782686bf0
Signed-off-by: Sandeep Panda <spanda@codeaurora.org>
Signed-off-by: Shivaraj Shetty <shivaraj@codeaurora.org>
Add panel ROI limitations on minimum width and height values
to the panel info sys_fs node.
Change-Id: I3297beb20e7f207a296e6cec114daf2305324898
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
Read panel alignment restrictions on left, top, width and height values of
the updating ROI from the dtsi file and share through sysfs node.
Framework needs these details for configuring MDP for certain
features (e.g. Partial frame update).
Change-Id: Ibe6973b721bb20120a6d7a217bad2d0d159cc836
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
LPASS exposes registers from which timestamp can be
read by clients for audio & video synchronization.
Change adds to retrieve the register address of AV
timer in LPASS passing from driver tree data.
CRs-fixed: 677082
Change-Id: Id7cf3455e22ddc27f5350a7a37c3b40d44eb0873
Signed-off-by: Kuirong Wang <kuirongw@codeaurora.org>
On some MSM8x26 platforms, board configurations exist which utilize
a current sensing OVP to allow adaptive input current limiting
to accurately measure the current flow through the external parallel
USB path.
Add support for this external OVP part by allowing an MPP to be
configured as a sense line and exposing the converted current
reading via a module parameter which is accessible to userspace.
CRs-Fixed: 651261
Change-Id: Idb47430476c1c19f58a4836a15841b95187baf77
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
Support for actuator power operation.
- add vreg data parsing from property.
- add interface for power up and down.
Change-Id: I809e23e27d119635e85b565fa6ea2f045b2afdc1
Signed-off-by: Evgeniy Borisov <eborisov@codeaurora.org>
Add support in KTM to get SoC parts info by reading appropriate
efuse bits and recommend default cpu temperature limit based on
efuse value temperature map to userspace through sysfs interface
'/sys/module/msm_thermal/default_cpu_temp_limit'. Efuse data
to be read such as address, row number, starting bit number
of the row, number of bits for identifying parts etc, default core
temperature and efuse temperature value map are read from dt.
The default cpu temperature information is exported in the format
<temperature in degree celsius>.
Change-Id: Icbf43c3fd56e95d49a886d309e613d2fe146a506
Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
Send LDO notification through SMD channel to FW which use
to update the pmic pam map.
Change-Id: I7a893570489e65d92df65728d09fd20e61d6b0fc
CRs-Fixed: 660361
Signed-off-by: Hardik Kantilal Patel <hkpatel@codeaurora.org>