msm_fb_wait_for_fence() will put fence fd list if sync_fence_wait()
failed. After that same fd list wil be put one more time. This
cause a fd put twice and cause system crash at the time fd
was closed.
Change-Id: If6a358e051c98841e34c23d81098243003ef0836
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Fence sync seems to react badly when it gets a unexpected timestamp
on a timeline. When a event expires always send the expected timestamp
even if the event expired because the context was destroyed.
Change-Id: Ic0dedbad770363a00257d62c4940f7743bc33060
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
There are some testing showing that L2 at 1188MHz may cause
some stability issue. Lower the max speed to 1134Mhz until
the root cause is found.
Change-Id: I327c33c72ea0327e269d7839fadfb25ac715408b
Signed-off-by: Tianyi Gou <tgou@codeaurora.org>
It is possible that pipe_commit still be issued by
frame work after suspend had been started. Therefore
mutex lock within video_off is necessary to prevent
race condition from happening between these two threads.
Change-Id: I57f51744c1654d6def8664c492035631a5b7081e
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
There is a missing step to clear OTHR_RESET_CTR before power down.
It could cause a glitch and power hit without it. It has to be reset.
original gerrit is https://review-android.quicinc.com/#/c/191312/
This is cherry-pick gerrit by developer to jb_2.5
Change-Id: Id96070352480be6ea412844d4f71765e2df76afe
CRs-fixed: 420142
Signed-off-by: Fred Oh <fred@codeaurora.org>
The current code does not abort suspend when there are pending URBs.
They are simply killed during suspend. This may lead to QMI stall.
Add proper checks to ensure that there is no pending Tx/Rx data
during suspend. Clear the "SUSPENDED" flag in resume only after
taking out all the URBs from "tx_deferred" anchor.
CRs-Fixed: 451414
Change-Id: Icc48afc5eeedcc126d0ab1bec951bde4a53ac165
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Synchronous runtime PM API is used to increment the PM usage counter
in Tx path. It means Tx data path will not race with interface suspend.
Remove "delayed" anchor which is meant for Tx requests, that are arrived
during suspend. There is no point in distinguishing auto suspend and
system wide suspend. Abort suspend when we have pending Tx URBs.
CRs-Fixed: 451414
Change-Id: I302b120ccecfe30db1ebd2b1fcd9945a3675cf83
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
To deduce whether secure demux is available, an attempt is made to
load the secure demux appliction during module initialization.
The loading process retrieves the application from filesystem.
When kernel configuration is set so that the module is built-in
as part of the kernel image, filesystem is not yet available
and loading fails.
This change moves the loading attempt from initialization
to first usage of status query, which occurs after device
is opened by user-space and filesystem is sure to be available.
Change-Id: I22d24054196f6068bf28e2ba6f2a4da6a9340730
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
The platform data was requesting the wrong number,
it should request the first perf irq item.
Change-Id: I4a25b4704ed9e76172c6b0d4ca4b28a3286ab2ad
Signed-off-by: Neil Leeder <nleeder@codeaurora.org>
When a CPU is hotplugged out while a perf session
is active, disarm the IRQ when the CPU is preparing
to die. This ensures that perf doesn't lock up when
it tries to free the irq of a hotplugged CPU.
Similarly, when a CPU comes online during a perf session
enable the IRQ so that perf doesn't try to disable
an unarmed IRQ when it finishes.
Change-Id: Ic4e412e5f1effae0db34a3e4b5e7e5c65faed2a0
Signed-off-by: Ashwin Chaugule <ashwinc@codeaurora.org>
The MSM SoC's which have ARM's CPU's can power collapse. Ensure
the CPU side PMU's correctly restore the counters after coming
out of power collapse.
Change-Id: I544a1dd8ced26f726ba115d14867d9e34c2a7944
Signed-off-by: Ashwin Chaugule <ashwinc@codeaurora.org>
Provide a mechanism to track which msm perf patches
are present in a kernel. Some kernel branches do
not include all patches which causes problems trying
to debug perf issues. This framework provides a way
to keep track of which patches have been included
in a build.
Change-Id: Ib8ef311454564c4609d94decd93e039c80104275
Signed-off-by: Neil Leeder <nleeder@codeaurora.org>
Identical L2CC events with the same register, code and group
can be set up with individual origin filters. The hardware
restricts counting only for identical register and group settings
but a different value for the event code.
Detect such identical events and let them pass the constraint
checks.
Change-Id: I609defb5c5b070b1007b2e7db9e2d8315d2ba1d7
Signed-off-by: Ashwin Chaugule <ashwinc@codeaurora.org>
If the platform descriptor does not provide
its own free_irq function, default to the fallback
version.
Change-Id: I185186bf68b79e2dbfba77b0de66eb4daaf32fb8
Signed-off-by: Ashwin Chaugule <ashwinc@codeaurora.org>
The L2 perf code shares some resource reservation functions
with the L1 perf code. In these functions, use defaults
only if they're not defined for the L1 and L2.
Change-Id: I5a390aa0085694466800db78b51837556aa12cdd
Signed-off-by: Ashwin Chaugule <ashwinc@codeaurora.org>
This is in preparation for adding support for the unicore A5
and dualcore A5, both of which have the same MIDR value.
Instead of adding extra parsing to the ARM generic perf_event file,
this patch moves it to the 'mach' directory where targets types
can be detected in an implementation specific manner.
The default behavior is maintained for all other ARM targets.
Change-Id: I041937273dbbd0fa4c602cf89a2e0fee7f73342b
Signed-off-by: Ashwin Chaugule <ashwinc@codeaurora.org>
For ARMV7 based PMU's implemented outside Qcomm, default
to the generic IRQ handlers to maintain original behavior.
Change-Id: Ic65379104cc708460f2f84c00ea86c1e284bbd29
Signed-off-by: Ashwin Chaugule <ashwinc@codeaurora.org>
Unicore targets can't use the percpu IRQ API,
so fallback to the generic versions of the functions
at init.
Change-Id: Id3db611fe4a7e0dcfbeb2f3ae08a5f7189132034
Signed-off-by: Ashwin Chaugule <ashwinc@codeaurora.org>
Remove target name from IRQ string, since the percpu IRQ API
is shared with all Qcomm targets.
Change-Id: Id0e7d9267654b373e9360806900259e00bf5a0ab
Signed-off-by: Ashwin Chaugule <ashwinc@codeaurora.org>
Since the L1CC PMU's are per CPU, the variable to detect if a CPU
came out of powercollapse also needs to be a per CPU variable. This
ensures that we reset and restore the correct CPU's PMU counters.
Change-Id: I02273df2eff9f6d88d68f46a7752c107b290a8ef
Signed-off-by: Ashwin Chaugule <ashwinc@codeaurora.org>
Add support for configuring ISO or ARIB stereo mixing coefficients.
This change introduces an IOCTL through which the user space can
configure ISO or ARIB coefficients.
Change-Id: Id08c859ce8bc18d7d0e41ce1ecb6a08f0794e067
Signed-off-by: Amal Paul <amal@codeaurora.org>
Add support for configuring ISO or ARIB stereo mixing
coefficients. This change introduces a function with whichi,
AAC multi-channel driver can configure ISO or ARIB coefficients
according to configuration done by the client.
Change-Id: I72b74033532a276fa3bc1d305a04720ff6767409
Signed-off-by: Amal Paul <amal@codeaurora.org>
Add null pointer checks to ensure subsystem API calls
do not dereferences null pointers and cause system
crash.
Change-Id: I5d5efc21b346ac5b9f6ddb2e42354aaf40fb56a7
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
AV switch and US Euro headset switches are not supported
on apq8064 target. Hence removing unnecessary gpio pins
configuration.
Change-Id: Ia4747b59b63b0bf7c37054fb1bcebfc54079b481
Signed-off-by: Ravi Kumar Alamanda <ralama@codeaurora.org>
Signed-off-by: Iliyan Malchev <malchev@google.com>
Conflicts:
sound/soc/msm/apq8064.c
There exist a possibility for "handle" input being NULL. We need
to check for this before dereferencing it.
Change-Id: I50c1c6855ad303e05b52e6e37d774551d9db4fc4
Signed-off-by: Mona Hossain <mhossain@codeaurora.org>
Initialize the platform data before it is being used for bus scaling.
Change-Id: Ie41ddec08b52b44ae735469dd8f3052e3469eeff
Signed-off-by: Hariprasad Dhalinarasimha <hnamgund@codeaurora.org>
We expect alloc_pages to fail for high-order pages under stressed
memory conditions. It should then fall back to lower-order page
allocations but due to excessive logging the system crashes. Use
__GFP_NOWARN for high-order allocations to avoid excessive logging.
(cherry picked from commit ff6ea62fe0687e754ddb64492e77fd75ad85fa02)
CRs-Fixed: 454877
Change-Id: Ie18c2dddd6810038abad9b06c7838ff4a0844b6d
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
Secure demux major version denotes the API version.
This patch verifies that the reported major version is compatible,
and outputs a warning if not.
Change-Id: I7dc0fd86a761f2300c4b2d62b6dbc56f12dc721a
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
The userspace fails to detect the supply type as USB if "type"
property of usb_psy power-supply class is set to anything other
than USB at init. The driver ends up setting this to type
-UNKNOWN at bootup if there is no USB source present
-USB_DCP/ACA if a wall charger is present
This causes issues with displaying the charger source later on
since the USB path is not noted by the userspace. Moreover, the
userspace ignores the changes to the type property at runtime
making it futile for the driver to update it.
Use local driver data to store the usb type information
and use this to determine the supply-type. Keep the
usb_psy.type set to USB always.
CRs-Fixed: 451196
Change-Id: I69d6935826a05dd0310b960b4fd1735bc77ec67f
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
Add boundary check to avoid any possible array index out of bounds
Change-Id: Ifad79991298e9d779b38a33a270af5197d2fc060
Signed-off-by: Willie Ruan <wruan@codeaurora.org>
Diag on the A-Family mainline has fallen out of date. Create a
commit to bring diag up to date.
This includes the HSIC race condition fix while in MEMORY_DEVICE_MODE
CRs-Fixed: 446711
Change-Id: Iceb2afb0bf6e52db45732b51b51777030df312ac
Signed-off-by: Dixon Peterson <dixonp@codeaurora.org>
For hdmi case, mdp clock calculation needs including borderfill
pipe to prevent dtv underrun while system is in suspend.
Crs-fixed: 449027
Change-Id: I98789343317d5cfdf1f56e496cecb4dd663c907f
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Initialize cur_freq variable of each online cpu to the current
running cpu clock frequency. This avoids zeroing out the load
calculations until the first notification of the change in CPU
frequency comes in after CPUFREQ governors are intialized.
Also when a non boot cpu is up, update its cur_freq variable.
(cherry picked from commit 1633a48b16614e6b85c047a19ec93867c2ced3b3)
Change-Id: I950686deff02e2339eefae7d09392dda2174a545
CRs-fixed: 446017
Signed-off-by: Venkat Devarasetty <vdevaras@codeaurora.org>
If macroblock count per second goes beyond 1080p 30fps,
then bump the clock to turbo on supported platforms.
CRs-fixed: 455464
Change-Id: I48c34c9b6987706ea3e6b412b57791e2ae07ba52
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
sysmon.h is present in arch/arm/mach-msm directory.
Fixes following compilation error:
arch/arm/mach-msm/include/mach/mdm2.h:15:20:
fatal error: sysmon.h: No such file or directory
Change-Id: I3b109b98c3a2581595e87b8ef56214ddc307cb6c
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
We saw a problem where the charger was locked up and it reported
incorrect FSM states.
The root cause was that PMIC could be doing short sleeps while
LPM is set to 0. This means it would enter 32Khz and exit 32Khz
fairly quickly causing the lockup.
For e.g.
pm_chg_write gets called
write LPM = 0
pmic enters and exits sleep quickly.
charger locks up
the writes and reads are unreliable from this point on.
To prevent the lock up instead of using the LPM bit force
the charger to run from 19.2Mhz while doing a write.
Change-Id: I2211f030e053378ed01d564dec4fb9aea24ccb9d
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
There are certain conditions where AICL should be disabled. For example,
cases where a strong usb charger capable of supporting the usb_max_current
or cases where a wireless charger is used.
Use the power supply property HEALTH to indicate whether AICL is desired
or not. If HEALTH is unknown enable AICL, if HEALTH is good disable
AICL.
While at it clean up the vbus_draw callback
- there is no need of the vbus_lock, remove it
- there were , comma separated statements in the probe function, use ;
instead
- the commit to verify the_chip is initialized, defeats the purpose of
remembering the usb current when the_chip is not initialized. Clean
this up
Change-Id: I8b21ccdf5ed69ea917cb370d2e8930c9d8a5003f
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
ACA chargers can generate multiple vbus current draw requests
based on the number of USB peripherals connected to the dock.
Handle this by allowing runtime modification to the max target
current limit.
CRs-Fixed: 427933
Change-Id: Ie508a85bbbe129d77af48c05235376779d799128
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
There is a potential out of bound array access to find the
max adjustment value for battery current. Fix it.
Change-Id: I73856b7cdc85204e501b33b3412490148867576e
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Add checking for NULL. Two parameters shouldn't be NULL.
Change-Id: Ied9e9e6238f6498305844bf3a08370c7cf751fc7
Signed-off-by: Fred Oh <fred@codeaurora.org>
Fixed incorrect logic to check if the next pagefault
is in the 4k address range of previous pagefaults.
Change-Id: I76c2e13f3b1cb287af0ef9c8af2f4452df23ec54
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
Signed-off-by: Rajeev Kulkarni <krajeev@codeaurora.org>
Commit f0b04dee "net: rmnet_usb: Support multiple instances" changed
the storage of the pre-allocated control device structures by adding
them to a list. The problem with that approach is that across
disconnect/re-probe, each instance may not be re-associated with the
interface as used previously. This coupling must be ensured to allow
users of the control device files to continue to access the same
interfaces across subsystem restarts.
Fix this by creating the instances in a dynamically-allocated array.
Since we assume probe order is in increasing interface number per
USB device, use this to assign the same instance when the
device/interface is re-probed.
CRs-fixed: 453167
Change-Id: Ide20abdd7acf0194dfb9bbdd9d039a8888b23d93
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Previously the WFD driver was reponsible for signalling the
online/offline events to userspace listeners. This led to redundant
notifications due to the manner in which the WFD driver is used. The
signalling is better purposed when done from MDP driver.
Change-Id: Ifffbacb565f8758b65139f7b0e32df0773247e2d
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
The copied sync_pt was activated immediately. If the sync_pt was
signaled before the entire merge was completed, the new fence's pt_list
could be iterated over while it is still in the process of being
created.
Moving the the sync_pt_activate call for all new sync_pts to after both
the sync_fence_copy_pts and the sync_fence_merge_pts calls ensure that
the pt_list is complete and immutable before it can be reached from the
timeline's active list.
Change-Id: I7aa4d404a822347b6ce148018d2a66e4f6a20c78
Signed-off-by: Erik Gilling <konkers@android.com>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
Signed-off-by: Uma Maheshwari Bhiram <ubhira@codeaurora.org>
A killed task can stay in the task list long after its
memory has been returned to the system, therefore
ignore any tasks whose mm struct has been freed.
Change-Id: I76394b203b4ab2312437c839976f0ecb7b6dde4e
CRs-fixed: 450383
Signed-off-by: Liam Mark <lmark@codeaurora.org>
Scale filter FIR uses the adjacent pixels as part of the
processing. Source address registers should be program such that
they point to the first valid pixel so that non-ROI pixels are
ignored. This is done by making source x,y offsets to zero and
adding the computed offset to source address.
CRs-Fixed: 380020
Change-Id: I998fdd46f39dc67f32c422ec209da59d1add2e95
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
Conflicts:
drivers/video/msm/mdp4_overlay.c
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
All 8930 platform boards using the 1.2 SoC have been reworked so that
the sd card detect line's esd circuit is no longer powered by the sd
card's voltage regulator. The soc-info check was incorrect thus missing
out on 2.0 version.
Update the check to properly include all the correct versions of SoC.
Change-Id: I665933d3099b8576ef3085dd0989aaa5a2b9af97
Signed-off-by: Pratibhasagar V <pratibha@codeaurora.org>