The vfe stats ctrl and ops structures are being used
uninitialized. Zero them out during vfe subdevice
initialization.
Change-Id: I1c20dd54f98a778060953d25449114cdafcf52e7
Signed-off-by: Kiran Kumar H N <hurlisal@codeaurora.org>
Add flag for handling secure session to rotator data passed during
start ioctl call.
Change-Id: Id5db8b4be1f5058cb9cb9227963acc288eebc1dd
Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
For handling split IOMMU domain cases, BLT mode requires DMA to map
for reads and Overlay for writes. DMA and Overlay blt addresses are
added to configure the respective registers to avoid page faults and
normal operation of supported panel interfaces.
Change-Id: Id007cf96588f817bcfe8559177abb073a9b00755
Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
Flush control endpoints from ep_dequeue and set request completion
to NULL once calling completion handler of function driver. This will
make sure that all control endpoint requests are flushed in disconnect.
CRs-Fixed: 373672
Change-Id: I7506c2e53d13f137ae6f222a06fbcc0dee77f68e
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
OEMs use SSID in a specific range. Recently DIAG changed the mask
update algorithm and this range was missed as its not used internally.
This change adds it back.
CRs-Fixed: 359379
Change-Id: Ib7249f157e4e37294b6da6580fcf19995afeef8f
Signed-off-by: Shalabh Jain <shalabhj@codeaurora.org>
Add firmware upgrade support for MXT224E and also support
the new T55 object introduced with the newer firmware. Read
T38 object from touch controller after the firmware upgrade
to avoid reading/writing into old T38 address.
Change-Id: Ifc7e0b2c31badbbf5a402413e841606db4f6dc66
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
Add an idle for synchronization after writing the SMMU ASID register.
Change-Id: I1e13c9725e52293b7d4b9034fd1bac045ca5f0d1
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Reverse boosting is also seen on the DC charging path
and may cause charger removal detection problems.
Fix this by changing the reverse boost detection to only
check the active charging path. Only the active charging
path will see reverse boosting voltages because the other
path's OVP will automatically be opened (off) by the
hardware.
Change-Id: I23a48cd49d912e2bb2651159ec91d0ccfa7f5e0d
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
PM8917 has a new register which allows configuring
the falling USB under voltage detection (UVD) threshold
from 3.85V to 4.35V in 100 mV steps.
Add an API that allows to set this value per default and
also only do this for PM8917 chips.
Change-Id: I9b4259b43f148762ac72af40bdc79b895d9b4fc2
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
When decreasing the usb value from the usb_ma_table make
sure to take into account wether the value is available
on the PMIC platform by checking the first bit and if
the iusbfineres flag is set. This ensures that both
PM8917 and PM8921 are supported correctly.
Change-Id: I0be94103a066554924f8b212d3751f13812c49e0
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
Set the BOOT_TIMER_EN bit when writing the
BOOT_DONE configuration. This is required to make
sure the boot timer will be enabled during the
next phone boot.
Change-Id: I0c43de3a0c285979f7bccd42e464ca0d2fbbe42a
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
For every soc calculations there are three unusable charge (uuc)
values.
uuc_uah_itest:
The uuc value in micro amp hour (uah) based on the max current
(itest). Typically this value is very high and changes as the
battery resistance changes
uuc_uah_iavg:
The uuc value based on the average current (iavg). Typically
this is lower than uuc_itest
uuc_reported:
The reported uuc based on state of charge (SOC) of the battery
which chooses a stepsize value and approaches towards
uuc_uah_itest or uuc_uah_iavg based on whether the device is
being charged.
The expectation is that the reported uuc increase as the battery looses SOC
and decrease as SOC approaches full condition.
To help us coming up with a satisfactory algorithm the following
parameters are introduced.
uuc_multiplier:
The multiplier used in stepsize calculation
uuc_iavg_div:
The divisor to use in calculation of stepsize when there
is a significant jump in average current from the
previous attempt
uuc_min_step_size:
The minimum stepsize to use if the calculated stepsize is very less
Also, in order to ignore the high bootup time load a timer is introduced
which makes the algorithm ignore iavg values upon bootup.
The algorithm also uses the previous uuc based on iavg in
"uuc_uah_iavg_prev". This aids in checking if there was a significant
increase in average current from the previous time uuc was calculated.
The algorithm keeps track of the previous reported uuc in last_uuc_uah.
Change-Id: I360fd74e7fd2c939dd67023c128b2d70da923e9a
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Video core is dropping certain IDR frames due to timeout.
This is resulting in video corruption. Computing the core
timeout based on input frame size and programming it for
each input frame fixes the issue.
Change-Id: I75d5039bc09f9be6a3028461ee4a2f13064bf53a
CRs-fixed: 370570
Signed-off-by: Rajeshwar Kurapaty <rkurapat@codeaurora.org>
Currently reading PMIC ID line status immediately once PMIC interrupt
is triggered. This leads to returning wrong ID line state sometimes
and causes not detecting connected devices. Hence add debouncing time
of 5msec for PMIC ID line state to settle down before reading PMIC
ID status.
CRs-Fixed: 371552
Change-Id: I4a5eae1d3759b5cc5c7ab70c4bde900a57ec1bd1
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
Expose the following packed commands tests:
- Test the write packed commands list preparation
- Simulate a returned error code
- Send an invalid packed command to the card
Change-Id: I9e061a1992cc09f3203d25eba14418d9ebde371a
Signed-off-by: Lee Susman <lsusman@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
During a subsystem restart or a line-discipline unload with active data
transfer, the logical channel purge function (smux_lch_purge) could lead
to a deadlock while flushing the workqueues if it is called with
mutex_lha0 locked and one of the worker functions calls a function that
locks mutex_lha0. In addition, the local mode was reset which is not
expected behavior.
This change aborts all work functions in the case of a reset allowing
the flush to be performed without any locks held. Once the flush is
complete, then the appropriate locks can be obtained before the reset
flag is cleared and work items can once again get scheduled.
Change-Id: I2afbcc3885907cd0cc8695f7c7a85b61a999e1fb
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
User memory needs to be zeroed out before it is sent to the user.
To do this, the kernel maps the page, memsets it to zero and then
unmaps it. By virtue of mapping it, this forces us to flush the
dcache to ensure cache coherency between kernel and user mappings.
Originally, the page_alloc loop was using GFP_ZERO (which does a
map, memset, and unmap for each individual page) and then we were
additionally calling flush_dcache_page() for each page killing us
on performance. It is far more efficient, especially for large
allocations (> 1MB), to allocate the pages without GFP_ZERO and
then to vmap the entire allocation, memset it to zero, flush the
cache and then unmap. This process is slightly slower for very
small allocations, but only by a few microseconds, and is well
within the margin of acceptability. In all, the new scheme is
faster than the default for all sizes greater than 16k, and is
almost 4X faster for 2MB and 4MB allocations which are common for
textures and very large buffer objects.
The downside is that if there isn't enough vmalloc room for the
allocation that we are forced to fallback to a slow page by
page memset/flush, but this should happen rarely (if at all) and
is only included for completeness.
CRs-Fixed: 372638
Change-Id: Ic0dedbadf3e27dcddf0f068594a40c00d64b495e
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Prop bit is checked in userspace and must be set in
driver in order to be recognized correctly, since it defaults
to mouse pointer.
Change-Id: Ifbd7ffe6633860ab3858cf2b3465d593724c5c64
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
This reverts commit 5462907f72ddcc7d337ce9431d54428c8dc486eb.
Change-Id: Ibe6ec76096838b71e43cd9beac1f57ff179c5008
Signed-off-by: Sunil Joseph <sunilj@codeaurora.org>
The current code sets up irq attributes at postcore_init. But
with irqdomains, irqs are mapped later at runtime. Thus we need
to set these parameters within the irqdomain map routine for
systems that are using Device Tree.
Change-Id: I185ebc4efdb194d690ecbec75171709bd09e0588
Signed-off-by: Michael Bohan <mbohan@codeaurora.org>
After writeback mode is switched for DSI Video interface, wait for
overlay done for prefill frame to avoid unnecessary fetches from previous
buffers resulting in page faults.
CRs-Fixed: 372389
Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
Change-Id: Iacd3775a718fe8e08404b4d119d447a88b628617
Update the call sites of cpu_is_msm8930() to include checks
for the MSM8930AA() variant. Relevant drivers will be
updated for more driver-specific specific MSM8930AA checks
at a later time.
Change-Id: Iff1af7a5454ec56c40390682ce2b4b6d1d325c91
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
Add the qpnp-pwm driver to support LPG/PWM devices in Qualcomm
plug-and-play (QPNP) PMIC chips. QPNP chips make use of
Qualcomm's SPMI register convention. LPG module provides a superset
of functionality provided by PWM device such as user defined pattern
generation, driving multiple PWM channels etc.
Change-Id: I29a22c6e655612d93cac10e6eea76383d37775e2
Signed-off-by: Jay Chokshi <jchokshi@codeaurora.org>
TLMM v3 version has dedicated pads for only SDC1
and SDC2 among all SDC slots as opposed to v2 version.
Change-Id: I73c54f0a2799e6ffca74e5b846ac8339d0af3bb8
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
Finer granularity is needed when mapping into the IOMMU's for
rotator and mdp for secure playback. During secure playback
HLOS will only have access to map into one context bank. The
other context bank is secured and programmed by TrustZone.
Divide DISPLAY_DOMAIN into DISPLAY_WRITE_DOMAIN and
DISPLAY_READ_DOMAIN. Divide ROTATOR_DOMAIN into ROTATOR_SRC_DOMAIN
and ROTATOR_DST_DOMAIN.
Change-Id: I2d67525d6026b8a1fb2f2cb00e4bb118c8eb6f27
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
The sensor OV8825 supports internal actuator driver
for autofocus operation. Adding necessary board information
to enable the autofocus driver support
Change-Id: I8d9a19b31d9fec7dafc6e6b9aabb4c930d0b9ac0
Signed-off-by: Rajakumar Govindaram <rajakuma@codeaurora.org>
After the UDC class conversion, there is no reason to
limit the kernel to have only one UDC controller in the system.
Change-Id: I15d1eef19187e772131ae217452dc22e294f4a78
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Ido Shayevitz <idos@codeaurora.org>
Set usb_core_id property in the platform data of four devices:
1. usb_core_id = 0 for the HSUSB ci13xxx device
2. usb_core_id = 1 for the HSIC ci13xxx device
3. usb_core_id = 0 for the HSUSB android device
4. usb_core_id = 1 for the HSIC android device (new device added)
Change-Id: I28fd5afeb2a137864868d799cd51d23bd9812be3
Signed-off-by: Ido Shayevitz <idos@codeaurora.org>
Add support for ion in MDP PPP drivers for accessing
source images and destination images.
Change-Id: I1ba07fb826447abb13ff73752089577cf9924ce5
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
Add EXPORT_SYMBOL to specific functions that should be
allowed to be used from within kernel modules.
Change-Id: I666c1f1a18d5af58906cb2185c5cf29d8596013f
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
Adds new event type to convey about the resources
requirement.
Change-Id: I7ea67231c247dc983463a02b828c10adc486b60d
Signed-off-by: Praneeth Paladugu <ppaladug@codeaurora.org>
Adds support for Profile and Level support by setting
default values and calling set_property.
Change-Id: Ied289779bca6441c5cfdde7c766c02c14c8bce23
Signed-off-by: Praneeth Paladugu <ppaladug@codeaurora.org>
Adds support for VC-1 decoder by adding the VC-1 Decoder
entry in vdec formats struct.
Change-Id: I4a5a278a93c252f4e3a16eb004d06d72dba6e491
Signed-off-by: Praneeth Paladugu <ppaladug@codeaurora.org>
Seeing spurious PMIC BSV interrupt while otg is in A host mode. Hence
ignore PMIC BSV interrupts in this cases.
CRs-Fixed: 373645
Change-Id: I99c13c22e2485f2a891bfb3dd7870794ca86296b
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
Per revised design decisions, cpu_is_msm8930() shall only
return true on 8930, and not on the 8627 variant. Modify
the cpu_is_xxx functions to reflect this change, and update
call sites accordingly.
Change-Id: I50b943f80c731717e6cd5d7fffb13aeec0f85a40
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
Devices attributes have lockdep keys and so they should exist in
the data section. Failure to do this results in lockdep turning
itself off and warnings such as:
BUG: key eeb0883c not in .data!
Fix this problem in the pm8xxx-adc driver by initializing the
keys with sysfs_attr_init().
Change-Id: Ie42f9a28c343e32ef36ca3570d63a7bb557dfe64
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Use SR[TXEMT] in addition to ISR[TX_READY] when determining
whether new data can be transmitted to work around a
condition where ISR[TX_READY] may not always give an
accurate indication of the state of the queue.
Change-Id: Ia3a590a485647a005c7c019660f11566208c2667
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
These ops are not referenced by any code. Remove them.
Change-Id: I092b0fbb47d1d95524683b73472c04152c07a63d
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
last_expired_ctxt_id was used briefly for per context timestamps and now
can be removed as it is no longer used.
Change-Id: I51d3947fe6da366824d1b947ae3448bee3518477
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
Proprietary chargers pull D+/- to specific voltages between 2.0-3.3V
(VLGC) for identification. The DM voltage may not exceed VLGC due
to pull-down resistor. Hence a proprietary charger is detected as
a Standard downstream port (SDP). Read line state to distinguish
between SDP and proprietary charger. The DP voltage would exceed
VLGC for proprietary chargers.
D- can be greater than VLGC when a low speed device is attached via
Accessory charger adapter (ACA-A). Hence mark the charger as ACA-A
if ID resistance is RID_A and D- > VLGC
CRs-Fixed: 368688
Change-Id: I3497efbe025abf150078a19d69254f75f5df5b2a
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
In case of CAMIF errors, notify the user so that it
can cleanup resources and exit gracefully.
Change-Id: Id6cea63ef47e1bd3881db7f61c6cc3cc3c9343b3
CRs-Fixed: 371688
Signed-off-by: Kiran Kumar H N <hurlisal@codeaurora.org>
The bms module is reused in multiple pmics. It is now unnecessary
to check for 8921 versions in the driver. As a result of this change
older 8921 versions are not supported.
CRs-Fixed: 372679
Change-Id: Ie9131d47ed08fa6fa39812c9e60be34cc6280e4c
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Add data aggregation support using RNDIS Multi Packet feature
to achieve better UDP Downlink throughput. Max 3 RNDIS Packets
aggregated into one RNDIS Packet with this implementation.
With this change, seeing UDP Downlink throughput increase
from 90 Mbps to above 100 Mbps when using Iperf and sending
data more than 100 Mbps.
CRs-Fixed: 352010
Change-Id: I7c353d21d60002b66c08181fd621f9ab8753cb0f
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
Signed-off-by: Rajkumar Raghupathy <raghup@codeaurora.org>
After completing a wakeup, trigger the TX worker to start sending
pending data.
Without the fix, the TX worker will wait until either other activity or
a power-down transmit before sending pending TX data.
Change-Id: Ica90b35d9a3169992db49ff493f783c27a2989da
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
During VPE/VFE initialization, pass the device pointer to
regulator_get() as per the expected usage of the API.
Change-Id: Ide33ff05814e11d5955a8ec7916ef595dceb0f84
Signed-off-by: Kiran Kumar H N <hurlisal@codeaurora.org>
Removed the ACK from the protocol when a sleep request is received when
already in the turning-off state to avoid an extra wakeup just to send
the ACK.
This case happens when both the local and remote sides transition to the
turning-off state and send a sleep request. Both sides will then
receive the sleep request at which point they can immediately transition
to the off side without having to perform a wakeup just to send the ACK.
Change-Id: I3fe4a82da34b68ef51ee9aa0c00507361b0717ed
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>