Currently video maps and unmaps the secure memory.
It could be too early to unmap it.
Rotator and MDP will maintain this, only unmap it when
no more needed. Memory managr has a refence count for it.
Change-Id: I5ca7cb09c0ad4b9e39808e937c2f50264727730c
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
The check condition for updating bus bandwidth if downscaling is
needed was always FALSE.
Change-Id: Iec0a4d13c7737d86976d76e0dfd3ec45062799fd
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
This reverts commit b157ff75f967cc72c51f6eae3feaa6ba7a432c87.
Enabling BOOT_TIMER may cause an inadvertent shutdown in the subsequent
boot cycle for certain valid scenarios. Do not enable this bit.
(cherry picked from commit 953e63d6cda58957d5e34ff6c43c651f13bb04bb)
CRs-Fixed: 434578
Change-Id: I0d657c2e0d47af32cc35cd66b902be72952e5438
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
bam_dmux_write() function modifies the state of a skb via skb_push(), but
if a later allocation fails, the state of the skb is not reverted to the
pre skb_push() state.
The error returned to the caller as a result of the allocation failure gets
propagated to the TCP/IP framework, which re-schedules a retry of the skb
at a later time. if enough retries occur due to allocation failures,
causes the assertion in skb_push() to fail.
If a later allocation fails, revert the skb buffer state to pre skb_push()
by calling skb_pull().
(cherry picked from commit 381cd549fd0176c649d1579f56b7504aa94df9be)
CRs-Fixed: 441277
Change-Id: If33e13f00ced164d174ce2c7d9d29762abafa720
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
For the panels which backlight is controlled by gpio, add this logic
in driver to turn on/off backlight, instead of calling board panel
on/off functions, to avoid garbage display due to early backlight
turn-on.
(cherry picked from commit 3eebb2e33570e32d11a757e493e12a8e79e08d6f)
CRs-fixed: 408728
Change-Id: I6f1b9bd78d96dbf1492e854edd59b05f8dec205f
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
The function pointer is passed to driver to turn on/off backlight to
avoid garbage display.
(cherry picked from commit a07d78743024144158a7b2cc0c194ae75e9b6bea)
CRs-fixed: 408728
Change-Id: Ibb218246bd3414b7004289e5afd0594a186374f1
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
blk_rq_map_sg() function merges the physically contiguous pages to use same
scatter-gather node without checking if their page descriptors are
contiguous or not.
Now when dma_map_sg() is called on the scatter gather list, it would
take the base page pointer from each node (one by one) and iterates
through all of the pages in same sg node by keep incrementing the base
page pointer with the assumption that physically contiguous pages will
have their page descriptor address contiguous which may not be true
if SPARSEMEM config is enabled. So here we may end referring to invalid
page descriptor.
Following table shows the example of physically contiguous pages but
their page descriptor addresses non-contiguous.
-------------------------------------------
| Page Descriptor | Physical Address |
------------------------------------------
| 0xc1e43fdc | 0xdffff000 |
| 0xc2052000 | 0xe0000000 |
-------------------------------------------
With this patch, relevant blk-merge functions will also check if the
physically contiguous pages are having page descriptors address contiguous
or not? If not then, these pages are separated to be in different
scatter-gather nodes.
(cherry picked from commit 6e25ce37a4f5750467f7c741b549687ebbc10667)
CRs-Fixed: 392141
Change-Id: I3601565e5569a69f06fb3af99061c4d4c23af241
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
vsync is controlled by frame work which means vsync irq
off may happen at any instance. This patch use a reference
count to control vsync irq enable/disable so that
wait4vsync can replace msleep safely during suspend.
Change-Id: Ief84b1b421436e1f750288eb9a9760a9cb96c555
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
If frame rate value for mipi video panel is coded in panel file it can
be directly used to avoid calculation error.
Change-Id: I6ad86226c81da4bcf36196385f9ff4bea0bef0ca
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
diag on the A-Family mainline is out of date. Create a commit
to bring diag up to date.
Change-Id: Ie24780b4b83a3cb378326357d70785a590167447
Signed-off-by: Dixon Peterson <dixonp@codeaurora.org>
This is Iee3db5401bdad1808a09d104e0daecfc3716cbb4 change ported
manually from the msm-3.4/msm-3.7 branch to the jb_2.5 branch.
The current code wakes up gpu on all kgsl_ioctl() calls that need
to hold device->mutex. However there are some kgsl_ioctl() calls that
don't need that. That fix introduces a bit of info to mark such
functions, and don't wake up gpu calling them to save some power.
Change-Id: I86224d2405c42e3803c7e361c02fe1d02d4cdff1
CRs-Fixed: 438932
Signed-off-by: Vladimir Razgulin <vrazguli@codeaurora.org>
mdp clock is controlled by frame work. There has
possibility that mdp clock had been turned off while
frame update still happen. In this case update
thread may stuck at wait4vsync since there has no
mdp clcok to trigger vsync interrupt. This patch
will enable mdp clock at pipe commit when mdp clock
is tunred off so that frame update can be completed.
Change-Id: I2d31b9a4b6f0cb9dd36516a80931988e23e8a545
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
The EHCI controller may be in suspend state in which its clocks
are already disabled. Fix warning given by clock subsystem when
disabling the clocks a second time when the controller's platform
device is removed by first checking if the device is suspended.
Change-Id: I3c491d0db11cc172d0e6779042c04fc726936b36
Signed-off-by: Jack Pham <jackp@codeaurora.org>
When the EHCI controller is removed using platform_device_del(),
the PM disable_depth counter is decremented once by the driver
core. Thus the driver's remove callback additionally calling
pm_runtime_disable() is leading to an unbalanced counter since
pm_runtime_enable() call happens only once when platform_device_add()
calls the probe callback. Fix this by removing the extraneous
pm_runtime_disable().
Change-Id: Ie76256ac50ba65022814285bf57feca109f79d6b
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Enable new mdp update method which requires flush bit
to be set before updating mixer cfg register for both
smart and dump panel
Change-Id: I97b9d221da574a96707748ec83dd1acff6dcb654
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
allow sensor HAL control the power state of gyro sensor, so that sensor is
disabled when not used.
Change-Id: Ib9f8e9761ea518534ffcd06f30de4b8f1f198687
Signed-off-by: Orkhan Karimov <okarimov@codeaurora.org>
Flushing and disabling all endpoints during disconnect in controller
driver is simply wasteful and unnecessary. Flushing endpoints before
notifying disconnect to composite driver will have side effects too.
The active endpoints will be disabled by function drivers when they
notified about disconnect.
The current code use 100 msec timeout for flush operation. If controller
driver flush and disable all endpoints, the worst case timeout will be
added up to several seconds. This is leading to watch dog timeout.
CRs-Fixed: 431623
Change-Id: If6a2e87006cda367c2eb4def616e9672e13eadf5
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Currently completion of endpoint flush operation is checked after
setting that endpoint bit with ENDPTFLUSH register and polling the
same to get it clear. It has been observed that sometime this flush
operation takes huge amount of time which results into watchdog
timeout issue due to this busy loop without any time-out. Hence add
time-out of 100ms for endpoint flush operation completion and also
add 100us delay before checking ENDPTFLUSH register for endpoint bit
clear or not.
Also print important usb status register and flushed endpoint dtds
at the time of issue.
CRs-Fixed: 409382
Change-Id: I7ae57cc436077f8a03051b92750bdca9a571da2b
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
Use the fps divider in calculation of sensor frame length
lines, so that the current fps requested is into effect.
Change-Id: I38ea5775e98e030b8be2e6895ac1a709a81cec92
CRs-fixed: 434293
Signed-off-by: Kalyani Oruganti <kalyanio@codeaurora.org>
In modem SSR case rescheduling of queue_rx_work for every 100ms
causing system to overload by rescheduling unnecessary work and
overflow kernel meesages with rescheduling logs.
Hence block the rescheduling of queue_rx_info
by adding in_global_reset flag check during modem SSR.
CRs-Fixed: 422096
Change-Id: I14bc8d82e44231a86b58faa0158740565177653d
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
If the high watermark is exceeded, then msm_smux_write() will return
-EAGAIN and then rmnet_xmit() will return NETDEV_TX_BUSY to have the
TCP/IP stack reschedule the packet. In the case where the high
watermark is hit, but not exceeded, then the function improperly returns
NETDEV_TX_BUSY resulting in the packet being sent a second time. Since
the packets are deleted in the write-done notification, the second
transmit will result in either an access-after-delete or a double-delete
crash.
Remove check for high-water mark hit in the transmit function since it
is handled by a high-watermark event from SMUX already.
CRs-Fixed: 403691
Change-Id: Iadf3ac249d3fb8ccb378fc243415acbbfc3a1ff1
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
Add support to 9 new logical channels and
add 3 reserved entries for logical channels from 9 to 11.
Change-Id: I2209404af7fe333b92bb7dd8d87ba184052c3525
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
Add 9 new SMD control channels to support iWLAN feature.
Change-Id: I8a1d46275cecb0344d31014976703f56f3893093
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
Log SMD_PKT driver events to an IPC logger. This will allow
debugging the SMD_PKT driver without incurring the kernel logging
overhead.
Change-Id: Ida34d6f466b347ee2e030a88f32d0b9ec23c0b98
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
Add the usage reference count for every SMD_PKT device. Update the
sequence of operations in device open & close calls. This will enable
multiple user-space users of a SMD_PKT device.
Change-Id: Ic11d0c2e6908f1d82f7aef6a99a0239a92358814
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
Add support to display SMD,SMSM interrupt IDs
of each subsystem to interrupts stats debugfs entry
Change-Id: I1e8e045735a50da87f56d77785819f6e3ca1d460
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
For subsystem restart unit tests, add check to make sure the remote
system is back up before continuing with the tests. This allows
removing fixed wait times in the unit tests and allows stress testing
using a shell script to call tests back-to-back.
Change-Id: I9af2164dd2ff8bc4d8a1e57f8a7aad957528a8c9
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
The 8930AB clock plan supports DDR@600MHz. Update the graphics
bandwidth vote to use this higher frequency on 8930AB.
Change-Id: I8891ecdb202b335f8fe43a663616a4745167d252
Signed-off-by: Lynus Vaz <lvaz@codeaurora.org>
(cherry picked from commit 4f3182e8bf55675d0a82c5bc87fcedb2f277e1d9)
rotator bus client will be not registered again without handler reset.
Change-Id: Id35c4e5ad481d0a4401bdb3ee4628ffa9a891467
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
For subsystem restart unit tests, we need to know when the remote system
is back up to avoid having to add fixed delays.
Add private function to allow checking to see if the remote side is
active.
Change-Id: Ide2f5e4aba01479c2dc1e8c3b4332da7da6ad0c5
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
If an error occurs, log to both the kernel log and the internal SMUX log
to aid debugging.
Change-Id: I35f7a8e44401b6c16c0d05fd9ef3368158075b77
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
To aid in debugging, print the state of receive flow control if an
overflow condition occurs.
Change-Id: Ic425d8c3f58e22a99b746bc184a8bb62677a944e
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
Add remote flow control test to verify external modem to Apps flow
control.
Change-Id: Id79201006614885f266a00cca5cb99667ec372b8
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
Add debugfs node that prints detailed state information
for all smux channels.
Change-Id: I727f1c53797ee317856056b8e4d9a8686940ce0f
Signed-off-by: Brent Hronik <bhronik@codeaurora.org>
Signed-off-by: Angshuman Sarkar <angshuman@codeaurora.org>
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
Using the kernel log for SMUX logging requires users to enable
debug logging and then reproduce the issue. Enabling all
logging often affects the timing and can make issues harder
to solve.
Add SMUX IPC Logging to enable internal logging that has a
minimum impact on performance and is always on to allow
debugging of an issue either from the command line or from
a memory dump.
CRs-Fixed: 384568
Change-Id: I6f1df407e07760206a7a548c9d3fce228e249155
Signed-off-by: Angshuman Sarkar <angshuman@codeaurora.org>
The user space application writes in 1MB chunks while loading MDM
images. The current code allocate as many bytes as user space
passed to write system call. These allocations are failing under
memory fragmentation scenario. Hence limit write size to 16KB.
CRs-Fixed: 434638
(cherry picked from commit 7fcc7799af7ace4c4eda229b0eac6448f98d6637)
Conflicts:
drivers/usb/misc/ks_bridge.c
Change-Id: I224cf201d724642f99e29874c4c5366ad773131e
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Meta buffer header initialization is required if we process
extradata in secure playback.
Change-Id: Ic8a068e99351f2c970643200d03b1a580ead7480
Signed-off-by: Deepak Verma <dverma@codeaurora.org>
Freeing USB requests and retiring pending requests can happen in
parallel. Take spin lock while freeing requests to prevent list
corruption. Ensure all stale requests are freed before allocating
new requests upon next cable connection.
CRs-Fixed: 436769
(cherry picked from commit eb1ed0ec838f616677918974fa667ee0752e5bf3)
Change-Id: I162bfd72da7a205e80caf9ae53db12f0eb335388
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Battery charging specification allows data contact detection (DCD)
timeout to be any value between 300 and 900 msec. As DCD is reliably
working, increase the timeout for detecting slow cable insertion cases.
DCD would fail with ACA-dock and ACA-A + HS/FS device. Use 750 msec
as timeout. The 150 msec (900 - 750) safe guard time compensates the
time taken from session valid to DCD enable. Decrese the DCD polling
period from 100 msec to 50 msec to exit DCD state quickly.
The 150 msec safe guard time compensates the time taken from session valid
to starting charger detection procedure.
CRs-Fixed: 437484
(cherry picked from commit ebb4a2d613128a2db288402bc834622a36e71956)
Conflicts:
drivers/usb/otg/msm_otg.c
Change-Id: I0e014d2ae0f9e00eaba179af2244924cf4561c90
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
When tethered rmnet/dun interface probe is failed, the bridge channel
platform device is removed in error path. The gadget driver schedule
a work to open the bridge channel in probe. Cancel this work in remove
before closing the channel.
Cancel any pending work while closing the bridge. Otherwise there is
a possibility of rx work running in parallel with probe error path. If
this happens, rx work access already freed memory.
CRs-Fixed: 442119
(cherry picked from commit 50f3815166483c654ebb325c49e50af4e31547da)
Change-Id: I78c2ee04cfd083248127cfd6b9f07994087729ca
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
The current 8064 frequency plan supports max mdp clk up to 266.667MHz.
CRs-Fixed: 405103
Change-Id: I326f5becc642399a4a0e9d97752d893752388066
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
(cherry picked from commit 861c6cef982df9a72a0901853aef65c48c631cc9)
8x30 hardware configuration is slightly lower compared to 8960/8064.
So the bus bandwidth vectors need to be tweaked slightly to avoid bus
overflow issues seen in different camera usecases.
Change-Id: I3d993f9a23177d80054e4f8fb9cdab8c3a90f97d
Signed-off-by: Kiran Kumar H N <hurlisal@codeaurora.org>
AVS registers in SPM were reset to 0 for 8960AB target. Remove the
values to enable AVS.
Change-Id: Icea25cd2ba867c3e1aa8aa7dab14c9305b5f0caa
Signed-off-by: Anji Jonnala <anjir@codeaurora.org>
8960AB and 8064AB have a new revision of the Krait SPM hardware.
The SPM v1.15x on these targets uses a different bit to control the
apc_pdn signal.
Update the SPM sequences for standalone and power collapse to use the
new sequences.
L2 SPM or Krait WFI/Retention sequences are not affected.
CRs-fixed: 419258
Change-Id: I3bcf335ac50cd1181047fe1ee1d56ecd507ae35c
Signed-off-by: Anji Jonnala <anjir@codeaurora.org>
In Suspend case, after we complete for no_update timer and before
we set power down flag to false we might recyle the CABL sequence
which might cause do_hist to fail till resume
CRs-Fixed: 434491
Change-Id: I51f9f0d9edb26c7671d44162f55c01acdde8f3d7
Signed-off-by: Kalyan Thota <kalyant@codeaurora.org>
Currently, if the histogram disable IOCTL comes after panel
is turned off, we early return the IOCTL causing the interrupt
to be left enabled. This causes IPC issues during suspend. Fix
this issue by properly enabling/disabling the histogram interrupt
during suspend/resume scenario.
CRs-Fixed: 434491
Change-Id: I4d38776a43ea854aff3c10c8d9d5450af1d98c91
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
Currently Rx Break Error condition is not checked using UART_DM_SR
register. Hence by default null-character is being inserted on
receiving Rx Error or Rx Break condition. Application sets termios
c_iflag if it needs any notification related to any Rx Error or
Break condition. Hence add support to handle Rx Break condition and
insert null-character conditionally based on termios.c_iflag.
CRs-Fixed: 412201
Change-Id: I7f496e42757b949f597d5dbe5c1f1ca88ee53c8c
Signed-off-by: Mayank Rana <mrana@codeaurora.org>