Commit graph

590235 commits

Author SHA1 Message Date
Prabhakar Reddy Krishnappa
c3f5cca88f msm: vidc: Cancel userptr validation during secure decode
Secure decode doesn't need userptr and uses ion fd instead. We were
conducting userptr validation regardless of the decode mode (secure/
unsecure). This forced user to populate userptr with a dummy value
during QBUF in secure mode decode on both output and capture ports
to avoid a userptr validation fail.

CRs-Fixed: 2049213
Change-Id: I0060efb52792201a2634072f648a537ebb02d17c
Signed-off-by: Prabhakar Reddy Krishnappa <prkrishn@codeaurora.org>
2017-05-18 17:43:17 -07:00
Yan He
327affb35f msm: pcie: add IOMMU_DEVICE for MMIO mapping
PCIe bus driver maps registers to IOVA. So add IOMMU_DEVICE flag for
the mapping here.

Change-Id: Idfeb43ac0f93c68082f308d0db744a65f0c65f41
Signed-off-by: Yan He <yanhe@codeaurora.org>
2017-05-18 17:23:15 -07:00
Ramprasad Katkam
8f0c7ae73c ASoC: APR: Fix missing APR deregister from asm
APR deregister is to be called for two ports from both
q6asm_callback(during RESET) and q6asm_audio_client_free.
In race condition between the two, APR deregister is called
only for one port. The mismatch in apr register-deregister
count causes apr not to reset service after ssr, causing
APR communication failure.

Change-Id: Ibd0528215bf2fb986eda03ae0d683b2af31358fe
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
2017-05-18 21:59:39 +05:30
Vijayavardhan Vennapusa
c20c74d49c ARM: dts: msm: Remove TCSR_QUSB2_PHY_CLAMP_DIG_N_1P8 for SDM660
Remove TCSR_QUSB2_PHY_CLAMP_DIG_N_1P8 resource entry for SDM660
which is not required to set now during disconnect as writing to this
register causes USB3.0 port and USB2.0 ports working independently.

Change-Id: Ifb91c4e493ca1ecd31ef649c9e85acd809b9eec6
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
2017-05-18 18:34:47 +05:30
Vijayavardhan Vennapusa
3962558023 usb-phy-qusb: powerdown PHY during disconnect to avoid leakage
Currently PHY driver is using TCSR_QUSB2PHY_CLAMP_DIG_N_1P8 register
to avoid leakage issue seen during disconnect. But this could fail
USB ports working independently if this register is used as that
could clamp both inputs going to two QUSB2 PHY on platforms having
USB2 port. To fix this, it is recommended to powerdown QUSB2 PHY
by setting powerdown bit in  QUSB2PHY_PORT_POWER_DOWN register
during disconnect and removing writing 0x0 to TCSR register. Removed
updating TCSR register from dts file as separate change.

Change-Id: I6b0915faa346e5d88310106eeddb3c7a1bfb1d08
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
2017-05-18 18:33:56 +05:30
Vijayavardhan Vennapusa
74fd4e30fc USB:dwc3-msm: Don't schedule work if pm_qos_latency is zero
Currently driver is scheduling pm_qos_work again even though
pm_qos_latency is not passed from dts file. Add a check for
pm_qos_latency and don't schedule work if pm_qos_latency value
is zero. Also remove use of static variable for last_irq_count and
add the variable for the same in dwc3 structure for the case where
multi DWC3 usages are used.

Change-Id: I55e1e3a7d48fbea0a421802aae176ac57a48869f
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
2017-05-18 18:31:53 +05:30
Mukesh Ojha
81f3b9aab8 coresight-tmc: Adds lock to avoid race condition
There can be a case of race in the call to tmc_etr_bam_disable(). The call
from usb_notifier() to tmc_etr_bam_disable() is within a lock
'drvdata->mem_lock' but the call from tmc_disable is not under any lock
which can lead to race.

This patch adds the missing lock.

