Commit graph

594383 commits

Author SHA1 Message Date
Yuanyuan Liu
818cdc63ce icnss: Re-probe if driver probe returns error of defer
If wlan driver probe returns error of defer, platform driver will
try to recover by calling probe again. The maximun probe count
is 2.

CRs-Fixed: 2124152
Change-Id: Ic973d0f1d76fc59ce5950397d42a9e778cacaa5a
Signed-off-by: Yuanyuan Liu <yuanliu@codeaurora.org>
2017-10-12 11:12:45 -07:00
Linux Build Service Account
1fe630ed29 Merge "media: v4l2-compat-ioctl32: memset stack union in compat ioctl" 2017-10-12 05:07:53 -07:00
Linux Build Service Account
bc77e3808a Merge "power: fg-util: Wait for soc_update completion upon timeout" 2017-10-12 05:07:52 -07:00
Linux Build Service Account
0f28e22076 Merge "input: touchpanel: fix TP frozen when ST's TP firstly probe up" 2017-10-12 05:07:51 -07:00
Linux Build Service Account
52801d7b8b Merge "cnss2: Keep a default copy of PCI config space" 2017-10-12 05:07:50 -07:00
Linux Build Service Account
ffd41d0210 Merge "usb: gadget: gsi: Defer freeing memory on free_inst if in use" 2017-10-12 05:07:49 -07:00
Linux Build Service Account
f70b7ebdec Merge "mdss: dp: fix the NVID parameter calculation for Display Port" 2017-10-12 05:07:48 -07:00
Linux Build Service Account
ec03d77318 Merge "ARM: dts: msm: add the dtsi entries for DP PLL clocks for msm8998" 2017-10-12 05:07:46 -07:00
Sachin Grover
54dc15c14d ARM: dts: msm: Add verify flag in fs_mgr of vendor
Add verify flag in fs_mgr of vendor label to enable
verity on vendor partition for sdm630, sdm660 & msm8998.

Change-Id: I172b3f8da55059658bb0caff5c8b2cab905a21ad
Signed-off-by: Sachin Grover <sgrover@codeaurora.org>
2017-10-12 03:19:47 -07:00
Subbaraman Narayanamurthy
14148191af power: qpnp-fg-gen3: Use disable_irq_nosync for disabling interrupts
Delta battery SOC interrupt can fire during boot just after
registering the interrupts before disabling it through vote() on
delta_bsoc_irq_en_votable during driver probe. When this happens,
from the delta_bsoc interrupt handler, an attempt to disable the
interrupt can be made by fg_charge_full_update() if charge_done
is not set. This will in turn acquire the mutex lock of votable
while trying to do disable_irq() which needs synchronization.

Prevent this situation by using disable_irq_nosync() when
disabling the interrupts from votable callbacks.

CRs-Fixed: 2125269
Change-Id: I1b617c4afd39c544ce79f9396030b730c55445a7
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2017-10-11 22:02:19 -07:00
Subbaraman Narayanamurthy
4a28bdab12 power: fg-util: Wait for soc_update completion upon timeout
Currently, wait for soc_update completion is attempted once again
only when the wait is interrupted. Try waiting again even when it
is timed out. This should help IMA_ATOMIC transactions go through
reliably.

Change-Id: I8d31fc41020b8c05ff4d562ae205eaa278d7ffcb
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2017-10-11 22:02:14 -07:00
Jin Fu
b4b3c42c89 input: touchpanel: fix TP frozen when ST's TP firstly probe up
Set TP to display-unblank status when firstly probe up, so that
TP can detect interrupt and report touch event without press
power key.

Change-Id: I6e4ea48551463c6d0f747987d7c255987e3a11df
Signed-off-by: Jin Fu <jinf@codeaurora.org>
2017-10-11 20:23:17 -07:00
Linux Build Service Account
8ef07dcccc Merge "Revert "drm/msm: remove the right vlbank event from the event list"" 2017-10-11 20:04:15 -07:00
Linux Build Service Account
fedc53b80f Merge "ASoC: audio: add APIs to query for AVS version" 2017-10-11 20:04:14 -07:00
Liangliang Lu
c2a2c32438 usb: gadget: gsi: Defer freeing memory on free_inst if in use
In the case of gsi_free_inst() called, whole f_gst structure is freed.
GSI control related API like gsi_ctrl_dev_poll do not check if f_gsi
is freed or not, only check gsi_ctrl_port is NULL or not.

