The system resume then suspend too fast
when put on or remove wireless charging dock
Change-Id: Idddb823036b58f1c390aee500574d8379a91731f
Signed-off-by: Hank_Lee <Hank_Lee@asus.com>
The commit fd6681cd4d0782f6e6ac918ab337016f59c2520b introduced
a silent bug that incorrectly checks state of the clock while
setting the next timer event. The bug manifests only during
failure code path of msm idle operation, which is very rare.
Due to the bug, the driver isn't be able to reprogram the timer
device.
CRs-fixed: 468902
Change-Id: I4ec14ea9c3a5d318ef98d2b13bd55efd89538df5
Signed-off-by: Jay Chokshi <jchokshi@codeaurora.org>
Signed-off-by: Ajay Dudani <adudani@codeaurora.org>
On 8064 SOC family, a dedicated XO is derived to support
sleep clock at 32768Hz unlike 8960 SOC family where TCXO
divider was used with effective freq. of 32765Hz.
CRs-fixed: 462079
Change-Id: I79142703c4ffac209f4dedeefebc235eeb8b140d
Signed-off-by: Jay Chokshi <jchokshi@codeaurora.org>
Signed-off-by: Ajay Dudani <adudani@codeaurora.org>
Ensure graphics SMMU will always do page table translations from
memory instead of using L2 cache.
b/9199241
Signed-off-by: Ajay Dudani <adudani@codeaurora.org>
Use the default setstate function, which directly reprograms the IOMMU,
to change IOMMU pagetables or flush the TLB if the GPU is already idle.
This condition often occurs when the GPU is being powered down. In this
case it is desirable to avoid the overhead of issuing commands, waiting
for idle and firing events that results from using the GPU
command stream to reprogram the IOMMU.
Change-Id: I633002ac49c8fe58df3f1f6a1fd1ddf705fc1733
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
Signed-off-by: Ajay Dudani <adudani@codeaurora.org>
Reboot the device to charger mode when user turn off device and
Wirless/AC/USB is plugged.
verify ok in android-msm-flo-3.4-wip-debug.
Change-Id: I9b0ff5c9f4cb0f11677d978cb34bbd2db2082c51
Signed-off-by: singhome_lee <singhome_lee@asus.com>
There has two bugs.
1. For example, the 'psaux' device will use '1' as minor number to
register misc device, but misc deriver doesn't set the '1' as used.
It's the root casue for duplicate filename.
2. From warning message, minor number '1' is the one of duplicate
fileanme, it meanes the number of dynamic minor is not enough.
The symptom of creating duplicate filename:
------------[ cut here ]------------
WARNING: at fs/sysfs/dir.c:508 sysfs_add_one+0x7c/0x9c()
sysfs: cannot create duplicate filename '/dev/char/10:1'
[<c00148b8>] (unwind_backtrace+0x0/0x11c) from
[<c007f828>] (warn_slowpath_common+0x48/0x60)
[<c007f898>] (warn_slowpath_fmt+0x2c/0x3c)
[<c018696c>] (sysfs_add_one+0x7c/0x9c)
[<c01874b4>] (sysfs_do_create_link+0x10c/0x1f8)
[<c03bd6c0>] (device_add+0x1ac/0x5e4)
[<c03be24c>] (device_create_vargs+0x8c/0xd0)
[<c03be2ac>] (device_create+0x1c/0x24)
[<c037c7a4>] (misc_register+0xb4/0x118)
[<c0e30c1c>] (init_log+0x10/0x4c)
[<c0e009d8>] (do_one_initcall+0x90/0x160)
[<c0e00b94>] (kernel_init+0xec/0x1a8)
[<c000f468>] (kernel_thread_exit+0x0/0x8)
---[ end trace da227214a82491b9 ]---
BUG 8889112
Change-Id: I186a945a56fc831f59e19509365a0ae8a481bb2d
Signed-off-by: singhome_lee <singhome_lee@asus.com>
Early suspend is deprecated in the framework but disabling it
completely can affect other subsystems. Disabling only for the
MDP driver.
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
Avoid holding ashmem_mutex across code that can page fault. Page faults
grab the mmap_sem for the process, which are also held by mmap calls
prior to calling ashmem_mmap, which locks ashmem_mutex. The reversed
order of locking between the two can deadlock.
The calls that can page fault are read() and the ASHMEM_SET_NAME and
ASHMEM_GET_NAME ioctls. Move the code that accesses userspace pages
outside the ashmem_mutex.
Bug: 9261835
Change-Id: If1322e981d29c889a56cdc9dfcbc6df2729a45e9
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Debug sysfs files should not be world writable.
Changed the permissions for bam_pipe_sel, bam_addr,
testbus_sel files.
CRs-Fixed: 465369
Bug: 9052691
Change-Id: Ie1a2aa993750510fd4e8c54819eb2efdc8b92055
Signed-off-by: Praveena Pachipulusu <pveena@codeaurora.org>
Signed-off-by: Mekala Natarajan <mekalan@codeaurora.org>
OTP will be wriiten from bank 1.
If it's written fail, it will be written bank 2, and so on.
The maximum times is 3.
Vendor suggests us reading OTP from bank 3 to bank 1.
Change-Id: I1108fd7e3ce2b7652964b5995fc51cc488b5d191
Signed-off-by: chiayi_wu <chiayi_wu@asus.com>
When bistream buffer size is half of YUV buffer size, video core
may be put into a bad state where output buffers are not returned
back to user space. Increasing the output buffer size solves the issue.
Signed-off-by: Shuzhen Wang <shuzhenw@codeaurora.org>
Because of the not enough bandwidth, sometimes mipi clk and data
would spend more than 16.7ms to transmit a frame. This would induce
tearing.
case 01209088
Issue 9271363
Change-Id: I6c15e981ead1d9199d3c455e4b4eb7d31826996a
Signed-off-by: yetta_wu <yetta_wu@asus.com>
In the original code logic, when auto-brightness turned on, the
unset_bl_level would be 0. Thus no backlight command when starting
to encrypt.
Do not set unset_bl_level to 0. The logic by unset_bl_level could
be mentained by bl_updated.
Note that mipi command mode panel need extra backlight command in
msm_fb_commit_wq_handler. If we embeded the backlight command in
power on sequence, there would be screen mess when panel power on.
Issue 9260406
Change-Id: I7978f18326afde27c5c3f1e8e205a1dd21511b87
Signed-off-by: yetta_wu <yetta_wu@asus.com>
flo/deb doesn't use isa1200, remove the driver to avoid unexpected bus error.
Bug: 9289806
Change-Id: Ia312042dc9ff983b80a706c4ab318d7cdadeb1d0
Signed-off-by: Karl Yu <Karl_Yu@asus.com>
The migration notifier may run in a context where it is not safe to
enqueue a work item. For example:
(__queue_work+0x1f4/0x40c)
(queue_work_on+0x34/0x44)
(dbs_migration_notify+0x2c/0x40)
(notifier_call_chain+0x38/0x68)
(__atomic_notifier_call_chain+0x34/0x44)
(atomic_notifier_call_chain+0x14/0x18)
(try_to_wake_up+0x350/0x36c)
(autoremove_wake_function+0xc/0x34)
(__wake_up_common+0x48/0x7c)
(__wake_up+0x3c/0x50)
(trustee_thread+0x1d0/0x528)
(kthread+0x80/0x8c)
The trustee code already takes a lock internal to the workqueue
implementation and is not expecting a wake up to come around and
enter the workqueue code again, where the same lock will be needed.
Instead of relying on a workqueue, use a per-CPU kthread to do
the frequency syncing.
Change-Id: I7555ee40867792fa8ec4ea8f9a6309323775e797
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
Signed-off-by: Ajay Dudani <adudani@codeaurora.org>
In the process of scaling CPU frequencies, cpufreq and the APIS is
calls may hold resources that will prevent threads critical for
system stability from running.
Specifically, thermal-mitigation software may need to respond
quickly to high-temperature conditions and throttle the CPU speed
in an effort to cool down. If the system is already in the middle
of a CPU frequency switch being executed on behalf of a cpufreq
governor, thermal mitigation will be blocked until the scaling
action has completed. If the system is under heave load of medium
or high-priority threads, this may take a long while and the system
may potentially surpass thermal limits in the meantime.
Resolve this by using high priority workqueues for all ondemand
and conservative governor scaling operations. This will allow them
to complete promptly and release their hold on resources necessary
for maintaining system stability.
Change-Id: I2f56052c131442838036cf4cdd8059f7c09bb805
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
Signed-off-by: Ajay Dudani <adudani@codeaurora.org>
After ER2, we use mipi command to control backlight.
The pwm by pmic gpio 26 should be turned off to avoid power leakage.
Change-Id: If6747d874420f7c3f647a8daec8a51f03310b226
Signed-off-by: yetta_wu <yetta_wu@asus.com>
wait4vsync is not necessary since pipe commit has already a busy
wait
for the previous frame play done.
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
git://codeaurora.org/external/wlan/prima.git
dcac6a2 Wlan: Release 3.2.2.16
4324e59 wlan: RX thread access HW register protection
6032d59 wlan: wiphy->bands[] can be null.
8f3ca34 wlan: probe request send on channel 12 13 14
Note that "6032d59 wlan: wiphy->bands[] can be null." is the official fix for
b/9195356; hence commit 8365076f1e has been
effectively reverted.
Signed-off-by: Iliyan Malchev <malchev@google.com>
Need calibration for below Issue:
[Issue 9261425] New touch firmware is needed to apply the new parameters.
Change-Id: Ib80d5a9efbe1ae683ae5731c37c4253dfc926559
Signed-off-by: javid_shu <Javid_Shu@asus.com>
This change fix the WFD connection failure while image
is updated or factory reset without reboot.
Bug: 9112939
Change-Id: Iee25de3d68200b01bab872dac83d0df12256910a
Signed-off-by: William_Shih <William_Shih@asus.com>
Register for suspend and resume notifications from kernel. This should
be done as part of core_initcall so as to receive notification as close
as possible to the actual event. Add hotplug_disable attribute to
rq-stats node. Set/clear this attribute based on the suspend/resume events.
CRS-fixed: 452456
Bug: 9022807
Change-Id: I76fee349b57f47df40785e9c2503e2e1cc6e064e
Signed-off-by: Archana Sathyakumar <asathyak@codeaurora.org>
Signed-off-by: Mekala Natarajan <mekalan@codeaurora.org>
git://codeaurora.org/external/wlan/prima.git
42e214c Wlan: Release 3.2.2.15
f67fdd9 WLAN: DUT sets NV default country code when disconnects from AP
ca1762c Wlan: Release 3.2.2.14
0ed4530 wlan: Aborting scan while disconnect is in progress.
Signed-off-by: Iliyan Malchev <malchev@google.com>
Commit 88a7e37d265 (sched: provide per cpu-cgroup option to
notify on migrations) added a notifier call when a task is moved
to a different CPU. Unfortunately the two call sites in the RT
sched class where this occurs happens with a runqueue lock held.
This can result in a deadlock if the notifier call attempts to do
something like wake up a task.
Fortunately the benefit of 88a7e37d265 comes mainly from notifying
on migration of non-RT tasks, so we can simply ignore the movements
of RT tasks.
CRs-Fixed: 491370
Change-Id: I8849d826bf1eeaf85a6f6ad872acb475247c5926
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
Signed-off-by: Mekala Natarajan <mekalan@codeaurora.org>
tcp_ioctl() tries to take into account if tcp socket received a FIN
to report correct number bytes in receive queue.
But its flaky because if the application ate the last skb,
we return 1 instead of 0.
Correct way to detect that FIN was received is to test SOCK_DONE.
Reported-by: Elliot Hughes <enh@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Neal Cardwell <ncardwell@google.com>
Cc: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Based on A023 and remove the grip information.
1.[Issue 8840158] [FLO] pinch zoom doesnt seem as responsive / reliable as on nakasi.
2.[Issue 8858019] [FLO] Poor touch resolution.
Need calibration to fix these two issue with ER1/ER2 device:
3.[Issue 9052815] [FLO] Dead "Bands" on the touch screen.
4.[Issue 8930391] Spurious touchscreen taps.
Change-Id: I16084c31a289527f0085b475b9d6ea88ff7f9371
Signed-off-by: mars_kao <mars_kao@asus.com>
Fix the issue that the slimport detect pin would keep changing high
and low when plug slimport dongle only (no HDMI device).
This would let our device cannot go to tcxo shutdown.
This reverts commit e29e266b40.
Conflicts:
drivers/misc/slimport_anx7808/slimport.c
Change-Id: I261aa09576f555e29479cfc190b6b5d802d5790d
Signed-off-by: yetta_wu <yetta_wu@asus.com>
2013-05-10
V0.4
1. To be compatible with combo dongle.
2. To be compatible with dongle of other venders'.
3. Add HDCP dynamically switch sysfs path
/sys/devices/i2c-0/0-0039/hdcp_switch
4. Add some phy register settings for eye diagram on deb
5. Modify the codes to conform to linux coding style
Change-Id: I22a085be67143c74960f391af03ee42a7106d196
Signed-off-by: yetta_wu <yetta_wu@asus.com>
Video tile frame size register is NOT double buffered.
when this register updated, it kicks in immediatly.
During transition from smaller resolution to higher
resolution it may have possibility that mdp still fetch
from smaller resolution buffer with new higher resolution
frame size. This will cause iommu page fault. This patch
delay commit frame size register until next frame update
if it is necessary.
CRs-fixed: 450126, 461598
Change-Id: I0339100b8b2d76adf2b4b4206d1942effae55e0a
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>