Commit graph

586905 commits

Author SHA1 Message Date
Aravind Venkateswaran
81fc1566e2 msm: mdss: dp: gracefully handle cable disconnect
When the downstream DP device is physically disconnected, ensure
that all pending events are removed and the event thread is parked.
Reset all the software state so that subsequent connection events
are handled correctly.

CRs-Fixed: 2034023
Change-Id: Ie94b1da903b8e78509220e373bec4ff54026885c
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
2017-04-14 12:37:33 -07:00
Tatenda Chipeperekwa
0325fec74c msm: mdss: dp: fix handling of EDID extension blocks
Current implementation assumes that the first extension
block of the EDID data always has the CEA extension tag.
This is incorrect and can lead to incorrect parsing of
resolution data. Fix this by removing the hardcoding of
the extension tag for the first extension block.

CRs-Fixed: 2027108
Change-Id: I5ef4cdb186591e291b2217db7ccec6f942d79ca4
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2017-04-13 18:20:18 -07:00
Tatenda Chipeperekwa
5921f2095d msm: mdss: dp: read the DPCD if the AUX setting have changed
Trigger the reading of DPCD if there was a change in the AUX
configuration caused by a failure while reading the EDID.
This is required to ensure the integrity and validity
of the sink capabilities read that will subsequently be used
to establish the mainlink.

CRs-Fixed: 2006096
Change-Id: If3a51b5efd9124fd20dc9860e5f2cdb4e466a2c6
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2017-04-13 18:20:12 -07:00
Aravind Venkateswaran
853e762bd3 msm: mdss: dp: ignore PHY AUX stop error
Ignore the PHY AUX stop error if we receive this error
during an AUX transaction. We can safely ignore this
error and proceed to read the buffered data from the
hardware since this error happens after the data has
been received by the AUX controller hardware.

CRs-Fixed: 2006096
Change-Id: Idb3f0e59b572be565e7572db500699471665f287
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2017-04-13 18:20:06 -07:00
Aravind Venkateswaran
2104f5f66e msm: mdss: dp: fix programming sequence for aux transactions
Ensure that all previous interrupt status are cleared before
triggering a new aux transaction, and do not set the
NO_SEND_STOP request bit for read transactions to align with
the hardware programming recommendations.

CRs-Fixed: 2006096
Change-Id: Icc17ac7b09d70ab5b330189be38fa32e3bff850e
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2017-04-13 18:20:01 -07:00
Aravind Venkateswaran
22dadaed20 msm: mdss: dp: read edid data in shorter burst size
Each block of EDID data is usually 128 bytes long. Reading
each block in a single burst can sometimes result in incorrect
or corrupted data returned from the sink. Add support to read
EDID in shorter burst sizes and set the default burst size
to 16 bytes.

CRs-Fixed: 2006096
Change-Id: I681f2d2eb01de11eadc1857dd5089cbe35befad2
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2017-04-13 18:19:56 -07:00
Aravind Venkateswaran
fe847c64b0 msm: mdss: dp: fix EDID read sequence
Update the EDID read sequence to first write the offset to
request the appropriate EDID block prior to reading the EDID
block data. In addition, write the correct segment address
when reading more than two extension blocks.

CRs-Fixed: 2006096
Change-Id: Ic4b2bd4d4cf9da5e247c5735b4e768b9e2b87b27
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2017-04-13 18:19:49 -07:00
Aravind Venkateswaran
f5e769987f msm: mdss: dp: retry failed AUX transactions
Retry AUX read/write transactions that have failed either due
to the AUX controller hardware indicating an error via the ISR,
or due to a software based timeout while waiting for transaction
completion. The transaction retry strategy is as follows: first
repeat the transaction using the same PHY AUX settings, and then
retry the transaction using updated PHY AUX settings if repeating
the transaction has failed.

CRs-Fixed: 2006096
Change-Id: Id9c3c7ae1ab320540545b9c178d947a3cd023079
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2017-04-13 18:19:44 -07:00
Tatenda Chipeperekwa
9b87a5068e msm: mdss: dp: update parsing of AUX controller configurations
Make the parsing of the AUX controller configurations more
extensible by adding support for multiple settings per configuration,
as well as the parsing of the register offsets. This enables the
extension to support different targets, and combinations of AUX
controller settings depending on the use case.

