The scaling down sequence requires the clock to be set
after selecting the corresponding bus-speed mode in the
controller.
The scaling up to HS400 requires the timing and clock to
be set to legacy.
Without the above configuration, bus-width switch fails,
further leading to CRC errors.
Change-Id: If502f28e19924264dfb99d76f6881d3167f56a05
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
Signed-off-by: Pavan Anamula <pavana@codeaurora.org>
For v8/arm64 platforms the number of address-cells can be 2.
If the same device tree is used on 32-bit platforms,it is
currently reading only one cell of 32-bits.
Fix this by reading both cells for getting the hwid.
Change-Id: Id281b6b8ac3c9312848c39e11019284f970caced
Signed-off-by: Srinivas Ramana <sramana@codeaurora.org>
User space can send the commit message with the dest scaler
structure populated and dest scaler count as 0, this would
cause null pointer access, this change adds validation for both
the fields.
Change-Id: I7a4ad3188f7a19427c096a596a502debdc2aac55
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
Some cases were reported on 3.18 where atomic unmovable allocations
of order 2 fails, but kswapd does not wakeup. And in such cases it
was seen that, when zone_watermark_ok check is performed to decide
whether to wake up kswapd, there were lot of CMA pages of order 2 and
above. This makes the watermark check succeed resulting in kswapd not
being woken up. But since these atomic unmovable allocations can't come
from CMA region, further atomic allocations keeps failing, without
kswapd trying to reclaim. Usually concurrent movable allocations result
in reclaim and improves the situtation, but the case reported was from
a network test which was resulting in only atomic skb allocations being
attempted. On 3.18 this was fixed by adding a cma free page counter and
accouting the cma free pages properly in watermark calculations.
Later this issue was indirectly fixed by the commit "mm, page_alloc:
only enforce watermarks for order-0 allocations".
But the commit "mm: add cma pcp list" brought the problem back because
it includes MIGRATE_CMA within MIGRATE_PCPTYPES, and thus watermark
check erroneously returns success for !ALLOC_CMA by finding free pages
in cma free list.
Change-Id: Id0e48b5c2f9deea93c5875c10d5ec72bd360df5f
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
The GPIO to control the gound/mic swap switch is now on the Apps
processor. Create new entirees in pinctrl device tree to enable
headsets with swapped ground/mic poles.
CRs-fixed: 1019254
Change-Id: Ie57950e0fb979807ef95cf21046c97617e286ed0
Signed-off-by: Stephen Oglesby <soglesby@codeaurora.org>
Switch to swap ground and mic headset poles is controlled by a
GPIO on the Apps processor instead of the PMIC, and therefore
software logic must change to use pinctrl APIs
CRs-fixed: 1019254
Change-Id: Ibccddc82b18614ddbe6ef9c9720b3de1ce00163e
Signed-off-by: Stephen Oglesby <soglesby@codeaurora.org>
Roothub's (udev->dev) can be asynchronously suspended due to
power.async_suspend is set to true i.e. at time of system suspend and
resume, these devices' (usb1 and usb2) kobject count is decremented
and incremented respectively. hcd_release() API expects that shared_hcd
is being released first before hcd. Due to additional reference count
at time of system resume, it results into hcd_release() is called
first with hcd (primary) and then shared_hcd. With this,
usb_hcd_is_primary_hcd() API is returning true for both hcd and
shared_hcd which results into double free of bandwidth_mutex. Fix this
issue by identifying hcd to release bandwidth_mutex without depending
on which order hcd_release() is called with hcd and share_hcd.
CRs-Fixed: 955531
Change-Id: I6bfcfd54525fa6472bd848d4c112fff0c9462355
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
Make sure the card is present before enabling/disabling clock scaling,
to prevent NULL pointer access.
Change-Id: I1d683c4202ce34edeb6cb36d9713e226bb6f43d7
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
The commit '6e2df8c0e' incorrectly sets this capability.
This needs to be set only if the host is capable of disabling
both vcc and vccq. For SDHCI MSM host controllers only vcc
is disabled during suspend. Hence, remove this capability
for MSM hosts.
Change-Id: I69f9dacaa042e9f9a0bc4ed886f97c5c4a3b9791
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
In wcd9330 driver, external clk enable callback function
is passed with argument as true always, instead of passing
the arguments from caller. This is leading to mclk users
count to increase without check.
CRs-fixed: 1013573
Change-Id: I113657c91dd5eb00791535dc78b7cdad1db5c4aa
Signed-off-by: Viraja Kommaraju <virajak@codeaurora.org>
If long button is pressed to end the voice call, the button
click suppression block within wcd9335 hardware does not
release IN2_P causing TX mute for the next voice call session.
Avoid TX mute by force release IN2_P during every voice call
start.
CRs-fixed: 1013280
Change-Id: I5af41bef6db6af14d53018caef1f7fd9b00fc136
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
Currently MTP driver is resetting string id during unbind, when
cable is disconnected. Due to this, composite driver might run out
of string ids, when it tries to allocate string id during next
composition switch to MTP. This results in composition switch failure
when MTP is selected and eventually causing USB enumeration failure.
Fix this by not resetting string id and allocate it once only.
Change-Id: Ieacdc8dd76bc45638002eb749ff87aa95f496fa3
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
If cable is disconnected while send_file work is in progress,
Endpoints will be disabled and state will be marked as OFFLINE.
As a part of endpoint disable pending requests will be retire out
with -ECONNRESET error. Due to this we will modify the device state
as ERROR in completion callback. If the state is not offline then
we will mark the device state to ready in send_file_work. This results
in mtp driver to not returning any error for next mtp_write operation
and mtp release will not be called.
Hence fix this issue by adding a proper check in completions to not
moving device state to ERROR in case of disconnect.
Change-Id: Idb4e075c89bdf94790a321bc464d30eba546eeaa
Signed-off-by: ChandanaKishori Chiluveru <cchilu@codeaurora.org>
The existing code shows the phone icon in 'My Computer' of windows host,
for PTP composition.
Create a new Extended Configuration Descriptor for PTP composition and
update the compatibleID to display a camera icon for PTP composition.
Change-Id: If286c5b80874a95be0b5ecc533d0e5c7a14f39d3
Signed-off-by: Azhar Shaikh <azhars@codeaurora.org>
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
This change captures time taken by each vfs_read() and vfs_write() call
made from USB MTP gadget driver where data size is equal to USB request
buffer size. It provides debugfs entry to get this information for 100
such call and resetting the same.
How-To use:
To get stats:
cat /sys/kernel/debug/usb_mtp/status
To reset stats:
echo 0 > /sys/kernel/debug/usb_mtp/status
Change-Id: I252e830568704e9e557660c1ae0f7597823e4b17
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
MTP usb device node created as a part of mtp function init call.
Userspace can read/write to MTP device using this node. If MTP is
not enabled in the composition and trying to read mtp_usb dev node
from the userspace leading to null pointer access in mtp_read.
Do not access ep OUT maxpacket size in mtp_read. First block on mtp_read
until the state become online which doesn't wakeup from the thread and
expecting for the read completion or state change which occurs as
a part of set_alt.
Change-Id: Icbee5fe7ae2c02b2bca185a0dc7587eb4940058a
Signed-off-by: ChandanaKishori Chiluveru <cchilu@codeaurora.org>
Signed-off-by: Azhar Shaikh <azhars@codeaurora.org>
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
32-bit userspace calling into 64-bit kernel
cause different ioctl codes to get generated.
The different ioctl code gets generated
because sizeof is used on mtp and accessory
structures which is different for 32/64
compilation. Because of this, 64-bit kernel
can never execute the right ioctl command.
Implement compat_ioctl to handle such
execution environment.
Change-Id: I26cc10986e28a28eab6f3c65f28f4d2b808112d9
Signed-off-by: Sujeet Kumar <ksujeet@codeaurora.org>
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
If cable is disconnected while receive_file work is in progress,
there is a case where mtp driver returns -ECANCELLED instead of
-EIO. This results in mtp server thread not getting disconnect
notification and mtp release will not be called. Due to this, mtp
server will not start mtp connection after next USB connection.
Change-Id: I909bebe0d22c19329cebb0a4a76424e08c82328c
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Current driver code doesn't handle the memory allocation failure
correctly and ends up leaking memory and trying to free
unallocated one.
Change-Id: I7e3527b7e08ccfe566d85e3009d8a015d8daa707
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Error handling check added in probe function and
memory cleanup in remove function.
Change-Id: Ic8f02dcc89e716ec88b711496d1e43754b95968d
Signed-off-by: Gaurav Singhal <gsinghal@codeaurora.org>
In vfe 48 version the stats write masters have to be enabled
in addition to enabling the stats module. Add code to do this.
Also, the stop of write master was not programmed correctly, fix
this.
CRs-Fixed: 999619
Change-Id: Ic5b38b038508802b0b5779dc5d54ec6772f24b65
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Add a new voting path to IPA bus scaling from master CPU
to slave IPA_CFG. This is needed in order to achieve peak
throughput on SW bridge path.
CRs-Fixed: 983795
Change-Id: I25a00441f91087a370764b451ecc73a49a75b0a6
Acked-by: Ady Abraham <adya@qti.qualcomm.com>
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
Comments for ufshcd_quirk_tune_host_pa_tactivate() function doesn't
match the purpose of it. This change fixes the comments to describe
what function is actually doing.
Change-Id: I462a750aa6ee69f588b4bbcf5cb030f9e7292951
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Add napi framework to use napi API's to poll
embedded data from IPA HW.
Change-Id: Icb6ec9d060ca4fb02e95c1e98bded89422bb1fff
CRs-Fixed: 1002026
Signed-off-by: Sunil Paidimarri <hisunil@codeaurora.org>
Support using 7 bits in the SOFT_RB_SPARE PON register if the
PON peripheral is GEN2, otherwise use only 6 bits. This allows
compatibility with bootloader code on targets with older PMICs
where 7 bits for restart reasons are not necessary.
Change-Id: Ibf7fc53d3ff7084b252a44c44e3ce29326659787
CRs-Fixed: 1023239
Signed-off-by: Osvaldo Banuelos <osvaldob@codeaurora.org>
There is a race condition between setting PD_ACTIVE = 0 and when losing CC.
If PD_ACTIVE is not set to 0 by the time the TYPE_C interrupt fires on
disconnect then the POWER_SUPPLY_TYPE will not be set to UNKNOWN.
Instead of relying on PD_ACTIVE being set to 0 before the TYPE_C interrupt
fires, just update the type upon PD_ACTIVE being set.
CRs-Fixed: 1017798
Change-Id: Icd62b9d98d5763d209c7de897653f19f8031e236
Signed-off-by: Harry Yang <harryy@codeaurora.org>
When vfe is shutdown vote the bandwidth to 0 otherwise the
higher bandwidth will leak power.
Change-Id: I69e1570fe2bdb2e0b5bc14eb2dc158fe504ce921
CRs-Fixed: 999619
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
ICE 3.0 crypto sequences were changed, CTRL_INFO register
no longer exists and doesn't need to be configured. The configuration
is done via utrd.
Change-Id: I5d69436ec59476fc5cd427458d79f8c99266f243
Signed-off-by: Andrey Markovytch <andreym@codeaurora.org>
In case of time penalty coming from TZ side when the wrong password
is entered too many times, there should be sleep between the scm calls
to give other HLOS tasks opportunity to run. Otherwise starvation may
occur.
Change-Id: I345a9b6c82fb5e591d8bdcf48afed48ccaafddc3
Signed-off-by: Andrey Markovytch <andreym@codeaurora.org>
Get deep color support information from sink's EDID (Extended Data
Identification Data). Enable deep color output in hdmi transmitter
if the sink supports RGB 30bpp output format.
CRs-Fixed: 1022772
Change-Id: If65ac051253b4e51f6af5cd60f98eaf908b3bcfd
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
Add the HDMI Core's device node and its regulators, GPIOs, pin
control and other related data to device tree.
Change-Id: I4373fc9be34d7f49059159256cfd6dca045ff39f
CRs-Fixed: 1022772
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
The HDMI RCGs exported by the MMSS clock controller (MMSS-CC)
can be sourced out of the HDMI PLL which is outside the MMSS-CC.
Set up these external clock sources to point to the HDMI PLL clocks.
CRs-Fixed: 1022772
Change-Id: Ief169f5c456dbdb989788a0147342fe91f0a836f
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
List all the resources needed by the MDSS HDMI PLL device and add
the corresponding device node for msmcobalt. The HDMI PLL is the
source for all the branch clocks needed to drive pixel data over
the HDMI interface.
CRs-Fixed: 1022772
Change-Id: I4cf25e531fea39f7b68bd5ef6edd89243c1ded21
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
Add PLL and PHY programming for HDMI. Dynamically calculate
the register values to be programmed for a given pixel clock.
CRs-Fixed: 1022772
Change-Id: Ibf7877eb6edd29baefee57bc12188989d897d47e
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
This change enables the SD card driver support for 8996 boards.
Change-Id: I0e7df68587e1a212e6c2ed7171fcd683cf115604
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Add EC reference support for USB audio ADSP solution so that
the USB audio rx can be used for echo cancellation.
Change-Id: If99081c1fd356e69710c94441affec92fac24075
Signed-off-by: Kuirong Wang <kuirongw@codeaurora.org>
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>