media: dvb: mpq: Enhance debugfs counters for decoder output

Add counter for number of decoder packets with transport error
indication. Reset all decoder counters exposed in debugfs when
video is started.

Change-Id: I9434b2da3c24e19bb57acf562dcdb7df49a10dad
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
msm: kgsl: Issue conditional interrupts on internal submissions

Due to some mismatch in applying patches, one patch was overriding
the changes added  by commit bd5c9fcbf79d326817312138cf03298adf09df27.
This patch restores the changes.

Change-Id: I43223f01653c53df00682e8489b89e8978989944
Signed-off-by: Rajeev Kulkarni <krajeev@codeaurora.org>
msm_fb: display:  add mdp bandwidth runtime calculation

Currently mdp bandwidth request logic is based on source image size
and number of layers. This logic can not support complicated mdp
usecases and it is not power efficient. The logic is improved by
calculating mdp bandwidth request at runtime from all pipes and mixers.

Conflicts:

	drivers/video/msm/mdp.c
	drivers/video/msm/mdp4_overlay.c
	drivers/video/msm/mipi_dsi.c

CRs-fixed: 425823
Change-Id: I63206f00f8d3017a2449f8ac617fce3ba2a4d36c
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
msm: Fix ethernet gpiomux dependency on CONFIG_KS8551 on 8064.

All ethernet related gpio settings not encapsulated
within same CONFIG_KS8851 option.

Change-Id: Ic610f75e931a69c16e919f9b842a001e090806df
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
msm: Fix gpio and device dependency on CONFIG_GPIO_SX150X

On 8960 i2c ioexpander should be added based on CONFIG_GPIO_SX150X.
On 8930 Camera gpio settings should be added based on CONFIG_GPIO_SX150X.

Change-Id: I645e2bd41da16c19aff90b04d587938ec8ed9068
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
msm: Fix incorrect end of board file.

__ARCH_ARM_MACH_MSM_BOARD_MSM8960_H doesn't enclose
 the whole file.

CRs-fixed: 437100

Change-Id: I2382d59364cdb7585108c74761d796a6f0fa4931
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
radio: iris: Add support for RT Plus, eRT feature.

 - Allow Soc to interrupt host for RT Plus, eRT data
 - Parse the RDS group for RT Plus, eRT
 - Queue the parsed data and event for RT Plus, eRT
   to upper layer
CRs-fixed: 419248

Signed-off-by: Ayaz Ahmad <aahmad@codeaurora.org>

(cherry picked from commit 89265111440674132f59c3aa2938a0aefbfc84fb)

Change-Id: I44010cebd5d7de7ae3a4b076971d24d65aa4fb91
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
ASoC: msm: Modify min and max period bytes and num periods

Modify min and max period bytes and number of periods in
compressed driver so as to be consistent with lpa and to
meet ION memory requirements. This avoids using huge
buffer sizes for tunnel decode.

Change-Id: Ib71da4cebfc097e7aeaf0ca0e65ee847ba7cceb7
Signed-off-by: Phani Kumar Uppalapati <phanik@codeaurora.org>
tsif: Add option to inverse tsif signals

TSIF signals (clock, data, enable and sync) may be configured
to be inversed at TSIF unit input. This is useful in case
TSIF signals from external units need to be inversed.

Change-Id: I21a5c8eca73df0f4458c0d035ef8ae90920ea0c5
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
dvb: mpq: Add sharing of video buffer with dvb-video

When video data is tunneled internally between demux and dvb-video,
the ION buffer holding the video data needs to be shared with
dvb-video driver.

Change-Id: Ia6517bd9cbf284e1314d5275eccc6813dc8d3096
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
android/lowmemorykiller: Selectively count free CMA pages

In certain memory configurations there can be a large number of
CMA pages which are not suitable to satisfy certain memory
requests.

This large number of unsuitable pages can cause the
lowmemorykiller to not kill any tasks because the
lowmemorykiller counts all free pages.
In order to ensure the lowmemorykiller properly evaluates the
free memory only count the free CMA pages if they are suitable
for satisfying the memory request.

Change-Id: I7f06d53e2d8cfe7439e5561fe6e5209ce73b1c90
CRs-fixed: 437016
Signed-off-by: Liam Mark <lmark@codeaurora.org>
sensors: change sysfs attribute permissions

Those attributes used to be writable by world. This change allows
read only access by world.

CRs-Fixed: 382751

Change-Id: I2b37763514a86da9beed3fcb7dcb4706c790e44d
Signed-off-by: Wentao Xu <wentaox@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
msm_serial_hs: Don't configure gpios into UART Mode always