CRs-Fixed: 2006096
Change-Id: I4e6b623a4d9fafcfcc89477dfa57880eb798c350
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2017-04-13 18:19:36 -07:00
Aravind Venkateswaran
7d8800fa4d msm: mdss: dp: increase AUX controller hardware timeout limits
Increase the AUX controller hardware timeout limits to the
maximum value supported. This increases the AUX controller
hardware's robustness in handling transactions in the face
of differing timing from one DisplayPort sink to another.

CRs-Fixed: 2006096
Change-Id: Ia0da13720526a96f3a88a849043a3ffbb1185cf7
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2017-04-13 18:19:30 -07:00
Aravind Venkateswaran
f8c32514eb msm: mdss: dp: add interrupt handling for PHY AUX errors
Add interrupt handling for PHY AUX errors that might
happen during AUX communication. Read the interrupt
status and clear it before initiating the next AUX
transaction. This will help identify any issues that
result in AUX transaction failures.

CRs-Fixed: 2006096
Change-Id: I0733bfb163c8c3c108002fbe4309e36dc105ccb8
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2017-04-13 18:19:21 -07:00
Aravind Venkateswaran
61ac76cfad msm: mdss: dp: fix handling of branch devices
A branch device usually notifies a change in downstream connections
using the HPD IRQ pulse. Handle this by checking for a change in
downstream sink count and appropriately handling EDID reads. It is
also possible that the branch device may not have any local EDID.
In such cases, when the downstream sink count is zero, do not read
EDID.

CRs-Fixed: 1112711
Change-Id: I230560c995d7c3b395e37aef5483e5468e1d1dec
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
2017-04-13 18:19:17 -07:00
Tatenda Chipeperekwa
a2de6652c1 msm: mdss: dp: implement failsafe for delayed power off/on events
Implement a failsafe mechanism that will prevent the DisplayPort
driver from entering an irrecoverable state in the face of
delayed power off/on events from the display framework. For example,
the driver must indefinitely postpone the handling of other events
from the sink until the power off event is complete, ensuring that
there is no interleaving of events that could lead to a bad state,
or un-clocked register access.

CRs-Fixed: 2006096
Change-Id: I1bfa887ba5ee94cbf44c87aa0d60766cafc854b4
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2017-04-13 18:19:11 -07:00
Aravind Venkateswaran
3d11494de7 msm: mdss: dp: always set default resolution
EDID utility always lists the default resolution as part of the list
of available modes. If the client does not specify a default resolution
it can result in incorrect behavior. Ensure that the Display Port
driver always initialized with a default resolution.

CRs-Fixed: 2030915
Change-Id: Ib6c75d655e6fcbd5c792ca1aa9da6b08ba2f416e
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
2017-04-13 18:16:54 -07:00
Tatenda Chipeperekwa
48e69387e5 msm: mdss: dp: skip transfer unit setup on link training requests
Skip the transfer unit setup and the routine to wait for the
video ready interrupt as link training tests do not require
video frames to be sent.

CRs-Fixed: 2006096
Change-Id: Ibf9cda18f8740890f384b1d99f8d00b4692ab74d
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2017-04-06 11:41:08 -07:00
Linux Build Service Account
c19af183fc Merge "clk: mdss: adjust PLL disable sequence to avoid glitch" 2017-04-05 20:21:33 -07:00
Linux Build Service Account
6728c13839 Merge "scsi: ufs: fix error handing during hibern8 enter" 2017-04-05 20:21:32 -07:00
Linux Build Service Account
66f971f385 Merge "msm: ipa: continue probe on ipc log failure" 2017-04-05 20:21:32 -07:00
Linux Build Service Account
f79238754a Merge "msm: mhi_rmnet: add support for shutdown and system error notification" 2017-04-05 20:21:30 -07:00
Linux Build Service Account
50ae8d5cff Merge "leds: qpnp-flash-v2: Fix some issues" 2017-04-05 20:21:29 -07:00
Linux Build Service Account
38cb972517 Merge "usb: gadget: gsi: Fix incorrect repsonse available notifications" 2017-04-05 20:21:29 -07:00
Linux Build Service Account
0afdb965c7 Merge "icnss: Make driver register asynchronous to probe" 2017-04-05 20:21:28 -07:00
Linux Build Service Account
2e1b1eb1e5 Merge "ASoC: wcd934x: add null check for soundwire control data" 2017-04-05 20:21:27 -07:00
Linux Build Service Account
ad7c7b10d1 Merge "smb138x: support usbin-usbin with external rsense" 2017-04-05 20:21:26 -07:00
Abhinav Kumar
3a757d0376 clk: mdss: adjust PLL disable sequence to avoid glitch
Adjust the PLL disable sequence as per the latest HW
programming guidelines to ensure there will not be any
stray clock glitches when PLL is turned OFF abruptly.

