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>
This is useful to diagnose the reason for page allocation failure for
cases where there appear to be several free pages.
Example, with this alloc_pages(GFP_ATOMIC) failure:
swapper/0: page allocation failure: order:0, mode:0x0
...
Mem-info:
Normal per-cpu:
CPU 0: hi: 90, btch: 15 usd: 48
CPU 1: hi: 90, btch: 15 usd: 21
active_anon:0 inactive_anon:0 isolated_anon:0
active_file:0 inactive_file:84 isolated_file:0
unevictable:0 dirty:0 writeback:0 unstable:0
free:4026 slab_reclaimable:75 slab_unreclaimable:484
mapped:0 shmem:0 pagetables:0 bounce:0
Normal free:16104kB min:2296kB low:2868kB high:3444kB active_anon:0kB
inactive_anon:0kB active_file:0kB inactive_file:336kB unevictable:0kB
isolated(anon):0kB isolated(file):0kB present:331776kB mlocked:0kB
dirty:0kB writeback:0kB mapped:0kB shmem:0kB slab_reclaimable:300kB
slab_unreclaimable:1936kB kernel_stack:328kB pagetables:0kB unstable:0kB
bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no
lowmem_reserve[]: 0 0
Before the patch, it's hard (for me, at least) to say why all these free
chunks weren't considered for allocation:
Normal: 0*4kB 0*8kB 0*16kB 0*32kB 0*64kB 0*128kB 1*256kB 1*512kB
1*1024kB 1*2048kB 3*4096kB = 16128kB
After the patch, it's obvious that the reason is that all of these are
in the MIGRATE_CMA (C) freelist:
Normal: 0*4kB 0*8kB 0*16kB 0*32kB 0*64kB 0*128kB 1*256kB (C) 1*512kB
(C) 1*1024kB (C) 1*2048kB (C) 3*4096kB (C) = 16128kB
Change-Id: Ic5fe77d762e0c03715bfb917774e7c4f03ac43f5
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
It has been observed that system tends to keep a lot of CMA free pages
even in very high memory pressure use cases. The CMA fallback for
movable pages is used very rarely, only when system is completely
pruned from MOVABLE pages. This means that the out-of-memory is
triggered for unmovable allocations even when there are many CMA pages
available. This problem was not observed previously since movable
pages were used as a fallback for unmovable allocations.
To avoid such situation this commit changes the allocation order so
that on movable allocations the MIGRATE_CMA pageblocks are used first.
This change means that the MIGRATE_CMA can be removed from fallback
path of the MIGRATE_MOVABLE type. This means that the
__rmqueue_fallback() function will never deal with CMA pages and thus
all the checks around MIGRATE_CMA can be removed from that function.
Change-Id: Ie13312d62a6af12d7aa78b4283ed25535a6d49fd
CRs-Fixed: 435287
Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Update all relevant cpu_is_apq8064xx() call-sites to add
APQ8064AA support.
Change-Id: I4d1f092f53f2f46e58b4a9a2758ef4ab7e78e1d3
Signed-off-by: Jay Chokshi <jchokshi@codeaurora.org>
Hardware doesn't have the support on the auto gating of vcap_ahb_clk.
Therefore, disable this feature in this patch.
Change-Id: Id64f074f29593bfe0ea1fb1d2828b1f0699b5c47
Signed-off-by: Tianyi Gou <tgou@codeaurora.org>
Need the value of var in display commit to update the double buffers.
If not, double buffering doesn't work in minui (eg. recovery and off-charger
mode)
Change-Id: I1fba52243cc781f18742131759245911d32c9b18
Signed-off-by: Devin Kim <dojip.kim@lge.com>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
Add definition for struct to be used in post processing calibration API.
Needed by OEM calibration tool to provide better support of post processing
features.
Change-Id: I40760a85bb58730bfe64469ecf3e2ab3b6e7609e
Signed-off-by: Carl Vanderlip <carlv@codeaurora.org>
(cherry picked from commit e8ed5ec0bd9fd5b298464b7f08b5807afa3291a8)