UARTDM device is used as interface to connect external devices through
GPIOs. Currently those GPIOs are configured in active mode once driver's
probe() is called and configured in suspend mode once its remove() is
called. Probe() is called once only and remove is not called until UARTDM
platform device is removed. With this current implementation, although
external device (ex. Bluetooth SoC) is not operational mode, used UARTDM
GPIOs are configured in active mode which is causing more leakage current
and more power consumption.

Hence configure those UARTDM GPIOs in active mode only when used UARTDM
device is opened and under used. Configure UARTDM GPIOs back to suspend
mode when UARTDM device is closed and under not used.

CRs-Fixed: 422217

Change-Id: I057a2da827f37687e5ea69bdca1533568be06eab
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
msm: vidc: Correct the decoder profile info assignment

Update the profile info in the sequence header with the
info which the core returns in the shared memory register.

(cherry picked from commit 5a60819aeb698b9d27937329bb5559a7a787a06e)

CRs-fixed: 408349

Change-Id: I6db75c907260c9744ec4e0d88db776be9bca8dea
Signed-off-by: Shobhit Pandey <cshopan@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
usb: ks_bridge: Fix memory leaks in the driver.

This change addresses two memory leaks:-
1) misc device is not getting deregistered during device
disconnect. Hence call misc_deregister() in disconnect.

2) Driver returns without freeing previous instances of
the driver data structure if memory allocation fails. Hence
free up memory allocated for ks_bridge structure.

Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
(cherry picked from commit da86bd2faa9cfbf065c7a1f0adba124d7e8335e0)

Conflicts:

	drivers/usb/misc/ks_bridge.c

Change-Id: I5e1c357fa29b455bae5f3dc71b4d65d5cc216bb3
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
msm: 8960ab: Don't add gfx2d footswitches on 8960ab

8960ab doesn't have any gfx2d hardware, so we shouldn't add the
gfx2d footswitches on this device. By not adding them we avoid
probe errors in the kernel logs.

(cherry picked from commit 913c29d9696a86d93705afae14a1169f96d561b0)

Change-Id: I27ca48d4d7a58b5d752f1f0fcbc3eff5cfe20e1e
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
msm: footswitch-8x60: Update bus ports for FS_VED footswitch on MSM8960AB

The video codec's bus ports have changed between 8960 and 8960ab.
Update the footswitch data accordingly, so that the correct ports
are halted and unhalted.

(cherry picked from commit 231cb1b4bec54fbba8210eda28a9622671e0e44f)

CRs-Fixed: 410449

Change-Id: If6b85b5f9e952c733da97fd61935305fdf9556ab
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
usb: mdm_ctrl_bridge: Do not unlink URB upon cable disconnect

MDM control bridge driver unlinks the pending URBs when control
bridge gets closed as a result of usb cable disconnect. Driver
sends set_control_line_state request to MDM upon bridge close.
Right after sending the setup request driver unlinks the pending
URBs. In case if the URB is unlinked after setup stage is completed,
status stage remains pending. This results in a control transfer
stall. Similarly, when the bridge is reopened as a result of USB
cable plug-in, the interrupt URB is not resubmitted, which can also
lead to a QMI stall since the MDM is waiting indefinitely to send
its response available notification. Fix these two potential stall
conditions by not unlinking URBs upon cable disconnect; this will
allow in-progress control transfers to finish gracefully and will
also allow notification interrupts to always be handled. Unlinking
of the URBs will happen during MDM device disconnect, instead of
upon bridge close.

(cherry picked from commit 77f79575ebe35f2ec329827290e7a67fb0e75286)
CRs-Fixed: 419128,418478

Change-Id: I5474372d832de2fd49f17faf77e7e549e80566ad
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
defconfig: msm8960: Disable USB Storage debug config

when USB_STORAGE_DEBUG config is enabled, all scsi commands sent to
USB storage devices are printed onto console.  As serial console
is enabled, this is degrading throughput.  This debug feature is
useful only during debugging issues.  Hence disable this feature
by default.

(cherry picked from commit 4713b9d5ded96679e68efdaebe9e8eb0e77b0e6f)
CRs-Fixed: 421411

Change-Id: I0e7e5546af84bbe7a0172fb177d1d3607f858e24
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
USB: msm_otg: Check ID state before entering into LPM

Fix a possible bug where id interrupt is not monitored during ID
detection circuit switch between ACA and PMIC.  This can happen
during quick Micro-A cable reconnection.

(cherry picked from commit becab5ba0d6a342612ff31ff9514e324f2f02517)
CRs-Fixed: 404516

Change-Id: I7e7edda54d1a9f5c4334cab1c48413c7461df2f1
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>