Change-Id: I6df35bbe18b0c42b43f38b9dd85c3502b2038928
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
2017-04-05 16:48:34 -07:00
Abhinav Kumar
b2e934426e clk: mdss: re-program PLL registers to power-on-reset value
When the supply to PLL digital domain is turned off,
it can result in certain PLL registers to get corrupted.

Make sure to re-program the PLL registers to the
power-on-reset value before starting to program the PLL again
to ensure that it locks reliably.

Change-Id: I63cac884cf11eae60b187f83654f5922a3342d66
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
2017-04-05 16:46:27 -07:00
Subhash Jadavani
a115b29aaa scsi: ufs: fix error handing during hibern8 enter
During clock gating (ufshcd_gate_work()), we first put the link hibern8 by
calling ufshcd_uic_hibern8_enter() and if ufshcd_uic_hibern8_enter()
returns success (0) then we gate all the clocks.
Now let’s zoom in to what ufshcd_uic_hibern8_enter() does internally:
It calls __ufshcd_uic_hibern8_enter() which on detecting the LINERESET,
initiates the full recovery and puts the link back to highest HS gear and
returns success (0) to ufshcd_uic_hibern8_enter() which is the issue as
link is still in active state due to recovery!
Now ufshcd_uic_hibern8_enter() returns success to ufshcd_gate_work() and
hence it goes ahead with gating the UFS clock while link is still in active
state hence I believe controller would raise UIC error interrupts. But when
we service the interrupt, clocks might have already been disabled!

This change fixes for this by returning failure from
__ufshcd_uic_hibern8_enter() if recovery succeeds as link is still not in
hibern8, upon receiving the error ufshcd_hibern8_enter() would initiate
retry to put the link state back into hibern8.

Change-Id: Ib550fb791fa4c582b8f2d317a7f5f7594acb0872
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
2017-04-05 16:42:41 -07:00
Sujeev Dias
371e2918df msm: mhi_rmnet: add support for shutdown and system error notification
Add support to handle system error and shutdown notification
from MHI host.

