Commit graph

590235 commits

Author SHA1 Message Date
Hans Verkuil
60238b2dd3 [media] cec: clear all status fields before transmit and always fill in sequence
Before transmitting a message clear all status fields and always fill
in the sequence number. Make sure the sequence number is never 0.

Change-Id: Ia8ad9b79935cad0e88371f00137a59326a336ffc
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Git-commit: 40df3a7e586df59190547fe0e7d9928da735eada
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
2017-05-25 11:22:01 +08:00
Hans Verkuil
a743a520d1 [media] cec: CEC_RECEIVE overwrote the timeout field
When CEC_RECEIVE returns a message the original timeout field
was overwritten. Restore the timeout field.

Change-Id: Ida65e37e1424745e3e4cf9d0108e10dc75e642ed
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Git-commit: e883b4d02670ae83ab24e9af969de1af756959f8
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
2017-05-25 11:22:00 +08:00
Hans Verkuil
b58d42ad60 [media] cec/TODO: drop comment about sphinx documentation
The CEC documentation has been converted to sphinx, so this
TODO item can be dropped.

Change-Id: I7a0fa38382a5533fd9e3643613d63595881b2b78
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Git-commit: bddb4952506d0e84c443a04840143ea98b610557
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
2017-05-25 11:22:00 +08:00
Hans Verkuil
5ab280ffae [media] cec: set timestamp for selfie transmits
Attempts to send CEC messages to yourself are detected in the framework and
returned with a NACK error. However, the tx_ts was never filled in that case.
So just set it.

Change-Id: Ifd8be78030778d3d99b88b353905879c2079c2c5
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Git-commit: 9a3f14ea802fd0d8848d8e16566b769e4ce09d68
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
2017-05-25 11:21:59 +08:00
Hans Verkuil
a293351e1c [media] cec: don't zero reply and timeout on error
There is really no reason to zero the reply and timeout fields if an
error occurs. This is a left-over from earlier versions where that
was used to signal errors, but this is now handled by the rx/tx_status
fields.

Change-Id: I2064f6b2dcb3affe4097ebdf7270eb8c6bc7e21d
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Git-commit: 86e3577f11d0aa8a5d3c6199f9e3f23cdbd0c0ac
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
2017-05-25 11:21:59 +08:00
Hans Verkuil
72b6c6a39f [media] cec: split the timestamp into an rx and tx timestamp
When transmitting a message and waiting for a reply it would be good
to know the time between when the message was transmitted and when
the reply arrived. With only one timestamp field it was set to when
the reply arrived and the original transmit time was overwritten.

Just taking the timestamp in userspace right before CEC_TRANSMIT is
called is not reliable, since the actual transmit can be delayed if
the CEC bus is busy. Only the driver can fill this in accurately.

So split up the ts field into an rx_ts and a tx_ts. Also move the
status fields to after the 'reply' field: they were placed in a
strange position and make much more sense when grouped with the
other status-related fields.

This patch also makes sure that the timestamp is taken as soon as
possible.

Change-Id: I643006cc32cbc6073b6ce8fa7ae03b63b3b0e266
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Git-commit: 980e0b36b55985dd0a37acd25d29c8f21482db32
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
2017-05-25 11:21:58 +08:00
Hans Verkuil
61423ca8a0 [media] cec: add sanity check for msg->len
Check (and warn) if the msg->len is too long or if it is 0.

Should never happen, but just in case...

Change-Id: I784aca0acdc74511b42b51ae01e57be0c04799b1
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Git-commit: 52d802d65b56a399aa67a9d3f26f232116d3e256
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
2017-05-25 11:21:58 +08:00
Andrew Morton
185a8562ea [media] cec-adap.c: work around gcc-4.4.4 anon union initializer bug
drivers/staging/media/cec/cec-adap.c: In function 'cec_queue_msg_fh':
drivers/staging/media/cec/cec-adap.c:141: error: unknown field 'lost_msgs' specified in initializer

Fixes: 9881fe0ca187c21 ("[media] cec: add HDMI CEC framework (adapter)")

Change-Id: I5e577cde445313876f3615666df8274d82a8e6b5
Cc: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Kamil Debski <kamil@wypas.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Git-commit: 6a91d60aba671cf8756a56d6157a9c971d2a5222
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
2017-05-25 11:21:57 +08:00
Hans Verkuil
0df37e07fd [media] cec: CEC_RECEIVE is allowed in monitor mode
When the device is in monitor mode, then you should always be able to
call CEC_RECEIVE, even it the device is unconfigured.

