Set the correct offsets of the MISR for command mode
interfaces in 8996.
CRs-Fixed: 964076
Change-Id: I90c7fa1ff144ae547cc0537421211a73051f1036
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
Cannot switch from memory device logging to USB Mode after
the first switch because the first MD state is stored.
This fix resets the MD state by closing the session when
switching to USB Mode from MD mode.
Change-Id: I9addf0c7d8f1c058485349e196c1dcaa54b92f3a
CRs-Fixed: 972027
Signed-off-by: Chris Lew <clew@codeaurora.org>
Correct the size of the register block.
CRs-Fixed: 980025
Change-Id: I6a672bf4f46f6ba453e4382c41cefd1630c0ac1e
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
Increase the scm retry timeout to 2 seconds and add a warning
message if the call takes longer than 1 second.
CRs-Fixed: 975433
Change-Id: I7719df41e491c9a8c80b8547de14bc8c71bf7c8d
Signed-off-by: Runmin Wang <runminw@codeaurora.org>
Initialize tdm group reference count on tdm group q6 probe
instead of tdm per dai probe to avoid duplicated init calls.
CRs-fixed: 975767
Change-Id: I88bc791fc2bfbb60f1cf6b2faeb6de0c865539c0
Signed-off-by: Derek Chen <chenche@codeaurora.org>
Add mixer controls to adjust wcd9335 codec lineout PA
volume adjustment. This gives flexibility for user
to modify volume based on use-case.
CRs-fixed: 969512
Change-Id: I562f17363d7d38caece358a50d1e3f654d87491f
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
Initialize PMCOBALT regulators SMPS 7 and LDO 5 to use HW_EN0 pin
control to force high power mode. Whenever HW_EN0 is driven high these
regulators will be forced into high power mode.
HW_EN0 is driven high whenever WLAN is transmitting or receiving, thereby
reducing power when it is not active.
Initialize PMCOBALT regulators SMPS 3 and SMPS 5 to use HW_EN2 pin
control to force high power mode. Whenever HW_EN2 is driven high these
regulators will be forced into high power mode.
Add pin control regulator devices for PMCOBALT regulators LDO 7, LDO
17, and LDO 25. When any of these pin control regulators are enabled by
software their output will be physically enabled whenever HW_EN2 is driven
high. When disabled HW_EN2 is ignored.
HW_EN2 is driven high whenever BT is transmitting or receiving, thereby
reducing power when it is not active.
CRs-Fixed: 971169
Change-Id: I819299fefde72400a18fb8503aedd1a1f32bfe7b
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
ARB occurs upon DCP removal due to bit INPUT_MISSING_POLLER_EN_BIT
cleared in kernel charger driver. Enable input missing poller bit
to avoid ARB.
CRs-Fixed: 965458
Change-Id: I3597327d8607b61582d124318e06da701758e34b
Signed-off-by: Harry Yang <harryy@codeaurora.org>
RCO calibration codec registers are read only and they can
be modified at any time during codec operation. Mark them as
volatile so that reads to these registers always happen from
hardware instead of cache.
CRs-Fixed: 974785
Change-Id: I1fb66ca19d0889aa7e21f433f8722af7b527705c
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
Expose pingpong split info to userspace via sysfs. This info
can be used to do ROI alignment for Partial update use cases.
Change-Id: Ifb165944b1725f4299e34068b67926785def032c
Signed-off-by: Vishnuvardhan Prodduturi <vproddut@codeaurora.org>
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
PGC block of mdss supports 8/10 bit rounding options.
Default setting is 10 bit, userspace module can enable 8 bit rounding by
updating the flag.
Change-Id: Ide66c3854e333a0a1ce48b15d82760f37a05cc10
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
solid fill pipe b/w vote is not reset properly. This causes
a mismatch wrt the bw calculation in sdm and results in a bw
validation check failure.
Change-Id: Ie4f36c376efe3eb405cf4aca6f2ed79ee9849950
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
The retire timeline counter in command mode is used
by vsync worker queue, validate/commit ioctl thread
and overlay off. However, this counter is not protected
with any locking mechanism and each thread updates the
value. Race condition with updated value between two
thread can lead to invalid vsync operation or list
corruption. This change protects the counter with
mutex lock to avoid all such race conditions.
Change-Id: Ib3c3f6c839fc82c6d31fa28066df1f23dab19746
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
Add support to configure mode_option, framebuffer size and bpp
from kernel command line.
Change-Id: I2f08ed3851db4008569f1c77a195e46931674919
Signed-off-by: Shashank Mittal <mittals@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
diagfwd_socket.c is using few IPC router APIs. diagfwd_socket.c is
showing compilation error due to CONFIG_IPC_ROUTER is not enabled. Fix
this issue by adding missing APIs as part of !ifdef CONFIG_IPC_ROUTER.
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
compilation error seen with redefinition of usb_bam_alloc_fifos
and usb_bam_free_fifos APIs. Fix this issue by adding proper
check, removing usb_bam.h as part of f_qdss.h and fixing makefile.
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
This change fixes USB and related different PHYs base address,
and interrupt. It also adds USB DBM and USB BAM related device
node and required resources for USB QDSS BAM functionality.
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
There is a deadlock scenario due to the circular dependency of CPU's
rq->lock and kswapd's waitqueue lock.
(1) when kswapd is woken up, try_to_wake_up() is called with it's
waitqueue lock held. It's previous CPU is offline, so it is woken
up on a different CPU. We try to acquire the offline CPU's rq->lock
in either cpufreq change callback or fixup_busy_time()
(2) At the same time, the offline CPU is coming online and init_idle()
is called from __cpu_up(). init_idle() calls __sched_fork() with
rq->lock held. A debug object allocation in hrtimer_init() called
from __sched_fork() is trying to wakeup the kswapd and attempts to
take the waitqueue lock held in the (1) path.
Task specific initialization is done in __sched_fork() and rq->lock
is not held when it is called for other tasks. The same holds true for
the idle task as well. __sched_fork() for the idle task is called only
when the CPU is not active.
Acquire the rq->lock after calling __sched_fork() in init_idle()
to fix this deadlock.
CRs-Fixed: 965873
Change-Id: Ib8a265835c29861dba571c9b2a6b7e75b5cb43ee
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
[satyap: trivial merge conflicts resolution and omitted changes for QHMP]
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
Enable configurations needed for the operation of data specific
features such as IPv4 and IPv6 tethering and packet filtering
using QoS. Enable ESP match target in iptables to provide the ability
to match packets based on the SPI (Security Parameters Index) value
in the ESP (Encapsulating Security Payload) header. Enable the
rmnet_data driver for MAP functionality.
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
This snapshot is taken as of msm-3.18 commit
d580948 (Merge "msm: ipa: fix race condition when teardown pipe")
Signed-off-by: Sungjun Park <sjpark@codeaurora.org>
IPC_LOGGING allows the debug logging for IPC Drivers and
QPNP_SMBCHARGER depends on EXTCON.
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
Keep NR_CPUSs restricted to 16 compared to 64, since
some of the schedular tracer code has compile time
checks for NR_CPUS > 32.
Other options update in this defconfig is based on the
auto-update.
Change-Id: I91e28714e3ee79a06eb5994ad8fc14f0b58a1e43
Signed-off-by: Trilok Soni <tsoni@codeaurora.org>
It is found thats UFS device may take longer than 100ms to respond to
query requests and in this case we might run into following scenario:
1. UFS host SW sends a query request to UFS device to read an attribute
value. SW uses tag #31 for this purpose.
2. UFS host SW waits for 100ms to get the query response (and doorbell
to be cleared by UFS host HW).
3. UFS device doesn't respond back within 100ms hence UFS host SW times
out waiting for the query response.
4. UFS host SW clears the tag#31 from UTRLCLR register.
5. UFS host SW waits until UFS host HW to clear tag#31 from the doorbell
register.
6. UFS host SW retries the same query request on same tag#31 (sends a query
request to device to read an attribute value).
7. UFS host HW gets the query response from the device but this was
intended as a query response for the 1st query request sent (step-1).
8. Now UFS device sends another query response to host (for query request
sent @step-6).
Now there are 2 issues that could happen with above scenario:
1. UFS device should have actually responded back with only one query
response but it is found that device may respond back with 2 query
responses.
2. If UFS device responds back with 2 resposes on same tag, host HW/SW
behaviour isn't predictable.
To avoid running into above scenario, we would basically allow device
to take longer (upto 1.5 seconds) for query response.
CRs-Fixed: 966573
Change-Id: I9885cac614eff011b617064edcd31d0e8daddd45
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Add snapshot for Video driver source for MSM targets. The code is
migrated from msm-3.18 kernel at the below commit level -
d5809484bb1bf5864dad2f081b0145224762963a.
Signed-off-by: Arun Menon <avmenon@codeaurora.org>
This change adds required QMP PHY related initialization from devicetree
instead of using getting revision based sequence from QMP PHY driver.
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
This change removes unused devicetree property with QMP PHY
as now all QMP PHY related initialization information needs to
be provided through devicetree.
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
This change updates USB QMP PHY related registers' offset from
devicetree for MSM8996 and cobalt platforms.
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
This change removes QMP PHY revision based phy_reg_offset from
QMP PHY driver. It makes mandatory to have required QMP PHY
related register offset through devicetree. It also removes
different revision ID related register offset usage and
requirement.
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
This change adds missing terminate entry with QMP PHY init sequence
which is required to know end of programming sequence.
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
This change removes QMP PHY revision based initialization sequence
from QMP PHY driver. It also makes mandatory to get this sequence
from devicetree except if qcom,emulation is set.
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
The core control module requires tracing capability. Export
a function that will allow new events to be added in an
extensible fashion without a compile-time dependency.
Change-Id: I807d1ec4a104d8289441512b61e5e26df291525b
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
The efficiency of a CPU can vary across SoCs depending on the cache size,
bus interconnect frequencies etc. Allow specifying this from the device
tree. This value overrides the default values hardcoded in the efficiency
table.
Change-Id: Ie9ba69e11317e6eb6462630226355747d1def646
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
On a HMP system, scheduler needs to know efficiency factor
(instructions-per-cycle) for various cpus. This is so that scheduler
can estimate bandwidth consumption of tasks on each cpu, based on
their efficiency factor.
This patch defines arch_get_cpu_efficiency() API in ARM64
architecture. It depends on hard-coded "efficiency" factor for
various cpu types (available in 'table_efficiency' data structure) and
device-tree providing information on cpu-type for every cpu.
Change-Id: Ied43ead650ab85b63c232bec14dde500cbcc0f7a
Signed-off-by: Srivatsa Vaddagiri <vatsa@codeaurora.org>
[joonwoop@codeaurora.org: s/SCHED_POWER/SCHED_CAPACITY/.]
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
In heterogeneous systems like big.LITTLE systems the scheduler will be
able to make better use of the available cores if we provide power numbers
to it indicating their relative performance. Do this by parsing the CPU
nodes in the DT.
This code currently has no effect as no information on the relative
performance of the cores is provided.
Change-Id: If025e959b523afa37e75d4c58578a7c5fea7e0b0
Signed-off-by: Mark Brown <broonie@linaro.org>
Patch-mainline: linux-arm-kernel 5/2/2014, 20:38
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
[joonwoop@codeaurora.org: s/SCHED_POWER/SCHED_CAPACITY/.
fixed a trival conflict in init_cpu_topology().]
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
Add snapshot for msm_media_info video header to
uapi folder. The header file is taken from msm-3.18
kernel at commit - d580948 .
Signed-off-by: Arun Menon <avmenon@codeaurora.org>
This property is no longer used in 4.4 kernel, hence remove it.
Change-Id: I82dae3d9c230c9e6d71e4b286d5eba684d1511f8
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
In commit 48924e2fe107 ("dwc3: Reset USB controller/PHY after psy
connect indication at bootup") the controller initialization path
was removed from dwc3_msm_probe() and is deferred to when actually
needed, which is when beginning peripheral or host mode. This was
to optimize for the HVDCP charger already-connected case in which
case we want to avoid performing controller initialization which
can disrupt D+/D- linestate.
As part of that change, the OTG_STATE_UNDEFINED state was made
to be the entry point for starting controller initialization.
However, apart from that, the handling is identical to B_IDLE_STATE,
and therefore could be consolidated. And now that charger driver
only notifies us when SDP or CDP types, but not when DCP/HVDCP are
connected, the code can be simplified by removing the duplicate code
between dwc3_initialize() and dwc3_msm_resume().
Change-Id: Ife749c864284864098bcbcbdbda096d05397c60e
Signed-off-by: Jack Pham <jackp@codeaurora.org>
dwc3_init_sm() uses a static boolean variable which does not
play nicely when multiple instances are in use. For instance
if one controller is configured in host-only mode, it would
set the sm_initialized flag and can force the second controller
to also see ID=0 and enter host mode even if it is a peripheral.
The false ID=0 is actually caused by the init sequence never
actually setting the initial inputs bit, so the state machine
simply sees it as unset and proceeds to the A_IDLE case. Fix this
by setting it to 1 to match the id_state=FLOAT during probe().
Furthermore, there is no longer any use case for the vbus_init
completion since the state machine should only be entered upon
event changes anyway. So removing that can allow us to get rid
of dwc3_init_sm() entirely. Also ensure that sm_work is
unconditionally flushed before processing the initial events.
CRs-Fixed: 974882
Change-Id: I48e361a622bffa62ab7fa4c8d2e6719e66b90076
Signed-off-by: Jack Pham <jackp@codeaurora.org>
On MSM8996 the PMI8998 charger requires the USB D+/D- to
be in floating state prior to performing charger detection.
Control of this is exposed by the QUSB PHY node and is
referenced by the charger as the dpdm-supply regulator.
Signed-off-by: Jack Pham <jackp@codeaurora.org>
The primary USB device now requires an extcon reference
for cable connection notification. On MTP & CDP targets
this is provided by the PMI8994 charger device.
Signed-off-by: Jack Pham <jackp@codeaurora.org>
The USB PHY no longer exports DP/DM control via power_supply.
Instead, use the regulator it exposes to replace the DPF_DMF
with regulator_enable() and DPR_DMR with regulator_disable().
All other operations (e.g. pulsing) are no-ops for now until
suitable replacements are available.
Signed-off-by: Jack Pham <jackp@codeaurora.org>
The USB power_supply object should be maintained by the
charger driver. Since it is now removed from the USB
controller driver, create and register it here. Many
of the calls to set/get_property can be simplified since
there are equivalent state variables we have access to.
PROP_OTG can be removed entirely since that is now handled
by emitting an EXTCON_USB_HOST notification.
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Allow charger to expose an extcon device which can emit
notification for USB and USB-HOST cable connection states.
The driver can correspondingly register interest in being
notified of these cable connection statuses.
This is intended to replace the power_supply_set_present()
and power_supply_set_usb_otg() mechanisms currently used.
Change-Id: I6c7cf971f59ac3f3075f5c8f13786306729f25a8
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Now that we use extcon for USB and USB_HOST cable connection
notification, it is no longer required to provide the usb
power_supply object in order to receive set property
notifications. Going forward the usb_psy will be maintained
by the charger driver(s) instead.
Since supply type is now also hidden from this driver (i.e.
EXTCON_USB should only be emitted in the case of SDP or CDP)
handling of dedicated charger types can also be removed which
simplifies the code a bit.
Signed-off-by: Jack Pham <jackp@codeaurora.org>