CRs-Fixed: 2047196
Change-Id: I3986b498ae8e2b2ddfe8f5b3315fdefab197d11c
Signed-off-by: Mukesh Ojha <mojha@codeaurora.org>
2017-05-18 17:52:26 +05:30
Tharun Kumar Merugu
6e853a66c3 SDM660: ADSPRPC: Fix for NULL pointer dereference
Fixing NULL pointer dereference in fastrpc_device_ioctl

Change-Id: I240e6eae69f9ab4831352a8bf160d5f0e8a98b1b
Acked-by: Chenna Kesava Raju <chennak@qti.qualcomm.com>
Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org>
2017-05-18 04:33:32 -07:00
Utkarsh Saxena
2931599ee9 msm: ipa: Fix post init in workqueue context
ipa post init is accessed from user space
context from ops structure.

While user space program triggered post init
there could be a chance, where the
user space context may get killed at any time,
due to which the memory allocation in post init
gets failed and in turn which clean up the
IPA driver.

Because the memory allocation of the
sigkill pending process will fail.

Make changes in ops structure write func-pointer to
queue a work instead of directly invoking post init.

So that ipa post init will execute in workqueue context.

Change-Id: Ia11b3a868d960111422c357bcc9924ef7b220e67
Acked-by: Mohammed Javid <mjavid@qti.qualcomm.com>
Signed-off-by: Utkarsh Saxena <usaxena@codeaurora.org>
2017-05-18 16:09:00 +05:30
Arun KS
616f419e9f ARM: dts: msm: Add support for MSM8996pro UFS based board
Add board-id for UFS board which has a different board sub type.

Change-Id: I34963569b793a017f2e67298eb615b1d59a3c9ba
Signed-off-by: Arun KS <arunks@codeaurora.org>
2017-05-18 03:09:15 -07:00
Narender Ankam
1b6484cec3 ARM: dts: msm: update AUX channel configurations for SDM630
Update Display Port's AUX channel configuration settings for SDM630.

Change-Id: I9712d24251a2d700f79de13cdeda76b7c980b721
Signed-off-by: Narender Ankam <nankam@codeaurora.org>
2017-05-18 15:22:22 +05:30
Vijayavardhan Vennapusa
0355a024aa policy_engine: Don't allow MODE change if no active connection
Currently driver is allowing MODE change even if there is no active
cable connection and is waiting for to complete.  For this MODE
change to complete,  driver first sets power role to none to do
type C disconnect and then switch to new mode.  Here disconnect won't
come as there is no active cable connection. Fix this issue by returning
error in case there is no active connection.

Change-Id: Ie423bd8b61ab7b2624f98c84e8d8e75b6c853b00
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
2017-05-18 02:25:22 -07:00
Saranya Chidura
8a36de60b6 coresight: fix the unbalanced qdss_clock count
In an unsuccessful STM driver registration, the qdss_clk
is disabled twice in the error path i.e once in amba_probe
and stm_probe. Removed the redundant disable of qdss_clk
from the stm_probe for correct functionality.

Change-Id: I5d2edef0d72384552203f9c922482f5fd9cddc31
Signed-off-by: Saranya Chidura <schidura@codeaurora.org>
2017-05-18 14:34:14 +05:30
Benjamin Chan
a2931ccf96 msm: mdss: Correct MDSS display wakeup time calculation
With DSC enabled in the panel interface, the horizontal pixel count is
smaller than the panel width due to the compression. Correcting the
time_of_line and total_line calculation by calling the proper macro.

CRs-Fixed: 2048339
Change-Id: I36c1b9d30d5a440dfef4b4638f4f3ebf807782c8
Signed-off-by: Benjamin Chan <bkchan@codeaurora.org>
2017-05-17 13:42:04 -04:00
Sudarshan Rajagopalan
11926cbd03 ion: fix logical-not comparison warning
Fixes compiler warning when a logical-not on a variable
is applied while comparing it with value zero.

Change-Id: I92aa16bd0d57a0d59ecd26eef1ac92220332998d
Signed-off-by: Sudarshan Rajagopalan <sudaraja@codeaurora.org>
2017-05-17 05:48:18 -07:00
Dedy Lansky
9e94fb237b msm_11ad: clear affinity hint upon low bus request
When driver calls ops_bus_request with high bandwidth requirement,
affinity of wil6210 interrupt is set to first big core. However this
setting is not cleared when driver lowers bandwidth requirement.
This causes WARN_ON_ONCE(desc->affinity_hint) upon wil6210 rmmod.