Change-Id: I1d11a8cbb26d19197b7f3a4a77ed8d6ce00f1853
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Git-commit: ca00033c9fc8b5f178573a76887c89296ed5b398
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
2017-05-25 11:21:57 +08:00
Hans Verkuil
468ef730e2 [media] cec: add check if adapter is unregistered
CEC USB dongles can be unplugged at any time, and at that point they will
be unregistered. Make sure that any attempt afterwards to set the physical
or logical addresses will be ignored.

Change-Id: If15d1e3f3447c6a844eaee27cfdfd65a3341062e
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Git-commit: c000e5dad17d20c644bbf3ead52c334025d11ada
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
2017-05-25 11:21:57 +08:00
Hans Verkuil
ae758ae16b [media] cec-funcs.h: add missing 'reply' for short audio descriptor
The cec_msg_request_short_audio_descriptor function was missing the reply
argument. That's needed if you want the framework to wait for the reply
message.

Change-Id: Id099aa3ec932beb7d49af56cd9f761ee66b2727e
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Git-commit: 9ad52b4db79d168867a2ca105eca00fb9cb28fe5
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
2017-05-25 11:21:56 +08:00
Hans Verkuil
dd752bd97b [media] cec-funcs.h: add missing const modifier
The cec_ops_* functions never touch cec_msg, so mark it as const.

This was done for some of the cec_ops_ functions, but not all.

Change-Id: Ibf4c85faac86588e937107bd1bc7648841060bab
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Git-commit: 0c1f8569942695b7a2735301efe45ecd69e2a41f
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
2017-05-25 11:21:56 +08:00
Hans Verkuil
0b7113df06 [media] cec-funcs.h: add length checks
Add msg->len sanity checks to fix static checker warning:

	include/linux/cec-funcs.h:1154 cec_ops_set_osd_string()
	warn: setting length 'msg->len - 3' to negative one

Change-Id: I3482a21f7e29b1b9f44832e598a86709f8764fe5
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Git-commit: 0cb1f1e44cf5b013dd0991f509e332ac77ce2ddd
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
2017-05-25 11:21:55 +08:00
Hans Verkuil
6ab0437744 [media] cec: fix Kconfig dependency problems
- Use IS_REACHABLE(RC_CORE) instead of IS_ENABLED: if cec is built-in and
  RC_CORE is a module, then CEC can't reach the RC symbols.
- Both cec and cec-edid should be bool and use the same build 'mode' as
  MEDIA_SUPPORT (just as is done for the media controller code).
- Add a note to staging that this should be changed once the cec framework
  is moved out of staging.

Change-Id: If084eab2c2bbca7b9fa5b8959b27b1894b8ec2b7
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Git-commit: 5bb2399a4fe4a1703c1497b4838c5e8e869d0822
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
2017-05-24 20:10:50 -07:00
Arnd Bergmann
9c77a6b3b9 [media] cec: add MEDIA_SUPPORT dependency
The MEDIA_CEC_EDID option is guarded by MEDIA_SUPPORT, so selecting
it from MEDIA_CEC produces a warning:

warning: (MEDIA_CEC) selects MEDIA_CEC_EDID which has unmet direct dependencies (MEDIA_SUPPORT)

The warning is harmless, but it's better to add an explicit
dependency to shut it up, to reduce the noise during randconfig
builds.

Fixes: ca684386e6e2 ("[media] cec: add HDMI CEC framework (api)")

Change-Id: I637ceabfcc8f311f8ca723671f954e1db060c965
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Git-commit: ea8c535e30c1066a0bf8acb2d39bb3c4e643a034
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
2017-05-24 20:10:38 -07:00
Hans Verkuil
f71e3abc16 [media] cec-adap: prevent write to out-of-bounds array index
CEC_MSG_REPORT_PHYSICAL_ADDR can theoretically be received from
an unregistered device, but in that case the code should not attempt
to write the received physical address to the phys_addrs array.

That would be pointless since there can be multiple unregistered
devices that report a physical address. We just ignore those.

While at it, improve the dprintk since it would attempt to read
from that array as well with the same out-of-bounds problem.

