This reverts commit 152fc477d3 ("ARM: dts: msm: Add v4l2
rotator node to msm8996").
Smmu attachment failure is reported on v4l2 rotator in devsp.
Revert v4l2 rotator node back to mdss rotator node in devsp
until the smmu issue is resovled.
CRs-Fixed: 1025431
Change-Id: I25a9412c32ddb5d55379b9e96c91f246f6bd4aa9
Signed-off-by: Alan Kwong <akwong@codeaurora.org>
Add support for camera flash operation.
Add status property for csiphy, csid camera nodes.
CRs-Fixed: 1021009
Change-Id: Ifa62e4e4662d72904411ff4dda10a29a76962851
Signed-off-by: Viswanadha Raju Thotakura <viswanad@codeaurora.org>
It's possible thermal driver and governor notify that fmax is being
changed at the same time. In such case we can potentially skip updating
of CPU's capacity. Fix this by updating capacity always when limited
fmax is changed by same entity.
Meanwhile serialize sched_update_cpu_freq_min_max() with spinlock since
this function can be called by multiple drivers at the same time.
Change-Id: I3608cb09c30797bf858f434579fd07555546fb60
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
Add the device tree files necessary to support the MSMFALCON
SoC and the MSMFALCON Simulator platform.
Change-Id: Iabdb1c21757ad6dead50fdc4aa3b12077f8f840f
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
Enabled BTFM Features in performance defconfig by
default.
Change-Id: I9c007dededd88a7e8bc8c3226507a46046e96bc4
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
Enable QPNP_POWER_ON driver for msm-perf_defconfig so that the
input keys can be functional.
CRs-Fixed: 1011669
Change-Id: I9ae7a806a5b659a2c15fa86b37cd1075913095d5
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Time between mark_start of idle task and IRQ handler entry time is CPU
cycle counter stall period. Therefore it's inappropriate to include such
duration as part of sample period when we do frequency estimation.
Fix such suboptimality by replenishing idle task's CPU cycle counter
upon IRQ entry and using irqtime as time delta.
Change-Id: I274d5047a50565cfaaa2fb821ece21c8cf4c991d
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
CPU cycle counter won't increase when CPU or cluster is idle depending
on hardware. Thus using cycle counter in that period of time can
result in incorrect CPU frequency estimation. Use previously calculated
CPU frequency when CPU was idle.
Change-Id: I732b50c974a73c08038995900e008b4e16e9437b
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
Preserve cycle counter in rq in preparation for wait time accounting
while CPU idle fix.
Change-Id: I469263c90e12f39bb36bde5ed26298b7c1c77597
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
This change updates the macro definitions to
increase the range on the logs, events and messages.
Change-Id: I8410462b17c5741fb03239377fed18c5f6034b90
CRs-Fixed: 994733
Signed-off-by: Chris Lew <clew@codeaurora.org>
Due to a known PMIC HW bug, hard reset or PR swap may result in
the charger notifying a CC disconnect event in sink mode, in which
case the handler ignores it given these conditions. However, this
closely resembles the case of a non-PD capable source getting
physically disconnected as well. Consisdering the most probable
case of this happening is disconnecting from an SDP while hard
reset was just issued (and will fail), this workaround is currently
racy if repeated plugin/plugout is performed as the timeout to
detect failed hard reset takes a few seconds.
For now, until a HW fix is available, optimize this legacy case
by allowing the disconnect to go through if the detected charger
type is SDP. Also fix the SINK_WAIT_CAP_TIME timeout as it was
incorrectly multiplied by 3 during testing and was not removed.
This will significantly reduce the amount of time for max failed
hard reset attempts for non-PD && non-SDP cases and should decrease
the window for racing with an actual disconnect.
Change-Id: Ic57a369ed1e194ab512b4b86ce4d216df46b5f46
Signed-off-by: Jack Pham <jackp@codeaurora.org>
The user space clients sometimes open the device before the underlying
transport available which results in open error and cause multiple re-tries
from the clients. This leads to excessive logging of open error messages.
Register for link state notification and block the client open until link
available or user define timer expires.
CRs-Fixed: 1018542
Change-Id: I4e56982700f3444f96e1100c0ce272d36d3423a5
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
During parallel migration race conditions are seen in remote open
and local open ack function.
Edge based lock is introduced to avoid any race condition during
simultaneous migration. Edge lock is shared across multiple
transport of same edge and is stored in a global list.
CRs-Fixed: 1010920
Change-Id: I2b988d2a6112add06fa433c4b1deeec0b6e6bb58
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
Add support for gpio keys on msmcobalt CDP and MTP.
CDP and MTP use pmcobalt gpios 6, 7 and 8 for volume up,
camera snapshot and camera focus respectively. CDP
additionally supports home key through pmcobalt gpio 5.
Change-Id: I31f3ed15e8cf02046cfcc8d9c062522065bb022c
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
Use the correct bus governor for Venus VMEM.
Change-Id: I9abc6352732c189e90cefaa3eb4161ea6d103529
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
Update MPM interrupt mapping to bypass some of the interrupts as per the
HW specification.
Change-Id: Ib6f218989616b038adb7a001cbc6302924041aa1
Signed-off-by: Archana Sathyakumar <asathyak@codeaurora.org>
Adding pm_notify to allow the following:
1. Check if suspend is allowed in an earlier stage to prevent
starting the suspend procedure in case it is not allowed
2. Notify the platform driver on the suspend request
Change-Id: Iddacd9b54304b47263647942e1e6784eefb9a6d2
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Git-commit: e34dc6475a7b25d1aec5de8652a321672904c686
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
CRs-Fixed: 1015627
Signed-off-by: Maya Erez <merez@codeaurora.org>
In case we fail to map one of the TSO SKB fragments, we need to
clear all the mapped descriptors, from swhead to swhead+descs_used-1.
Change the desc index calculation to
i = (swhead + descs_used - 1) % vring->size;
to prevent unmpping of (swhead + descs_used) descriptor that wasn't
mapped.
Change-Id: I81b99522ada809fa375c6b6887f8ea0e6482fba3
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Git-commit: a1526f7eafa434f756579e2bc784b7605f96bf3e
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
CRs-Fixed: 1015627
Signed-off-by: Maya Erez <merez@codeaurora.org>
napi_synchronize is called before releasing the vring, with the
assumption that setting txdata->enabled to 0 will prevent handling
of this vring in the next scheduled napi.
To guarantee this assumption, a memory barrier is added after disabling
the txdata.
In addition, as the ctx is zeroed in wil_tx_complete after this
descriptor is handled (protected by wmb), ctx needs to be checked
before releasing this descriptor in wil_vring_free.
Change-Id: I7af20f1db39b7e4c5ac2956fc655f120eb61e002
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Git-commit: 34b8886e502a62d1355ccc0420044aa2749a24cd
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
CRs-Fixed: 1015627
Signed-off-by: Maya Erez <merez@codeaurora.org>
add memory barrier after allocating new rx descriptors, before
updating the hwtail.
This will guarantee that all writes to descriptors (shared memory)
are done before committing them to HW.
Change-Id: If7c91c31b490b0762d23df21db7c30652b0817d4
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Git-commit: ab6d7cc3eab4093caf91ba8b27590c4080d7d01c
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
CRs-Fixed: 1015627
Signed-off-by: Maya Erez <merez@codeaurora.org>
There are 2 possible race conditions, both are solved by addition of
memory barrier:
1. wil_tx_complete reads the swhead to determine if the vring is
empty. In case the swhead was updated before the descriptor update
was performed in __wil_tx_vring/__wil_tx_vring_tso, the completion
loop will not end and as the DU bit may still be set from a previous
run, this skb can be handled as completed before it was sent, which
will lead to double free of the same SKB.
2. __wil_tx_vring/__wil_tx_vring_tso calculate the number of available
descriptors according to the swtail. In case the swtail is updated
before memset of ctx to zero is completed, we can handle this
descriptor while later on ctx is zeroed.
Change-Id: Ia6584de897c366032251033aa8e03c54e9d899bb
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Git-commit: eb26cff148f5449972121e46e403f549d71f6f49
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
CRs-Fixed: 1015627
Signed-off-by: Maya Erez <merez@codeaurora.org>
Currently burst value is set to zero for superspeed in mtp driver.
MTP throughput can be improved by setting max burst value to non
zero value in superspeed mode. Hence set max burst value to two
for both IN and OUT bulk endpoints in superspeed mode.
Change-Id: Ib78b8fec5d1ab934f4d4ec80b7e008149707ce0f
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Convert print messages to IPC logging facilities. This
will allow for easier debugging from crash dumps as
well as from debugfs. The print calls are converted to
macros which also print to the console for flexibility.
Change-Id: I6238b0434936fcff562d7a049e5e9d13794f9cdc
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Some platforms might not support auto hibern8 even though the
controller exposes this capability. Add a quirk to disable
auto hibern8 for such platforms.
Change-Id: I4a027f89deddff4735df45da9cffbfb1849af5f4
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
This patch fixes the possible corruption of the
dci client entries log mask during deinit of dci
entries.
CRs-Fixed: 1021816
Change-Id: I7741eca6ac07cd4393fc373e796570066da7cce6
Signed-off-by: Manoj Prabhu B <bmanoj@codeaurora.org>
Make turbo voting threshold lower to 1000Mbps to account for CPE
use case.
Change-Id: I5d02d3df7b69e30243a0b44ddf36a894ad739d59
CRs-Fixed: 872263
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
QCOM UFS host controller v3.0.0 supports hw gating of clocks, use
the hw ctl clock variants of ufs clocks to enable that support.
Change-Id: I9597507419e59884c44429c8c34f7469fa5192cb
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
QCOM UFS host controller v3.0.0 supports running at much lower
frequencies that allow SVS2. Update the UFS clock supported
table with new min frequencies.
Change-Id: I11d941f239ccd1978089194fa269e143fc640d36
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
QCOM UFS host controller v3.0.0 supports SVS2 voltage scaling mode
that allows lowest power consumption in HS G1. The link must be put
in hibern8 state before configuring the PHY to enter SVS2 mode.
The voltage can be reduced after this to SVS2 level.
Make the necessary change to support this on the qcom ufs variant.
Change-Id: Iba2ebe38c4ec1422931f2a696d9e5ca01b11a987
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
Each ufs controller variant can work with various gear speeds that
can be supported at a low voltage corner. Add an ops function to
query the gear supported to scale down.
Also make the hibern8 entry/exit function non static as the variant
drivers might need to call hibern8 entry/exit when scaling down to
a lower gear.
Change-Id: I50008a892c8c21a4a3361998d76a2f8cbc2995bb
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
phy-qcom-ufs-qmp-v3 supports SVS2 voltage scaling mode that
allows lowest power consumption in HS G1. The PHY must be put
in hibern8 state before configuring the PHY to enter SVS2 mode.
The voltage can be reduced after this to SVS2 level.
This change exposes an API that allows the UFS driver to
configure the PHY to enter SVS2 mode.
Change-Id: I2ef01d98603840289c436e14bf3df54a2ab9198b
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
QCOM UFS controller version 3.0.0 supports the auto hibern8
feature as defined by the UFS HCI v2.0 specification.
Make necessary changes to enable this during host controller
initialization.
Change-Id: I5a048629dade92fe79631ba30d3b3e280a77d4e6
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
UFS HCI v2.0 specification adds support for auto hibern8.
Add support to enable this in the ufs host controller driver.
Change-Id: I57e5be8eae4b2cf70a2a9d9c81c9a54a24e03e71
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
Currently the pmic votables need a device to be created.
Votables should be able to work on device less code. Remove
the need for device and instead use a void pointer to be passed
back to the callback.
CRs-Fixed: 1018090
Change-Id: If5dafbcc0d88596332b794ad5b6fdc1f9ff98a45
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
The default value was introduced to prevent crashes on the clients
where it couldn't handle situations when there were no voters.
The default value led to many complicated scenarios in the votable
implementation.
Remove the concept of default value and return error when
there are no votes. Update all the clients to handle error values
from votables. Also invoke the callback to inform about no active
voters.
CRs-Fixed: 1018090
Change-Id: I81f5974f81a697f3698bc58df1d3ed59fa2579a7
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Currently the pmic-voter api assumes that the clients are represented
as unique integers. Using strings instead of integers adds flexibility.
- It enables the votable to be shared across multiple drivers without
having a common client enum
- Debug prints become more useful
While at it
- remove the use of num_clients in the apis. All of them default to
NUM_CLIENTS.
- Create a list of all the votables, this allows for searching for a
specific votable.
- Error if a votable is already created with the same name earlier.
- Add debug prints about current clients and effective results
- Remove passing in last_client and last_client_id in the callback. These
parameters go unused in all the usecases.
- Since clients are assigned sequentially and that they cannot
unregister from a votable (clients can only disable their votes, but
they cannot remove themselves), a null string in the client string
array means there are no more clients. Use this to speed up result
calculation by stopping at the id with a null string.
- Refactor the vote() implementation. Currently the SET_ANY case flows
differently than MIN or MAX, make them uniform.
- Create an api to call the callback without casting new votes.
CRs-Fixed: 1018090
Change-Id: I8e2bc3366ec12e8485e4be86ee56ba5e4d113c3c
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Add a new gcc_gpu_iref_clk that the graphics driver can control
as needed. The default state of the clock is ON; so having this
control will mean saving current.
CRs-Fixed: 1024948
Change-Id: I562bb546f49b1605f20fb7d705f40584d190230b
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
Update the LMH interrupt information for msmcobalt. This interrupt will
be generated when LMH hardware does mitigation.
Change-Id: If6fdebb36d7108b2ac9b5f3c8a787d305505545c
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
LMH DCVSh driver receives interrupt from hardware whenever there is a
new mitigation frequency decision is made in hardware.
Add ftrace event to print the hardware mitigation frequency value from
driver.
Change-Id: Ib357ee3c3a461613bfd1268ec8f98973c2982c10
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
msmcobalt only has two AD hardware block, this change corrects
the offsets in the dts file.
CRs-Fixed: 1023377
Change-Id: Ifa797703da0ac846167651c7ed03a6710ba41867
Signed-off-by: Ping Li <pingli@codeaurora.org>
Enable HDMI RX for 8996, otherwise soundcard
will not get registered for the flavors which
supports HDMI.
CRs-Fixed: 1023892
Change-Id: I0d2442c7b3d156ad919626a6015f0fbbf2116c3f
Signed-off-by: Yeleswarapu Nagaradhesh <nagaradh@codeaurora.org>
In multi-rect configuration both the pipes should fetch or should
be in solidfill configuration. The change ensures that when switching
between multi-rect to normal configuration with solid fill
enable/disable the multi-rect mode properly.
CRs-Fixed:1025380
Change-Id: I02fc72583fcd9bc27156ce717b52ef17e16313d5
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
Updating the hw_params before setting initial position
for VCM type actuator.
CRs-Fixed: 987939
Change-Id: I1b1f1801eb0578644b2e954a3a3ade17b3f2a1fd
Signed-off-by: Tanvi Aggarwal <tanvia@codeaurora.org>
Hanjun Guo has reported that a CMA stress test causes broken accounting of
CMA and free pages:
> Before the test, I got:
> -bash-4.3# cat /proc/meminfo | grep Cma
> CmaTotal: 204800 kB
> CmaFree: 195044 kB
>
>
> After running the test:
> -bash-4.3# cat /proc/meminfo | grep Cma
> CmaTotal: 204800 kB
> CmaFree: 6602584 kB
>
> So the freed CMA memory is more than total..
>
> Also the the MemFree is more than mem total:
>
> -bash-4.3# cat /proc/meminfo
> MemTotal: 16342016 kB
> MemFree: 22367268 kB
> MemAvailable: 22370528 kB
Laura Abbott has confirmed the issue and suspected the freepage accounting
rewrite around 3.18/4.0 by Joonsoo Kim. Joonsoo had a theory that this is
caused by unexpected merging between MIGRATE_ISOLATE and MIGRATE_CMA
pageblocks:
> CMA isolates MAX_ORDER aligned blocks, but, during the process,
> partialy isolated block exists. If MAX_ORDER is 11 and
> pageblock_order is 9, two pageblocks make up MAX_ORDER
> aligned block and I can think following scenario because pageblock
> (un)isolation would be done one by one.
>
> (each character means one pageblock. 'C', 'I' means MIGRATE_CMA,
> MIGRATE_ISOLATE, respectively.
>
> CC -> IC -> II (Isolation)
> II -> CI -> CC (Un-isolation)
>
> If some pages are freed at this intermediate state such as IC or CI,
> that page could be merged to the other page that is resident on
> different type of pageblock and it will cause wrong freepage count.
This was supposed to be prevented by CMA operating on MAX_ORDER blocks, but
since it doesn't hold the zone->lock between pageblocks, a race window does
exist.
It's also likely that unexpected merging can occur between MIGRATE_ISOLATE
and non-CMA pageblocks. This should be prevented in __free_one_page() since
commit 3c605096d3 ("mm/page_alloc: restrict max order of merging on isolated
pageblock"). However, we only check the migratetype of the pageblock where
buddy merging has been initiated, not the migratetype of the buddy pageblock
(or group of pageblocks) which can be MIGRATE_ISOLATE.
Joonsoo has suggested checking for buddy migratetype as part of
page_is_buddy(), but that would add extra checks in allocator hotpath and
bloat-o-meter has shown significant code bloat (the function is inline).
This patch reduces the bloat at some expense of more complicated code. The
buddy-merging while-loop in __free_one_page() is initially bounded to
pageblock_border and without any migratetype checks. The checks are placed
outside, bumping the max_order if merging is allowed, and returning to the
while-loop with a statement which can't be possibly considered harmful.
This fixes the accounting bug and also removes the arguably weird state in the
original commit 3c605096d3 where buddies could be left unmerged.
Fixes: 3c605096d3 ("mm/page_alloc: restrict max order of merging on isolated pageblock")
Link: https://lkml.org/lkml/2016/3/2/280
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Reported-by: Hanjun Guo <guohanjun@huawei.com>
Tested-by: Hanjun Guo <guohanjun@huawei.com>
Acked-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Debugged-by: Laura Abbott <labbott@redhat.com>
Debugged-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: "Kirill A. Shutemov" <kirill@shutemov.name>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Cc: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Cc: Michal Nazarewicz <mina86@mina86.com>
Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Cc: <stable@vger.kernel.org> [3.18+]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Change-Id: I768a9c4886aa3fe2e827aba682f67bac2dba6f71
Git-commit: d9dddbf556674bf125ecd925b24e43a5cf2a568a
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
[vinemenon@codeaurora.org: fix trivial merge conflicts]
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
Signed-off-by: Shiraz Hashim <shashim@codeaurora.org>
Remove qos-bypass flags in fab definitions to enable QoS configuration
to allow proper priority of master ports on buses across SoC,
add relevant clock handles to allow access to config registers.
CRs-Fixed: 1006333
Change-Id: If72eed62e28ccaafa2e0fb6186ec88571b4e657a
Signed-off-by: David Dai <daidavid1@codeaurora.org>