Fix this by clearing affinity hint upon low bandwidth request.

Change-Id: I87b6b7ec9b369b84a9d3724d92a821a1302d1f83
Signed-off-by: Dedy Lansky <dlansky@codeaurora.org>
2017-05-17 03:09:10 -07:00
Manish Dewangan
08d60a044e ASoC: msm: qdspv2: Rename HDMI drift mixer controls
Update HDMI drift mixer controls name to be aligned with
drift mixer controls for other devices(speaker, BT).

CRs-Fixed: 2036899
Change-Id: If7aa29ea9511b65de71ff12143a1c34d977de2b8
Signed-off-by: Manish Dewangan <manish@codeaurora.org>
2017-05-17 02:28:15 -07:00
Sayali Lokhande
37228adc27 ARM: dts: msm: Update ref-clk node for sdm660
As a part of 'commit 64db44d65e ("ARM: dts: msm:
move ref-clk from phy to ufs node in sdm660")',
ref-clk node is moved from phy to ufs and ref-clk
related property should be prefixed with "qcom,".
This change updates the same for sdm660 mtp so as
to turn-off the ref-clk supply when link is off.

Change-Id: Iee0fcaaaa34108c35d836d6136f8c1a0964f0fa4
Signed-off-by: Sayali Lokhande <sayalil@codeaurora.org>
2017-05-17 12:12:31 +05:30
Mohan Pallaka
9f117985b6 input: synaptics_dsx: fix mutex init
Initialize mutex before using in irq handler.

CRs-fixed: 2047720
Change-Id: I5ebfbc22f2a64dde239fcbb13eb26be50543b484
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
2017-05-16 19:57:28 -07:00
Linux Build Service Account
5404e35069 Merge "msm: ADSPRPC: Copy process name buffer to kernel space" 2017-05-16 16:08:16 -07:00
Linux Build Service Account
d573c819ea Merge "usb: gadget: f_cdev: Fix NULL pointer dereference in cser_free_inst" 2017-05-16 16:08:15 -07:00
Linux Build Service Account
40b99c3fae Merge "msm: mink: Avoid handling output params if TZ op returns an err" 2017-05-16 16:08:14 -07:00
Linux Build Service Account
b80accca68 Merge "defconfig: msm: Remove CONFIG_TIMER_STATS" 2017-05-16 16:08:13 -07:00
Linux Build Service Account
c9c69ae5d8 Merge "usb: phy: qusb: Support specifying vdda33 levels from device tree" 2017-05-16 16:08:12 -07:00
Linux Build Service Account
d4d28cb0ef Merge "ARM: dts: msm: Enable support for guest virtual platform" 2017-05-16 16:08:11 -07:00
Linux Build Service Account
0d8007824b Merge "ARM: dts: msm: always enable mdss_mdp node for msm8998 based MOB3 platform" 2017-05-16 16:08:08 -07:00
Linux Build Service Account
60b854cbaa Merge "msm: msm_bus: Add mutex to protect node_list" 2017-05-16 16:08:07 -07:00
Linux Build Service Account
05a7ad9638 Merge "msm_11ad: add support to PCIe D3hot in system suspend" 2017-05-16 16:08:05 -07:00
Hemant Kumar
29e527349b usb: phy-msm-qusb-v2: Add support for reference counting of regulators
Upon cable disconnect PMI calls qusb_phy_update_dpdm() to turn off phy
regulators before notifying vbus off to usb. As a result phy power down
sequence is executed with phy regulators turned off. This may result into
improper phy line state.  Fix this issue by adding a reference counter to
keep track of all regulator enable and disable requests and only disable
regulator when ref count becomes zero. Also add a mutex in
qusb_phy_enable_power() API to prevent any race condition in enabling and
disabling phy regulators between the callers i.e. PMI and phy driver.