Change-Id: Ic4e969669cadd3e9f59a587d7d075e130f5cd869
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Git-commit: f8db65fe4336baf818dde5d226eb3d35773e2371
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
2017-05-24 20:10:26 -07:00
Hans Verkuil
d6ffac796e [media] cec.h/cec-funcs.h: add option to use BSD license
Like the videodev2.h and other headers, explicitly allow these headers
to be used with the BSD license.

Change-Id: I8f9ae52ed90337ca1f697dbf310a774f50eb154d
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Git-commit: 12655445a2adc292db3352bbe80e43bd243517aa
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
2017-05-24 20:10:14 -07:00
Hans Verkuil
7dbff1a435 [media] cec-adap: on reply, restore the tx_status value from the transmit
When a reply to an earlier transmit is received, the tx_status of that
transmit needs to be restored. Otherwise the status that the transmit
was successful would be lost.

Change-Id: I53fac6d2346a88a8f93503952bd9e2c3c9bae5e6
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Git-commit: 7b12b47f78e458ea90cc350bc7a4b9385eef897a
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
2017-05-24 20:09:52 -07:00
Hans Verkuil
d880cf55fb [media] cec/TODO: add TODO file so we know why this is still in staging
Explain why cec.c is still in staging.

Change-Id: I1ff8da66df09e8e25dc8d4c8d787a9e3d14ce48c
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Git-commit: 56967c77d4c22bb31dbf18cc058147f4df433dd7
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
2017-05-24 18:48:06 -07:00
Hans Verkuil
97dc968939 [media] cec: add HDMI CEC framework (api)
The added HDMI CEC framework provides a generic kernel interface for
HDMI CEC devices.

Note that the CEC framework is added to staging/media and that the
cec.h and cec-funcs.h headers are not exported yet. While the kABI
is mature, I would prefer to allow the uABI some more time before
it is mainlined in case it needs more tweaks.

This adds the cec-api.c source that deals with the public CEC API
and the Kconfig/Makefile plumbing.

The MAINTAINERS file is also updated.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
[k.debski@samsung.com: code cleanup and fixes]
Signed-off-by: Kamil Debski <kamil@wypas.org>

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Git-commit: ca684386e6e21ba1511061f71577cdb6c3f2b3d3
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
Change-Id: Ie0ac63f18e51cab0e920f9c6c618563faf57a83c
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
2017-05-25 09:37:45 +08:00
Fenglin Wu
b667d795e7 ARM: dts: msm: Specify SC interrupts for LAB/IBB in pmi8998
Specify short circuit (SC) interrupts for LAB/IBB so that the driver can
attempt re-enabling the module after PBS disables it for SC protection.
Interrupts are disabled by the driver if SC happens frequently so that
the module is kept disabled.

CRs-Fixed: 2002373
Change-Id: Idb6fdc4845aebb7133c210dd03ff77a167de5d69
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
2017-05-24 17:37:04 -07:00
Yuanyuan Liu
cfc60f45a2 icnss: Free regread buffer before allocating new one
Free already allocated buffer before allocating new one
to avoid memory leak when someone keep writing to this file
but never read it.

CRs-Fixed: 2051862
Change-Id: I29784fb30ea8eed315b7d073d35480972642bc55
Signed-off-by: Yuanyuan Liu <yuanliu@codeaurora.org>
2017-05-24 14:08:16 -07:00
Yuanyuan Liu
568d62f565 icnss: create debugfs entries when CONFIG_ICNSS_DEBUG is enabled
Other than stats every debugfs entry should be under
CONFIG_ICNSS_DEBUG so that we don't enable these on
build which doesn't have debugging support.

CRs-Fixed: 2051871
Change-Id: I336f449313bb1f0f8af4e82f40869f65f58d9f4e
Signed-off-by: Yuanyuan Liu <yuanliu@codeaurora.org>
2017-05-24 14:06:08 -07:00
Hemant Kumar
6b3091381b usb: pd: policy_engine: Disable vconn first upon disconnect
Currently vconn is getting disabled late after disabling vbus.
This is causing failure if type-C compliance TD.4.8.3(DRP Connect
Alternate Mode), as delay is disabling vconn goes above 35ms.
Fix the issue by moving vconn disable as first step upon receiving
disconnect notification. Also, making policy engine workqueue as high
priority workqueue to be able to run state machine work with lower
latency.