If GSI driver is opened by userspace, gsi_free_inst() is executed,
mark inst_exist to false but do not free instance structures and
deregister misc device until misc device is closed.

Besides, in the GSI control related API read/write/ioctl/poll,
check if GSI instance is freed or not.

Change-Id: I4245964989a1284f5180efb69b64bd63e9104059
Signed-off-by: Liangliang Lu <luliang@codeaurora.org>
2017-10-11 18:27:43 -07:00
Yue Ma
ded65f8511 cnss2: Add multiple recoveries support without WLAN host driver
In order to support multiple recoveries without WLAN host driver,
clear recovery flag properly for debug state and also move WLAN
host driver ops check to proper place during powerup and shutdown.

Change-Id: I8cb17a495f6106bd07fe29dba282d4168c9f7411
CRs-fixed: 2124999
Signed-off-by: Yue Ma <yuem@codeaurora.org>
2017-10-11 17:10:57 -07:00
Yue Ma
ae727e9755 cnss2: Keep a default copy of PCI config space
Since PCIe bus driver is going to deprecate msm_pcie_recover_config
API, PCIe device driver needs to keep a default copy of PCI config
space after PCI probe which will be used for recovering config space
for SSR and PCI linkdown recovery.

Change-Id: I4fb0db35770d616ad75b8b7329f99fd6a40e9385
CRs-fixed: 2124999
Signed-off-by: Yue Ma <yuem@codeaurora.org>
2017-10-11 16:42:36 -07:00
Linux Build Service Account
34f1071c18 Merge "locking/osq_lock: Fix osq_lock queue corruption" 2017-10-10 23:22:09 -07:00
Archana Obannagari
e4a984e181 msm: kgsl: Add a check for availability of RBBM timer clock
Before calling kgsl_pwrctrl_clk_set_rate(), make sure the
RBBM timer clock is available. This avoids warning messages
in the driver log.

Change-Id: I0cd21b7253c802e8522d570056c8aeda02729267
Signed-off-by: Archana Obannagari <aobann@codeaurora.org>
2017-10-10 22:51:31 -07:00
Abhinav Kumar
d0c6369c9d drivers/misc: dont send content stream type for HDMI sinks
Remove sending the content stream type message for HDMI sinks.
This message is applicable only for DP receivers.

Sending this message for HDMI sinks is a write to unknown
space which causes undefined behavior on some sinks.

Change-Id: Id4894021528c17ebaeb5818a2bdcf7ae9c91c070
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
2017-10-10 18:07:35 -07:00
Suresh Reddy Yellala
cb6aacb5fa Revert "drm/msm: remove the right vlbank event from the event list"
This reverts commit 792779946e.
This is reverted to fix the weston display.

Change-Id: Iff811f643a8756d6d0921a743736f1a535893883
Signed-off-by: suresh <suresh@codeaurora.org>
2017-10-10 12:34:52 -07:00
Linux Build Service Account
aefaae06af Merge "defconfig: arm64: msm: Enable boot time marker on virtual platform" 2017-10-10 09:40:11 -07:00
Linux Build Service Account
fe824263a9 Merge "diag: Flush mdlog table entries while reallocation of data buffer" 2017-10-10 09:40:10 -07:00
Padmanabhan Komanduru
72cdcba926 mdss: dp: fix the NVID parameter calculation for Display Port
The NVID programming for Display Port needs to be set to twice
the 'n' divider of the pixel clock RCG for 5.4 GHz link rate.
Add change to take care of this in Display Port driver.

Change-Id: Ied31f67372d9738e96d1d908acd96a02b82d4630
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
2017-10-10 19:01:20 +05:30
Padmanabhan Komanduru
4f10d5d018 ARM: dts: msm: add the dtsi entries for DP PLL clocks for msm8998
The parent of DP VCO divided mux clock needs to be set from the
Display Port driver based on the link rate. Add the dtsi entries
needs for this support for msm8998.

Change-Id: I76c2568579735f20106e40a359fd0052a2f51fbf
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
2017-10-10 18:23:25 +05:30
Padmanabhan Komanduru
54d865e483 mdss: dp: set the proper parent for dp_vco_divided_clk_mux
The DP VCO divided mux clock has two parent dividers div_two
and div_four. The parent for this needs to be set based on the
link rate frequency as per the hardware programming guide and
not based on the auto PLL calculation logic. Add support to set
the correct parent for this.