CRs-Fixed: 2022936
Change-Id: Id36097dffd7571490d7d53d2e496bfe024702a42
Signed-off-by: Sujeev Dias <sdias@codeaurora.org>
2017-04-05 13:59:33 -07:00
Linux Build Service Account
a3851309db Merge "msm: mdss: dp: fix notifications for link training tests" 2017-04-05 12:17:10 -07:00
Linux Build Service Account
d850fccd93 Merge "ARM: dts: msm: Update MDSS max mixer/pipe width for sdm630" 2017-04-05 12:17:09 -07:00
Linux Build Service Account
bfdd19a48e Merge "crypto: msm: Use appropriate logging function" 2017-04-05 12:17:08 -07:00
Linux Build Service Account
9e160e7f8b Merge "qcom: smb1351: update CHARGING_ENABLE reporting logic" 2017-04-05 12:17:04 -07:00
Linux Build Service Account
8f91cc1fa4 Merge "power_supply: add HW_CURRENT_MAX power_supply property" 2017-04-05 12:17:03 -07:00
Linux Build Service Account
6e2c59ad47 Merge "ARM: dts: msm: add regulators and clk in icnss device node for sdm630" 2017-04-05 12:17:02 -07:00
Linux Build Service Account
c9b6da0d6c Merge "sdm660: ADSPRPC: Null check file session ctx during mmap create" 2017-04-05 12:17:01 -07:00
Linux Build Service Account
3016150b12 Merge "ARM: dts: msm: add regulators and clk in icnss device node for sdm660" 2017-04-05 12:17:00 -07:00
Linux Build Service Account
17e5e6be4b Merge "ARM: dts: msm: update itech and st1031ga battery profile parameters" 2017-04-05 12:16:59 -07:00
Linux Build Service Account
bbc2d362eb Merge "ARM: dts: msm: enable SDR104 workaround for MSM8998" 2017-04-05 12:16:56 -07:00
Linux Build Service Account
b8d554f7cb Merge "msm: kgsl: Use legacy PM4 check instead of adreno version" 2017-04-05 12:16:55 -07:00
Sriharsha Allenki
343476df3e usb: gadget: gsi: Fix incorrect repsonse available notifications
Two notify requests are being queued for one available modem
response. So for the first GET_ENCAPSULATED_RESPONSE we provide
the host with the available response. Now for the next
GET_ENCAPSULATED_COMMAND we notify the host that the response is
available even before the modem is ready with a response because
of the extra notify request queued on the interrupt endpoint.
This causes a STALL for the next GET_ENCAPSULATED_RESPONSE request.
This is caused because we are queueing a notify request from the
completion handler of the interrupt endpoint request when the
response queue is not empty.
Fix this by queuing a notify request when a new response is
available only after the current resposne is send to the Host.

Change-Id: If84bc315f2be910503328cc6b0e21be342c6eb37
Signed-off-by: Sriharsha Allenki <sallenki@codeaurora.org>
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
2017-04-05 09:23:51 -07:00
Sujeev Dias
afe468938a mhi: mhi_uci: add support for shutdown and system error notification
Add support to handle system error and shutdown
notifications from mhi host.

CRs-Fixed: 1097560
Change-Id: Ied6c907586aa4dc2ed3b1a7c19305877144b3b21
Signed-off-by: Sujeev Dias <sdias@codeaurora.org>
2017-04-05 08:44:07 -07:00
Anurag Chouhan
32076102ab icnss: Make driver register asynchronous to probe
Driver register doesn't have to be synchronous with probe call
back. Keep the driver registered till unregister gets called and
never reset ops during probe failure.

CRs-fixed: 2029329
Change-Id: I61331c7f33b29b0bc4833a8e4c52ee94f17660e7
Signed-off-by: Anurag Chouhan <achouhan@codeaurora.org>
2017-04-05 17:26:46 +05:30
Meng Wang
e06bfb9b82 ASoC: wcd934x: add null check for soundwire control data
Soundwire control data is NULL if there is no soundwire slave
device enumerated.
Add null check to avoid panic.

Change-Id: Ief60d69c36c2a9831825f38da2c9a3f6dd5f13dc
CRs-Fixed: 2020293
Signed-off-by: Meng Wang <mwang@codeaurora.org>
2017-04-05 04:14:29 -07:00
Linux Build Service Account
c5751be200 Merge "msm: ADSPRPC: Unmap remote heap buffer only for ADSP SSR" 2017-04-05 04:05:40 -07:00
Linux Build Service Account
85cd9a2afb Merge "power: smb-lib: update USBIN_V_VOTER usage" 2017-04-05 04:05:39 -07:00
Linux Build Service Account
0645e1acd6 Merge "msm: pcie: support PCIe MSI QGIC with stage 1 SMMU enabled" 2017-04-05 04:05:37 -07:00
Linux Build Service Account
d7d5fb015b Merge "Revert "defconfig: msm: Enable RCU_STALL_WATCHDOG_BITE flag"" 2017-04-05 04:05:37 -07:00
Linux Build Service Account
078448a790 Merge "Input: stm: optimize the laser sensor driver" 2017-04-05 04:05:36 -07:00
Linux Build Service Account
e81f37a9e5 Merge "ARM: dts: msm: Update camera clock sources for sdm630" 2017-04-05 04:05:35 -07:00
Linux Build Service Account
61aa6bdf98 Merge "ARM: dts: msm: Add flash and OIS node to camera sensor mtp for msm8998" 2017-04-05 04:05:34 -07:00