Change-Id: I620f2b8cbf4f9271db81d5a517f1ee2a13c57f27
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
2017-05-16 15:40:09 -07:00
Hemant Kumar
1fb7012ac6 USB: phy: qusb: Turn on vdd along with 1p8/3p3 LDOs when PMI requests
QUSB PHY requires VDD, 1p8 and 3p1 regulators to remove any unwanted
pull downs on DP/DM lines. These pull downs may result in incorrect charger
detection by PMI. Avoid incorrect charger detection by turning on VDD,
1p8 and 3p1 whenever PMI requests DP/DM to be floating.

Change-Id: I27e68d5ebf2f49fb6571ad777318483f9c123407
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
2017-05-16 15:40:08 -07:00
Jack Pham
65620a280f ARM: dts: msm: Specify vdda33 voltages for QUSB PHY on msm8998
Specify LDO24 voltage as 2.4V for charger detection and 3.088V
for USB data.

Change-Id: I9f365caf89226f1ce0e28b07306906c5d83541fe
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2017-05-16 15:39:31 -07:00
Kees Cook
be814112fd time: Remove CONFIG_TIMER_STATS
Currently CONFIG_TIMER_STATS exposes process information across namespaces:

kernel/time/timer_list.c print_timer():

        SEQ_printf(m, ", %s/%d", tmp, timer->start_pid);

/proc/timer_list:

 #11: <0000000000000000>, hrtimer_wakeup, S:01, do_nanosleep, cron/2570

Given that the tracer can give the same information, this patch entirely
removes CONFIG_TIMER_STATS.

Change-Id: I66e06ae2d6e32c309824310d3d9bf54d1047eab1
Suggested-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Kees Cook <keescook@chromium.org>
Acked-by: John Stultz <john.stultz@linaro.org>
Cc: Nicolas Pitre <nicolas.pitre@linaro.org>
Cc: linux-doc@vger.kernel.org
Cc: Lai Jiangshan <jiangshanlai@gmail.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Xing Gao <xgao01@email.wm.edu>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Jessica Frazelle <me@jessfraz.com>
Cc: kernel-hardening@lists.openwall.com
Cc: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: Petr Mladek <pmladek@suse.com>
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Michal Marek <mmarek@suse.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Olof Johansson <olof@lixom.net>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-api@vger.kernel.org
Cc: Arjan van de Ven <arjan@linux.intel.com>
Link: http://lkml.kernel.org/r/20170208192659.GA32582@beast
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Git-commit: dfb4357da6ddbdf57d583ba64361c9d792b0e0b1
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[ohaugan@codeaurora.org: Fixed merge conflicts]
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
2017-05-16 14:16:43 -07:00
Olav Haugan
4d5aee4dae defconfig: msm: Remove CONFIG_TIMER_STATS
CONFIG_TIMER_STATS is no longer needed and the kconfig option
will be removed in subsequent commits.

Change-Id: I380f9f925332c594c9d500312a06713170e48505
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
2017-05-16 14:16:43 -07:00
Jack Pham
1974aed829 usb: phy: qusb: Support specifying vdda33 levels from device tree
The specific voltage levels for the vdda33 regulator may vary
depending on the target. Add an optional device tree property to
allow specifying a 3-tuple of voltages for minimum, operating
and maximum voltage levels. The minimum level is used when simply
powering on, whereas the operating level is used when initializing
the PHY.

Change-Id: Ia5d301efdb6964434a01264e7aa19421a41e98ca
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2017-05-16 14:04:05 -07:00
Vijay Ganti
e3b9125270 soc: qcom: msm_perf: Initialize Array elements
This change initializes the tmp array elements to
ensure no use of uninitialized variable. This was caught
through Static Analysis

Change-Id: Ibc01493e9f0ce1a492579b568fa7362cb3c3b1d7
Signed-off-by: Vijay Ganti <viganti@codeaurora.org>
2017-05-16 11:48:34 -07:00
Xiaoyu Ye
0c53b526c0 ASoC: msm-cpe: Fix range checking in function fw_name_store
The range checking between "WCD_CPE_IMAGE_FNAME_MAX" and
"copy_count" is off-by-one due to the size of array
"core->dyn_fname" is "WCD_CPE_IMAGE_FNAME_MAX". Subtract
one from the range checking to fix this issue.

