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>
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>
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>
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>
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>
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>
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>
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>
Add board-id for UFS board which has a different board sub type.
Change-Id: I34963569b793a017f2e67298eb615b1d59a3c9ba
Signed-off-by: Arun KS <arunks@codeaurora.org>
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>
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>
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>
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>
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>
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>
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>
Initialize mutex before using in irq handler.
CRs-fixed: 2047720
Change-Id: I5ebfbc22f2a64dde239fcbb13eb26be50543b484
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>