Change-Id: Ia2d340a4e8790d90161c1f4a7c8273449fa3f53c
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
2017-10-10 18:20:13 +05:30
Linux Build Service Account
517a989646 Merge "msm: mdss: read active line count before triggering ESD read" 2017-10-10 00:03:34 -07:00
Vijayavardhan Vennapusa
e2ed5d95d2 USB: rndis: Honor dl_max_packet_size value sent by host
This change starts using dl_max_packet_size value sent by host
as part of USB RNDIS init message communication. Using default
dl_max_packet_size value results into low throughput with more
data loss on host side as host side RNDIS can't support
de-aggregation (applicable for Linux Host RNDIS driver) or it
ignores received more data then host side RNDIS can handle. To
use fine tune dl_max_packet_size for better throughput, driver
selects minimum value between host supported dl_max_packet_size
and default size (i.e. 9216 bytes as RNDIS IN aggregation size).

Change-Id: I00c81bc905a032867c537536b01bf32584c37e63
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
2017-10-10 11:51:54 +05:30
Zhiqiang Tu
6cda4a38e0 defconfig: arm64: msm: Enable boot time marker on virtual platform
Enable boot time marker to profile booting time.

Change-Id: I236f5e9076e4138fdb871c40afaa4cb691386485
Signed-off-by: Zhiqiang Tu <ztu@codeaurora.org>
2017-10-09 19:41:59 -07:00
Linux Build Service Account
a7bf109995 Merge "cnss2: Add asynchronous probe support" 2017-10-09 16:00:05 -07:00
Linux Build Service Account
fbd8b44c40 Merge "msm: vidc: Support ioctl VIDIOC_ENUM_FRAMESIZES" 2017-10-09 16:00:04 -07:00
Linux Build Service Account
c27c3d3ce8 Merge "ARM: dts: msm: Add device for boot time marker on msm8996 virtual platform" 2017-10-09 07:36:57 -07:00
Linux Build Service Account
cc41ba8493 Merge "drm/sde: fix smmu fault while running DRM test" 2017-10-09 07:36:56 -07:00
Ashish Garg
5cf73b4ac4 msm: mdss: read active line count before triggering ESD read
In the current implementation before triggering ESD read,
DSI SW waits for extra time to skip display blanking period.
Add an additional check for active line count to ensure that
ESD read is always triggered during display active region only.

Change-Id: I5893daf7cdfb8c1d0a0e962eb2e37d7cd053a6a5
Signed-off-by: Ashish Garg <ashigarg@codeaurora.org>
2017-10-09 16:51:17 +05:30
Hardik Arya
7f2bebe85e diag: Flush mdlog table entries while reallocation of data buffer
Currently there is a possibility of accessing freed up buffer
address after reallocation due to availability of old address
in mdlog entry table. The patch flushes table entries before
reallocating data buffer. Additional case of entries cleanup
during erroneous buffer free avoiding further buffer corruption.

CRs-Fixed: 2063721
Change-Id: I8424598ad34b809414518a1f7f5b1737ebe51e53
Signed-off-by: Hardik Arya <harya@codeaurora.org>
2017-10-09 13:18:13 +05:30
kunleiz
1e40690dbd rtac: add size check when reading cal data kvaddr buffer
Add size check to ensure cal data bytes size fits inside
the cal date when copying to user space buffer.

CRs-Fixed: 2110256
Change-Id: I511999984684a9db4aaf1cf2c65eb1495c36980f
Signed-off-by: kunleiz <kunleiz@codeaurora.org>
2017-10-09 00:13:09 -07:00
Linux Build Service Account
6604cb543e Merge "wil6210: potential buffer overflow in wmi_evt_aoa_meas" 2017-10-07 09:46:46 -07:00
Linux Build Service Account
9dd28a9153 Merge "usb: gadget: CCID: Add support for SuperSpeed enumeration" 2017-10-07 01:38:03 -07:00
Linux Build Service Account
38b84c7081 Merge "msm: kgsl: Avoid cache ops on secure memory" 2017-10-07 01:38:01 -07:00
Linux Build Service Account
ee582d5f26 Merge "drm/msm: reset HDCP 2.2 sink support during disconnect" 2017-10-07 01:38:00 -07:00
Linux Build Service Account
ed2c8ee369 Merge "cnss2: Remove utils" 2017-10-07 01:37:59 -07:00
Lior David
62d33b113c wil6210: potential buffer overflow in wmi_evt_aoa_meas
The code in wmi_evt_aoa_meas can potentially overflow a data
buffer if the len parameter is smaller than
offsetof(struct wmi_aoa_meas_event, meas_data). Add protection
against this case.