Change-Id: I87fd55206f79ad7b13c3878f6642bf5579303b17
Signed-off-by: Xiaoyu Ye <benyxy@codeaurora.org>
2017-05-16 11:30:43 -07:00
Atul Raut
232eb2beda ARM: dts: msm: Enable support for guest virtual platform
Add device tree to support guest virtual machine on
msm kernel.

CRs-Fixed: 2000645
Change-Id: I4ca06c28c349dd533057b24fe6794a7c11a84cc6
Signed-off-by: Atul Raut <araut@codeaurora.org>
2017-05-16 11:26:20 -07:00
Hemant Kumar
d4d30d3827 usb: policy_engine: Close pd phy after exceeding SINK hard reset count
Exceeding sink hard reset count means no PD session active. Hence vote
to turn off PD phy regulator by closing the PD phy.

Change-Id: I2aaa3c9c7b651aec77e67139e3cdcbbf9437f091
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
2017-05-16 11:23:21 -07:00
Mukesh Ojha
9021973bac coresight-remote-etm: Adds missing lock to avoid race condition
We take a lock of drvdata->mutex and further wait on a lock
'drvdata->handle->handle_lock' in below path

remote_etm_disable => qmi_send_req_wait => qmi_encode_and_send_req

So, it is possible that while we wait on a handle lock in above mentioned
path The handle itself gets destroyed via below path

remote_etm_svc_exit => qmi_handle_destroy

and the handle is not valid anymore.

This patch adds lock drvdata->mutex at number of possible cases.

CRs-Fixed: 2045013
Change-Id: I4a5110630b78e551bab1b4f454d23aacd599c000
Signed-off-by: Mukesh Ojha <mojha@codeaurora.org>
2017-05-16 23:50:45 +05:30
Pratap Nirujogi
d8cee3f1eb msm: camera: cpp: Issue CPP HALT on page fault
Issue CPP HALT in SMMU IRQ context and terminate
smmu stall on CPP context bank. Debug information
captured in cam_smmu worker thread.

Drop frames on detecting page fault and report HW
error on completion of fault handling.

CRs-Fixed: 2042135
Change-Id: I22b8bd2879a9de5e8a92a94ee243604b7623cf27
Signed-off-by: Pratap Nirujogi <pratapn@codeaurora.org>
2017-05-16 19:23:08 +05:30
Linux Build Service Account
211854c904 Merge "drm/msm: remove mdp node entry" 2017-05-16 06:49:50 -07:00
Linux Build Service Account
6b2b446623 Merge "ath10k: Define structure for copy engine interrupt map for SNOC" 2017-05-16 06:49:49 -07:00
Linux Build Service Account
d4f5120c4c Merge "ARM: dts: msm: Update high-speed PHY parameters for QRD SDM660" 2017-05-16 06:49:48 -07:00
Linux Build Service Account
2a1bce6909 Merge "ARM: dts: msm: Update high-speed PHY parameters for QRD SDM630" 2017-05-16 06:49:47 -07:00
Linux Build Service Account
a03b6a8e6e Merge "soc: qcom: Fix checks for QMI response values" 2017-05-16 06:49:46 -07:00
Linux Build Service Account
7cc854b84e Merge "soc: qcom: fix to avoid memory allocation failures" 2017-05-16 06:49:44 -07:00
Linux Build Service Account
cf343cfb0f Merge "ASoC: msm: add support for new ADSP event APIs" 2017-05-16 06:49:43 -07:00
Linux Build Service Account
22ecb82ac2 Merge "defconfig: arm64: Enable UFSHCD_CMD_LOGGING flag" 2017-05-16 06:49:42 -07:00
Linux Build Service Account
e37dfc88a2 Merge "ASoC: msm: remove unused msm-compr-q6-v2" 2017-05-16 06:49:41 -07:00
Linux Build Service Account
fb8be73fa6 Merge "ARM64: Make KERNEL_TEXT_RDONLY depend on !DEBUG_RODATA" 2017-05-16 06:49:40 -07:00