Change-Id: If9a979b4cc5bab3aa2ebf42397c36e5b434b50b9
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
2017-05-24 13:38:00 -07:00
Yuanyuan Liu
8ac6a6b668 icnss: Change debugfs permission
Change debugfs permission to allow root only access to those files.

CRs-Fixed: 2051867
Change-Id: I4bef907f8cbe39169b38e4f19072a0628e199691
Signed-off-by: Yuanyuan Liu <yuanliu@codeaurora.org>
2017-05-24 12:10:38 -07:00
Sujeev Dias
632e3c71d3 mhi: core: fix potential buffer overflow
Fix a potential buffer overflow that could occur
during firmware download by storing buffer address
locally instead of inside MHI context.

CRs-Fixed: 1109397
Change-Id: If27ba602cdafdc8d25a94fdc0d74e8970bf0b0f4
Signed-off-by: Sujeev Dias <sdias@codeaurora.org>
2017-05-24 11:28:32 -07:00
Olav Haugan
1680fdcf04 defconfig: msmcortex: Enable hardened user copy
Hardened user copy provides an extra layer of security checks when
copy_to_user/copy_from_user APIs are used to ensure data accesses are
valid. When invalid accesses are detected the kernel will forcibly
crash.

Change-Id: Ia0529c67da84017ea91a72427db008737d3c5dbd
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
2017-05-24 10:21:41 -07:00
Siddartha Shaik
34fa162a86 ASoC: msm: Convert ALSA to ADSP format
In transcode loopback session open, ALSA to ASM format conversion is
incorrect. Update the format based on ASM defined formats.

CRs-Fixed: 2049714
Change-Id: Ie5ddb6a58a30b0d6b78bfc68cbbbcd3d92f28fb1
Signed-off-by: Siddartha Shaik <sshaik@codeaurora.org>
2017-05-24 19:07:23 +05:30
Derek Chen
f5f7677719 ASoC: msm: qdsp6v2: set voc type according to stream type
Set voc path type according to stream type during routing
preparation for voice session to fix uninitialized voc
path type causing voc device port configuration failure.

CRs-fixed: 2045461
Change-Id: I4983ba55b1854879680b6d13c33904a522092eb0
Signed-off-by: Derek Chen <chenche@codeaurora.org>
2017-05-24 05:59:14 -07:00
Paul Zhang
e184fd8d15 cnss: save the cc source to platform driver
There is a design limitation in host driver. Driver
sends regulatory_hint_user for both user-space and
11d country to kernel. So when wiphy re-registration
happens, kernel tells the source as USER even for 11d.
And per driver logic the 11d needs to be disabled
if INI gCountryCodePriority is set.

To mitigate this issue, storing the country source
in the platform driver.

CRs-Fixed: 2051651
Change-Id: I335a046a886ac3ce35cf96eb71231bfe75d33c60
Signed-off-by: Paul Zhang <paulz@codeaurora.org>
2017-05-24 05:53:23 -07:00
Trishansh Bhardwaj
b37fcc6401 msm: camera: Align smmu mapping len to 128M.
In 32 bit system mapping len should be 128M aligned.

Change-Id: I41550e65ebd6c4cde7a4c5f7144ce57b7b8cdb91
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
2017-05-24 16:45:01 +05:30
Sahitya Tummala
b8189b1707 mmc: core: extend SDR104 workaround for other paths
UHS-I SD cards support SDR104 mode which runs the SD card interface
clock upto 208 MHz. But we may see repeated CRC errors in SDR104
with some SDCC controllers. If this happens, commit <aafc430b36f3>
("mmc: sd: reduce the bus speed in case of multiple CRC errors") would
reinit the card to lower speed (SDR50) hoping that CRC error
rate would reduce at lower clock speed (100MHz for SDR50). As the error
may happen for any cmd, this change tries to fix several other paths -
clock scaling, mmc_rescan, non-data commands error path.

