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)
FB_ACTIVATE_VBL bit is set to enable TE logic at pan_display
and unset to disable TE logic at pan_display for smart panel.
This patch checks for FB_ACTIVATE_VBL bit set only instead of
value.
CRs-fixed: 433399
Change-Id: I6fc913c6752fcca6a27c783c45ab318065217973
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
For cmd mode the frame rate calculation result is wrong. Also in mdp
driver there are several places to do the same calculation. So fix the
wrong calculation and use a single func to do calculation.
Conflicts:
drivers/video/msm/msm_fb.c
Change-Id: I3a4be39e480ce82677dcefb666202947f7f6d3c1
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
(cherry picked from commit d4eb5a1a3ef0935ce6aeffb2b48974c01b9518b9)
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
The mapping for several RPM resources for the MSM8930+PM8038
target is incorrect. Add and update enum values in order to fix
the mapping.
Without this fix, requests made for the following resources will
appear as 0 when received by the RPM processor: NCP, CXO_BUFFERS,
USB_OTG_SWITCH, HDMI_SWITCH, QDSS_CLK, and VOLTAGE_CORNER.
The incorrect VOLTAGE_CORNER mapping results in the VDD_CX
regulator always staying at a low voltage even when the clock
drivers have requested a high voltage immediately before scaling
up the Krait core frequency. This could lead to stability issues
during high load use cases.
Change-Id: I9efcf8185f9f3a017760c72baa3b8fdb213c770a
CRs-Fixed: 426912
Signed-off-by: David Collins <collinsd@codeaurora.org>
(cherry picked from commit b0e5b25377efe354f39860daf0591f340b0108dc)
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
Serial core allocates circular buffer for uart tx transfer.
Circular buffer head and tail is updated in serial core and
circular buffer tail is updated in uart driver.While uart
transfer is happening, uart client bluetooth hci_ldisc,calls
uart_flush_buffer in serial core and sets circular buffer
head and tail to zero.As uart driver does not know when
uart_flush_buffer is called in serial core by uart client,it
updates circular buffer tail for the previous ADM Tx completion.
This leads to queueing Tx command to ADM although no data is
there in circular buffer.Because of this,uart client is not
functional.
Hence adding msm_hs_flush_buffer api which notifies to uart driver
that uart_flush_buffer is called in serial core by uart client and
set tty_flush_receive flag to true.In uart interrupt handler ,do
not update circular buffer tail if uart_flush_buffer is already
called in serial core by uart client else update circular buffer
tail on ADM Tx completion.
(cherry picked from commit ce39410ad3db5b9fb446bf5da126585d58fa872a)
Change-Id: I9bce30da218f42739c175d9b3c283ae39b6b5c89
CRs-Fixed: 419054
Signed-off-by: Saket Saurabh <ssaurabh@codeaurora.org>
New characterization data shows that vdd_dig voltage for L2@384MHz
can be lowered to the low level. Update the data in this patch.
Change-Id: I7258c54a7245082cfd0d186d32fe7ab792cc8874
Signed-off-by: Tianyi Gou <tgou@codeaurora.org>
(cherry picked from commit 60f828d94cf249a5216512eedfc679ebf2fe18cf)
-Non tunnel playback is use case where compressed
data is sent to driver(for decoding) and
caller expects PCM data back from the driver.
-Add non-tunnel driver for amr-wb+.
-Add support for amr-wb+ in asm driver
Change-Id: I266e70dff0466a20b0435da840a31a8a1774cf35
Signed-off-by: Ajit Khare <ajitk@codeaurora.org>
mdp bus client could be registered multiple times without the check.
Change-Id: I582741c75e815873357e62bc9bf0ff61a4cecf9f
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
Always mark GPU contexts that have cause a GPU hang as guilty.
If the GPU context recovered successfully, still mark it as guilty.
This will inform applications that something might have
gone wrong and to take actions to ensure everything is correct.
Also, swap out any active context following a hang. This will
ensure that any new submissions will force the context to be restored
before it is used.
CRs-fixed: 427603
CRs-fixed: 405434
Change-Id: I6b7cf2b2a680a4691f45535a147ca678a4d961f3
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
Add SFAB voting in QSEECOM_IOCTL_PERF_ENABLE_REQ.
The SFAB clock needs to be bumped up to its optimal
value when opearting in high bandwidth mode (for max
crypto performance)
Signed-off-by: Mona Hossain <mhossain@codeaurora.org>
(cherry picked from commit 8e2d73a0ade94ffd27882043d562c7ee825d9f7c)
Conflicts:
drivers/misc/qseecom.c
Change-Id: I281e544756304f19969afbab7196a227dad0e2b1
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
In the current functionality, if DFAB clock is already on and a
request is made to turn on SFPB clock, the DFAB clock is turned
off and SFPB clock is turned on and vice-versa.
The above situation can lead to unexpected errors. The current fix
makes sure that clocks that are on are not voted to be off without
explicit request.
Change-Id: I6c3230e23b105c049cdb0aace579b8a176328c84
Signed-off-by: Ramesh Masavarapu <rameshm@codeaurora.org>
(cherry picked from commit 8d7565828aca6023ca968d2e5350737bd6d86215)
Bring the msm8960-perf_defconfig and msm8960_defconfig in alignment by
making sure they have the same WLAN configuration.
CRs-Fixed: 440816
Change-Id: I673a23a7d4d1646bb6bec8a1bf794ed6819717d0
Signed-off-by: Jeff Johnson <jjohnson@codeaurora.org>
Previously, a parameter was added to secure heaps to only
allow secure allocations. Some clients still require
non-secure contiguous allocations even though the SMMU is
supported. Add support for those clients to force contiguous
allocations to go through.
Change-Id: I0d18d8a9ed3ab267b55c84c4ad160f8cec2c2b32
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
The GPIO mux config varies with the platform. Hence add support
for correct camera GPIO mux corresponding to SGLTE platform.
Change-Id: I7fe745013c813fd079852e2f04ae23d3f021533a
Signed-off-by: Rajakumar Govindaram <rajakuma@codeaurora.org>
When the cmd sent by HAL is notified to the daemon, copy the
result of the processing of that ctrl command like status, back
to the userspace.
Change-Id: I6209981fb18abd7d4bd55e1f6525998f7fa14ddf
CRs-Fixed: 411688
Signed-off-by: Kiran Kumar H N <hurlisal@codeaurora.org>
This change adds free buffer api to video
client's flushing state to allow buffer
freeing in flush state.
CRs-fixed: 430214
Change-Id: I970efbbd8cc503eab4b944e12630f1b1faa9069c
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
Add the SoC ID and cpu_is wrapper for identifying the
APQ8064AA SoC.
Change-Id: Ia038088045e1170fe897f8ba0a9ab725e5acab20
Signed-off-by: Jay Chokshi <jchokshi@codeaurora.org>
(cherry picked from commit 38ccbee9a1f823640542f1e9d73a041d18337b2e)
Conflicts:
arch/arm/mach-msm/socinfo.c
Signed-off-by: Shruthi Krishna <skrish@codeaurora.org>
Currently CPUs that have entered nohz idle mode are not being woken
up to perform load balancing. Turning on SCHED_MC will fix that, and
will also cause CPUs to show up at the correct level of scheduling
domain (MC).
SCHED_MC would normally also cause SD_SHARE_PACKAGE_RESOURCES to be
turned on at the MC level as well, causing a task to be migrated to
an idle CPU when the task is woken up. Previous modifications to
SD_SHARE_PACKAGE_RESOURCES however have restricted its effect
to tasks that have the PF_WAKE_ON_IDLE flag set.
Certain target configurations (msm7627a*, msm8660*) are being left
out until they are verified with SCHED_MC.
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
Conflicts:
arch/arm/configs/mako_defconfig
arch/arm/configs/msm8910_defconfig
Change-Id: I1c8a311e724cedfebe6997e48ddebf837c14e7a1
AVS fine tunes the processor core voltage based on the current
system conditions and process technology.
Change-Id: Ia44acfa82bf921632d66576f9028bb4abfe976b5
Signed-off-by: Praveen Chidambaram <pchidamb@codeaurora.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Anji Jonnala <anjir@codeaurora.org>
Enable avs(bit 27 in SAW2_AVS_CTL) by default
in the board file which can be usefull later to
avoid unneccesarry enable/disables(for avs unsupported
targets).
CRs-fixed: 423827
Change-Id: I2ec49078e2811b8e515260d66462f8ee2ff4e38b
Signed-off-by: Anji Jonnala <anjir@codeaurora.org>
Do not enable/disable AVS on targets where it is not enabled at boot.
Enabling it on targets when AVS isn't enabled and the AVS control
parameters aren't configured, causes undefined behavior and random
crashes.
Change-Id: Id0c4e10618437eed1b383145a6a4f25bbd901647
Signed-off-by: Anji Jonnala <anjir@codeaurora.org>
Changing the voltage with the AVS feature enabled requires
certain care. First, temporarily disable AVS before writing any
registers which would change the voltage. Then kick the PMIC
state machine back to the idle state so that our write to the
VCTL register takes effect immediately. We don't need to check
the state machine for idle, instead we should just confirm that
the SPM has sent the voltage we wanted to send and then we can
program AVS to allow up to 4 12.5mV steps down from the voltage
programmed in VCTL. Once this is all done reenable AVS so that
the voltage can be decreased after the AVS_DELAY counts down.
Change-Id: I1c23fd0549e401152fd16de9032ceaf7c3e067c4
Signed-off-by: Praveen Chidambaram <pchidamb@codeaurora.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Anji Jonnala <anjir@codeaurora.org>
* This defconfig is based off msm8960-perf_defconfig
* Enable WLAN in kernel driver configs
Change-Id: Id6beb88349d00e7631344725ff35e9bfd959cf75
Signed-off-by: Ajay Dudani <adudani@codeaurora.org>
Memory allocated for "buf_entry" and "sched_cctxt"
is not freed in case if error is returned. This
change prevents possible memory leak in video
decoder driver.
CRs-fixed: 432323
Change-Id: I1c8775fb701f1568f704b6ddbb4e835304d2a817
Signed-off-by: Shobhit Pandey <cshopan@codeaurora.org>
This patch allow satge commit without pipes queued to
allow a pipe to be un-staged from mixer immediately after
overlay_unset.
Change-Id: I03abb907c66cce3d0559743d3bb1eb26a88dc78a
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
Sensor regulator could be still invalid at the time of a system
suspend, this change is to avoid freeing NULL regulators under such
occasion.
Change-Id: Ia520b2516b43feaa3fbbbe30628cc47ee7fad96a
Signed-off-by: Wentao Xu <wentaox@codeaurora.org>
This reverts commit 355c0ffe69b90b08ec4621bdb0964b42c6bb7eed.
Reverting it, as this is being handled in Display HAL now.
Change-Id: I2d807a17193c8d579bb23378e59817374d3f4ad7
Signed-off-by: Sushil Chauhan <sushilchauhan@codeaurora.org>
Add reference counting to all KGSL events since they are dependent
on the context. This avoids a race condition where the context
could be destroyed while the events are being processed during cleanup.
CRs-fixed: 438134
Change-Id: Ic2cd484d441e4c392ab63b0a0131accaceafc711
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
Cpufreq suspend variable get's updated in kernel pm notifier
callback which gets called in process context. This will create
window where cpufreq governor may try to change the frequency
before suspend variable is updated while resume.
Define suspend/resume for cpufreq driver to update suspend variable
in atomic context.
Don't update the policy->cur upon cpufreq driver failure.
CRs-fixed: 423791
Change-Id: Id78705f5c3b8bf801c6253e9362299280903769f
Signed-off-by: Anji Jonnala <anjir@codeaurora.org>
Add platform device for PC debug counters. These counter stores the
warmboot entry/exit counters for each core on a non-cacheable always
on IMEM memory. This is a useful feature during debug to understand if
the system has correctly warmbooted after a power collapse.
Usage for core0 debug counters:-
counters at address 0x2A03F664 represent no of times PC attempted.
counters at address 0x2A03F66C represent no of times PC failed.
counters at address 0x2A03F668 represent no of times warm boot happened.
no of PC attemps = PC failures + warm boot entries.
Change-Id: I3f78921f1ddd55967284fb7839a98bdb43efbeb9
Signed-off-by: Anji Jonnala <anjir@codeaurora.org>
The power collapse entry counters are incremented after the caches are
flushed during power collapse. In order for the counters to reflect the
current values, in the event of a crash, the counters have to be in a
non-cacheable memory.
Change-Id: If24a41cfa630fe0e843a4d41949ff38e1412889d
Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
Add warmboot entry/exit counters for each core on a non-cacheable always
on IMEM memory. This is a useful feature during debug to understand if
the system has correctly warmbooted after a power collapse. The debug
counters start at a memory offset of 0x664 on the IMEM. Each core
reserves 4 words for events, of which 3 are being used to monitor the
following events,
1) power collapse entry
2) warmboot exit
3) failed power collapse when wfi returns with a pending interrupt.
Change-Id: I45aac8e4a4d3421d586790b3b66fd71a8d88ea9d
Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
Add SPM sequences to do Krait retention for 8960,8930
and 8064. Also added a new rpmrs level containing the
latencies and power measurements for this new low power
state.
CRs-Fixed: 369864
Change-Id: I321fa22ab891b929366444f6187876c57f87c421
Signed-off-by: Anji Jonnala <anjir@codeaurora.org>
An incorrect ordering in the check of allowed modes, results in
standalone power collapse not getting selected when the secondary
cores are online.
Change-Id: Idc7177b78bd0ce7563cc27afbf6c12d3bc1f9f9a
Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
To prevent the Krait core configuration from being indvertently changed
when doing L2 power collapse, save a few CP15 registers and restore them
back after coming out of power collapse. This needs to be done after
switching the Krait from active freq to QSB clock source.
Before doing power collapse, the core0 clock switches over to QSB. However,
QSB can run at any frequency and the voltage required for that
frequency, needs to be ensured when coming out power collapse. If the
QSB clock at resume, is a higher frequency at than the QSB clock was at
collapse, then we may run the risk of running at higher clock with a
lower voltage.
Hence, switch to 1.0 V (safe vdd) when going into PC (after switching to
QSB clock source) and the SPM would resume at 1.0V. After the core
starts running, restore the CP15 registers and switch to the previously
saved active voltage, before switching clocks to the active frequency.
This is applicable only for APQ8064.
Change-Id: I75a70f5e07bd581fc8028bed79de7ee796f4c411
Signed-off-by: Praveen Chidambaram <pchidamb@codeaurora.org>
Resetting SDCC-BAM after reset of SDCC-DML causes
interface disconnect between SDCC-BAM and SDCC-DML
and lead to hang when SDCC driver initiates data
transfer in BAM mode. Modify the SDCC reset sequence
to reset SDCC-DML after reset of SDCC-BAM.
CRs-Fixed: 423399
Change-Id: Ia31d40e30cbf95befba3b1133a525a81903789f2
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
(cherry picked from commit b745eeb229a476d81ee4177adfe168d3a35bda47)
Add virtual ANC widgets which are used to enable ANC
before PA is turned on, and to disable ANC before TX is
turned off.
CRs-fixed: 387904
Change-Id: I8c2fa670062f1486499c79653a2c223f7daba84f
Signed-off-by: Damir Didjusto <damird@codeaurora.org>
Moving RGB1 and RGB2 to AXI port 1. This fixes underrun issues seen
on External display while connecting and disconnecting HDMI. This patch
evenly balancing pipe loads on each port.
Change-Id: I2dc1166d04bb938f9e233a6de52f1a8a3fdd29e2
CRs-Fixed: 435458
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
During error cases, there might be situation, when slimbus channels
are being closed even when the number of active channels for
that DAI is 0. Avoid decrementing ch_act field if it is already 0.
Change-Id: Ie988eb049a20fc7cf5725ddc183ee1ae5fcb758d
Signed-off-by: Banajit Goswami <bgoswa@codeaurora.org>
If init call for LED flash is missed / failed, gpio_request() may not
be performed for gpio pins for LED flash. This causes stability issues
where gpio calls are performed without gpio_request. Check for valid
client before performing gpio configuration.
Change-Id: Ib232dd53b52af06981d53c799b000ac7f4917c9d
Signed-off-by: Sreesudhan Ramakrish Ramkumar <srramku@codeaurora.org>
(cherry picked from commit 952001729813a0184d95e20f30bee89d6a4cd9bc)