Change-Id: I3f86f231e0c6b5ac54abbb9865cba0cbbd8d0448
Signed-off-by: Lior David <liord@codeaurora.org>
2017-10-07 00:15:50 -07:00
Prateek Sood
12d8cc1e35 locking/osq_lock: Fix osq_lock queue corruption
Fix ordering of link creation between node->prev and prev->next in
osq_lock(). A case in which the status of optimistic spin queue is
CPU6->CPU2 in which CPU6 has acquired the lock.

        tail
          v
  ,-. <- ,-.
  |6|    |2|
  `-' -> `-'

At this point if CPU0 comes in to acquire osq_lock, it will update the
tail count.

  CPU2			CPU0
  ----------------------------------

				       tail
				         v
			  ,-. <- ,-.    ,-.
			  |6|    |2|    |0|
			  `-' -> `-'    `-'

After tail count update if CPU2 starts to unqueue itself from
optimistic spin queue, it will find an updated tail count with CPU0 and
update CPU2 node->next to NULL in osq_wait_next().

  unqueue-A

	       tail
	         v
  ,-. <- ,-.    ,-.
  |6|    |2|    |0|
  `-'    `-'    `-'

  unqueue-B

  ->tail != curr && !node->next

If reordering of following stores happen then prev->next where prev
being CPU2 would be updated to point to CPU0 node:

				       tail
				         v
			  ,-. <- ,-.    ,-.
			  |6|    |2|    |0|
			  `-'    `-' -> `-'

  osq_wait_next()
    node->next <- 0
    xchg(node->next, NULL)

	       tail
	         v
  ,-. <- ,-.    ,-.
  |6|    |2|    |0|
  `-'    `-'    `-'

  unqueue-C

At this point if next instruction
	WRITE_ONCE(next->prev, prev);
in CPU2 path is committed before the update of CPU0 node->prev = prev then
CPU0 node->prev will point to CPU6 node.

	       tail
    v----------. v
  ,-. <- ,-.    ,-.
  |6|    |2|    |0|
  `-'    `-'    `-'
     `----------^

At this point if CPU0 path's node->prev = prev is committed resulting
in change of CPU0 prev back to CPU2 node. CPU2 node->next is NULL
currently,

				       tail
			                 v
			  ,-. <- ,-. <- ,-.
			  |6|    |2|    |0|
			  `-'    `-'    `-'
			     `----------^

so if CPU0 gets into unqueue path of osq_lock it will keep spinning
in infinite loop as condition prev->next == node will never be true.

Change-Id: I5f473433ae2e10308fa7b27680bf98530fe65b0d
Signed-off-by: Prateek Sood <prsood@codeaurora.org>
[ Added pictures, rewrote comments. ]
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: sramana@codeaurora.org
Link: http://lkml.kernel.org/r/1500040076-27626-1-git-send-email-prsood@codeaurora.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Git-commit: 50972fe78f24f1cd0b9d7bbf1f87d2be9e4f412e
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
2017-10-06 22:41:40 -07:00
Akshay Chandrashekhar Kalghatgi
23fdc17933 msm: vidc: Support ioctl VIDIOC_ENUM_FRAMESIZES
Changed ioctl VIDIOC_ENUM_FRAMESIZES behavior in conformance with
V4L2 specification to be able to query based on pixel format.

Change-Id: Ia5803341070d14335cbb939108575f835471a857
Signed-off-by: Akshay Chandrashekhar Kalghatgi <akalghat@codeaurora.org>
2017-10-06 14:10:52 -07:00
Linux Build Service Account
479d36e015 Merge "dwc3: msm: Notify -ETIMEDOUT always in case of floating charger" 2017-10-06 13:42:30 -07:00
Linux Build Service Account
df42ac7d5c Merge "msm: camera: Fix framedrop pattern and period" 2017-10-06 13:42:29 -07:00
Linux Build Service Account
2ba44c1ce1 Merge "iommu: fix smmu_secure_pool access list after free issue" 2017-10-06 13:42:28 -07:00
Linux Build Service Account
e119670334 Merge "msm: ipa: Add support for UL Firewall" 2017-10-06 13:42:27 -07:00
Linux Build Service Account
cf8e7e3850 Merge "msm: mhi_rmnet: set ifalias to unidentified_net_dev on error from MHI" 2017-10-06 13:42:26 -07:00
Linux Build Service Account
8480d22d5b Merge "msm: ipa: Add support for per client lan statistics" 2017-10-06 03:11:22 -07:00