Change-Id: I8ccbbf7e330cde3862d9660d3be4d67fb00d97ca
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Signed-off-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org>
2017-05-24 15:51:09 +05:30
Neeraj Upadhyay
ca48474457 Revert "arm: cpu: read all address cells in dt for cpuid"
This reverts commit e6855ed3fe ("arm: cpu: read all
address cells in dt for cpuid"). The address cells read
issue is fixed in upstream commit c84cc7b906 ("ARM:
8616/1: dt: Respect property size when parsing CPUs"),
and both changes conflict and break the parsing of address
cells.

Change-Id: Iafd918ce8623ceb0c701df15bbdbccba165c89dd
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
2017-05-24 15:33:18 +05:30
Walter Yang
8166e48761 ARM: dts: msm: add audio support for HDK660/630 boards
Add support for required node for audio of HDK660/630 boards
with tasha codec.

Change-Id: I1b5acb70d4fb8e8e4958ffafb2b83c16df1d933c
CRs-Fixed: 2047107
Signed-off-by: Walter Yang <yandongy@codeaurora.org>
2017-05-24 03:03:05 -07:00
Andy Sun
34af16a207 ais: always do clock set_rate after get_rate
Before clock enable, should always set rate firstly for safety,
in case the value after get rate changes.

Change-Id: I6985d9ab413012e988434ee3a8ea78b0beb803d2
Signed-off-by: Andy Sun <bins@codeaurora.org>
2017-05-24 02:33:42 -07:00
Shilpa Mamidi
5ecf5fc788 msm: camera: clean up buffers before detach
Currently unmap of buffers is done in destroy.
But we need to unmap buffers before we detach.

Change-Id: I46fc31c688f7024a0fe772048b3a0da820369273
Signed-off-by: Shilpa Mamidi <shilpam@codeaurora.org>
2017-05-24 01:05:39 -07:00
Maulik Shah
4b12a8cc34 genirq: Use irq_set_affinity_locked to change irq affinity
Currently PM QoS is not getting notifications if irq affinity
is changed by core isolation with irq_do_set_affinity.

Use irq_set_affinity_locked instead to get notifications when
updating affinity.

Change-Id: Iab745a23637d9353f730ca77ac7e92cf61b1bf67
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
2017-05-24 12:44:23 +05:30
Ashay Jaiswal
e697192c09 qpnp: smb2: fix ICL recovery mechanism
ICL recovery mechanism is used by user space daemon
to recover from adapter collapse during voltage increment
event by reducing the USB ICL. There could be a situation
where nobody votes on usb_icl_votable and this could lead
to a negative ICL value.
Fix this by reading "HW_CURRENT_MAX" property to get ICL in
situations where usb_icl_votable is not voted by any client,
this ensures ICL reduction will always vote a valid ICL.

CRs-Fixed: 2048330
Change-Id: I8e53a945530c1685aaaba0537d16ac5fb11858df
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
2017-05-23 23:22:42 -07:00
Ashay Jaiswal
ebb7ac6bd4 qpnp-smb2: update AICL rerun logic for PM660
Current AICL re-run design for PM660 uses AICL restart mechanism
which starts AICL algorithm from Min ICL value to the configure ICL
value one step (25mA) at a time, this adds considerable amount of
delay for algorithm to reach a settled ICL value. Fix this by using
PMI8998 based AICL re-run design.

Change-Id: I84f612c275fa0d9785a6688a56c9da90df1b86d4
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
2017-05-23 23:22:29 -07:00
Terence Ho
2d1568326e msm: ais: Add regulator enable and disable independent of CSID
Regulator enable and disable of CSIPHY depends on the CSID module.
Make the enable and disable of clk regulator independent of CSIPHY.

Change-Id: Id635b0dfd04a79bac580689a0da8592c6ff87661
CRs-Fixed: 1107702
Signed-off-by: Terence Ho <terenceh@codeaurora.org>
Signed-off-by: Andy Sun <bins@codeaurora.org>
2017-05-24 11:26:22 +08:00
Maya Erez
51a3d8babe msm_11ad: define ops_keep_radio_on_during_sleep as static
Define ops_keep_radio_on_during_sleep as static as it is used
only in msm_11ad context.

Change-Id: Id95579961ce5cdd3fbdf063578bd4d9144f8a725
Signed-off-by: Maya Erez <merez@codeaurora.org>
2017-05-23 22:26:25 +03:00
Chris Lew
a3b6b4e493 soc: qcom: glink: Add new APIs to toggle RX thread priority
Low latency use cases are failing because glink RX thread to handle
the TX Done command is not being scheduled during high system load.
These new APIs allow clients to specify if they need the RX glink
thread to be Realtime

CRs-Fixed: 2050701
Change-Id: I6bd4023394e9ee617797826687f34abaee3fe65d
Signed-off-by: Chris Lew <clew@codeaurora.org>
2017-05-23 10:45:33 -07:00
Ashish Garg
5d1a271056 msm: mdss: ensure clocks are on till pixel transfer is completed
When pixel transfer is going on, there is a race condition during
which pixel clock can get turned off due to early clock gating
before CMD_MDP interrupt is triggered which can cause interrupt
storm. This change ensures CMD_MDP interrupt is received before
turning off clocks.

Change-Id: I33b664334912584170c12733329051b067c3f1da
Signed-off-by: Ashish Garg <ashigarg@codeaurora.org>
2017-05-23 18:38:25 +05:30
Rashi Bindra
9e8ba0aa51 msm: mdss: Call regulator enable/disable for both DSI controllers
There is ref count mismatch in number of enable/disable calls for
regulators with low power mode allowed flag which is resulting in
random system crashes. This change makes sure number of enable/disable
calls are same.

Change-Id: I0c1906df8c3a83e8740412c272179d3d9c514c0e
Signed-off-by: Rashi Bindra <rbindra@codeaurora.org>
2017-05-23 18:03:23 +05:30
Varun Balaraj
4d6a4de9ef ARM: dts: msm: Enable the quat mi2s in slave mode on apq8098 mediabox
Configure quat mi2s in slave mode. Create quat mi2s node and
add the pincontrols to be used for data lines.

Change-Id: Ib0a06389941f09014c0f872d3643251859eb6a6b
Signed-off-by: Varun Balaraj <varunb@codeaurora.org>
2017-05-23 04:28:35 -07:00
Siddartha Shaik
a98696f1f5 ASoC: msm: Add IEC_61937_FMT_UPDATE event
DSP sends IEC_61937_FMT_UPDATE_EVENT event to notify
audio format change during HDMI in loopback usecase.

CRs-Fixed: 2049714
Change-Id: Ifb8565cbe7e7755b891588cd206293daa9300ce4
Signed-off-by: Siddartha Shaik <sshaik@codeaurora.org>
2017-05-23 04:03:38 -07:00
Maya Erez
fcb6badf0b ARM: dts: msm: enable 11AD keep-radio-on-during-sleep on MSM8998
keep_radio_on_during_sleep allows reserving the 11AD connections
during suspend.
In such a case PCIe will suspend to D3hot and the device power
will not be turned off.

Change-Id: I04eed7802256c48ef9f39e7dc4e3b1a5386eb3c7
Signed-off-by: Maya Erez <merez@codeaurora.org>
2017-05-23 13:33:58 +03:00
Deepak Kumar
0e42ef24c9 msm: kgsl: Return mementry only if pending_free is not set
Return mementry from kgsl_sharedmem_find only if pending_free
is not set for that mementry. This is necessary to avoid use
of a mementry after it is already marked for free.

Change-Id: I23111e9c82a88ccbda2ab259074c38d91f9ff5cb
Signed-off-by: Deepak Kumar <dkumar@codeaurora.org>
2017-05-23 02:56:36 -07:00
Fenglin Wu
c21a36f4bd regulator: qpnp-labibb-regulator: Restart LAB/IBB after SC fault
PBS will be triggered in PMIC hardware to disable LAB/IBB regulators
when a SC(short circuit) error is happened. The regulators won't be
restart in hardware and they will be kept disabled always after that.
Restart LAB/IBB regulator in the software if SC IRQ is detected, but
stop doing this if the SC IRQ had fired frequently.

CRs-Fixed: 2002373
Change-Id: I5db2b70999d043395e070bc9d61015477455cce9
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
2017-05-23 15:15:50 +05:30
Tanvi Aggarwal
7717905408 msm: camera: sensor: Change REFGEN for DPHY CLK/DATA to internal bias
Changing REFGEN for DPHY CLK/DATA to internal bias as suggested
by hardware team for a rarely seen line noise issue on msm8998
platform.

CRs-Fixed: 2037215
Change-Id: I37a40db8b3d2abba934c049f8ab49e0b977877f2
Signed-off-by: Tanvi Aggarwal <tanvia@codeaurora.org>
2017-05-23 00:53:36 -07:00