Commit graph

579929 commits

Author SHA1 Message Date
Sahitya Tummala
118ca5d727 mmc: cmdq_hci: enable legacy interrupts when CQ is disabled upon error
The legacy interrupts are enabled as part of CQE halt. But there could
be few cases, where halt fails. In those cases, CQE is disabled without
enabling legacy interrupts. Without this we cannot send any commands
like status CMD13 in legacy mode as part of error handling work.

Change-Id: I944ab4060e779c7f41a945532e6a65c30797d40f
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
Signed-off-by: Sayali Lokhande <sayalil@codeaurora.org>
2016-11-30 21:47:22 -08:00
Sahitya Tummala
53ed8685f6 mmc: sdhci: Handle legacy commands sent in CQ error cases properly
There could be cases where CQE halt might fail and in which
case, CQE gets disabled as part of error handling.
In this case, !mmc_host_halt() will be true and the commands
sent in legacy mode are getting software request timeout errors
as they are getting handled as cmdq irq.
Hence, add !mmc_host_cq_disable() check as well in addition to
!mmc_host_halt() in sdhci_irq() before considering it as a
cmdq irq.

Change-Id: Ic529aae53fdecd6b9ecbb17ba13147964dce55dc
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
Signed-off-by: Sayali Lokhande <sayalil@codeaurora.org>
2016-11-30 21:44:25 -08:00
Ajay Singh Parmar
327a852ba7 msm: hdcp: add response timeout and new messages for sink
As per hdcp 2.2 specifications, send the stream type message
to sink at a specified address in case sink is a receiver.

Update the messages to be sent to sink with the message received
from TZ and tear down the session in case it time's out.

Also, enable encryption after stream management message
exchange for hdcp repeaters to avoid unnecessary link failures.

Change-Id: Ib77756c942abfbdd6e1522a3238d5d8499496fc9
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
2016-11-30 21:09:56 -08:00
Andrew Chant
ae39f47e9b Input: synaptics: check input, prevent sysfs races
concurrent sysfs calls on the fw updater can cause
ugly race conditions.  Return EBUSY on concurrent sysfs calls.

For sysfs calls which generate deferred work, prevent
the deferred work from running concurrently with other
sysfs calls.

Also check that ext_data_source is appropriately sized
and allocated, based on a patch by
Gengjia Chen (chengjia4574@gmail.com).

Signed-off-by: Andrew Chant <achant@google.com>
Change-Id:I5bbe4992f3fd2d23db288296eaeb61f5831098e9
Bug: 30799828
Bug: 31252388
Git-repo: https://android.googlesource.com/kernel/msm.git
Git-commit: 287ce2ccfefe68067c1f9f5175b6664bf7397fe6
Signed-off-by: Srinivasa Rao Kuppala <srkupp@codeaurora.org>
2016-12-01 10:28:16 +05:30
Maheshwar Ajja
b0bb16ebe7 ARM: dts: msm: Set max non secure region to 0xE0000000 on msm8998
Video hardware on msm8998 chipset limits the max non secure region
address to 0xE0000000. So reduce non secure region size to 0x6f800000
from 0x8f800000 to limit the max address to 0xE0000000.

CRs-Fixed: 1092881
Change-Id: Ib9602aa2298caf01ab01b4e0225c112c71bb81f4
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
2016-11-30 18:40:11 -08:00
Chris Lew
fbc3530d4f soc: qcom: glink: Add pending remote done packets to intent purge
Glink clients are not notified of tx transactions that are waiting
for remote rx done commands during SSR. This change adds a
notify_tx_abort call for any pending packets during intent purge.

Change-Id: I6a6ba17e2dffddc5cdc2de00da737fedf03c9476
Signed-off-by: Chris Lew <clew@codeaurora.org>
2016-11-30 18:03:18 -08:00
Linux Build Service Account
a27b2f1789 Merge "ARM: dts: msm: Add qseecom device node for msmfalcon" 2016-11-30 16:28:03 -08:00
Ajay Singh Parmar
5ee2b479a9 msm: mdss: dp: set crypto clock rate
Crypto clock is needed for HDCP 1.x/2.x encryption. If not set,
it may result in link integrity failure as source and sink may
go out of synchronization. Set the crypto clock rate as per
hardware recommendations.

Change-Id: I768b3390fbe4728be285424d0ce27981e1a5d6cb
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
2016-11-30 15:51:13 -08:00
Puja Gupta
ffa980caab soc: qcom: Add support to restart user PD
Introduce api service_notif_pd_restart() using which clients can request
to restart user PD.

CRs-Fixed: 1092791
Change-Id: Ic21de510cde4bfa9f2e4f7f3d4518b464be88db2
Signed-off-by: Puja Gupta <pujag@codeaurora.org>
2016-11-30 14:46:59 -08:00
David Dai
414d28c327 msm: msm_bus: Reverse QoS Clocks Disabling Order
Reverse the order in which the clocks needed
for QoS programming are being disabled. This is done
to resolve certain clocks being stuck on due to SlaveReady
FSM enabled.

Change-Id: I2d414689ad7ec2167b3974ae0f40338075609046
Signed-off-by: David Dai <daidavid1@codeaurora.org>
2016-11-30 13:02:01 -08:00
Maheshwar Ajja
076fd7d351 msm: vidc: fix lock issue in msm_comm_get_mbs_per_sec()
Forward thread acquired v4l2_ctrl->handler->lock in
v4l2_s_ctrl() and waiting for response from response thread.
Response thread was blocked on core->lock which was acquired
by second forward thread. The second forward thread acquired
core->lock and called v4l2_g_ctrl() in msm_comm_get_mbs_per_sec()
where it was blocked on same v4l2_ctrl->handler->lock and hence
response thread was not unblocked. Resolve the deadlock issue
by avoiding v4l2_g_ctrl() call in msm_comm_get_mbs_per_sec().

CRs-Fixed: 1095539
Change-Id: I73c2a74f1bb86f2b0359be54ed4f7675051db7b0
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
2016-11-30 11:39:49 -08:00
Ajay Singh Parmar
a5cdf192ad msm: mdss: dp: hdcp 2.2: add support for interrupt handling
Enable the interrupts required by hdcp 2.2 to update the hdcp 2.2
state machine as per hardware status.

Change-Id: Ib551b1fe8641203b66a31e745d5091641b4d0ae2
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
2016-11-30 11:07:52 -08:00
Amir Levy
c07808d8db msm ipa3: fix blocking faulty IOCTLs
This change prevents blocking IOCTLs with wrong command
number or wrong magic Number. IOCTL handler should first
check that the command is valid and only then wait for
IPA driver initializations to finish.

CRs-Fixed: 1094653
Signed-off-by: Amir Levy <alevy@codeaurora.org>
Change-Id: I578dc96da96f7c10be51eac1f8b3c190e45dcfcf
2016-11-30 09:57:33 -08:00
Ajay Agarwal
52b9f4271f usb: gadget: Add RMNET support using IPA over BAM2BAM
This change adds RMNET support using IPA over BAM2BAM.
Removes all different supported control and data
transports and assumes BAM2BAM_IPA as default mode.
Cleans up QTI Control driver to support only RMNET
and DPL.

Change-Id: I5b763acfb28c2f1832874af786704835314fa9c7
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
2016-11-30 21:15:21 +05:30
Linux Build Service Account
0380dc86d2 Merge "msm: mdss: Fix null pointer reference during debug init" 2016-11-30 05:40:59 -08:00
Linux Build Service Account
8b070723fe Merge "msm: mdss: Add HFP_CALC_CLK way to switch frame rate" 2016-11-30 05:40:58 -08:00
Linux Build Service Account
3efbc80d99 Merge "msm: mdss: change error return value for lineptr sysfs entries" 2016-11-30 05:40:57 -08:00
Linux Build Service Account
0f596458d4 Merge "msm: crypto: set CLR_CNTXT bit for crypto operations" 2016-11-30 05:40:56 -08:00
Linux Build Service Account
36cdec931f Merge "ARM: dts: msm: Camera configuration for msmfalcon interposer" 2016-11-30 05:40:55 -08:00
Linux Build Service Account
a66bf9b8c5 Merge "ARM: dts: msm: Add property to support multiple sensor" 2016-11-30 05:40:54 -08:00
Linux Build Service Account
86229379ea Merge "ARM: dts: msm: Add actuator and flash src for msm8998 qrd skuk board" 2016-11-30 05:40:53 -08:00
Vidyakumar Athota
a1e1a00923 soc: qcom: fix to avoid invalid memory access
In error scenarios, tx_buf is accessed even after tx_buf
memory is freed up. This change is to avoid access to freed
up memory.

Change-Id: I93a2c5875474094da1de07ddaaad8a709193632f
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
2016-11-29 18:18:14 -08:00
Subhash Jadavani
8c9cd71933 phy: qcom-ufs-qmp-v3: increase the minimum time in hibernate
Some UFS devices violate T-HIBERN8_ENTER_TX time when moving Device
TX (Host RX) lane-1 from SLEEP to HIBERN8 at the end of burst.
M-PHY specification defines max value of 1000 ns for
T-HIBERN8_ENTER_TX but these devices drive DIF-N for 3432 ns. This can
cause the broken link situation after link starup.

This change fixes above issue by increasing host PHY's RX_MIN_HIBERN8_TIME
to 8us (we are giving some additional margin though device needs 3.432us).

Change-Id: I55cb0b718e2e429c0378d842d85a02ace44bf2ce
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
2016-11-29 17:02:33 -08:00
Rajesh Bondugula
9868ace0ab msm: camera: eeprom: Validate the power setting size
Validate the power setting size before copying.
If userspace sends a value which is greater than
MAX_POWER_CONFIG, then the driver accesses unintended memory.
This change will fix the issue.

Crs-Fixed: 1089433
Signed-off-by: Rajesh Bondugula <rajeshb@codeaurora.org>
Change-Id: Iaaa6f5b3c1c2ac5b5b38b3ac407d6ae394bba780
2016-11-29 16:27:12 -08:00
Linux Build Service Account
d43553d47d Merge "msm: isp: Add support to multipass offline ISP" 2016-11-29 16:18:49 -08:00
Linux Build Service Account
a8e19f38fa Merge "msm: camera: sensor: Validate i2c_frq_mode in msm_cci_get_clk_rates" 2016-11-29 16:18:48 -08:00
Linux Build Service Account
9671e3c30a Merge "msm: camera: isp: Change declaration for VFE clock" 2016-11-29 16:18:47 -08:00
Linux Build Service Account
3338d5e27b Merge "msm: kgsl: Update ringbuffer timer when preemption completes" 2016-11-29 16:18:46 -08:00
Linux Build Service Account
33fe35c72b Merge "ARM: dts: msm: Add msm-core device for msmfalcon" 2016-11-29 16:18:45 -08:00
Linux Build Service Account
a0a8e0a795 Merge "ARM: dts: msm: add demo battery profile to msm8998 MTP" 2016-11-29 16:18:44 -08:00
Linux Build Service Account
bfad4eb4f0 Merge "ARM: dts: msm: add a demo battery profile for pmi8998 FG" 2016-11-29 16:18:44 -08:00
Linux Build Service Account
852e2711b3 Merge "msm: cpp: Fix for buffer overflow in cpp." 2016-11-29 16:18:42 -08:00
Ajay Singh Parmar
0fc50c6dd9 msm: mdss: hdcp_1x: update hdcp state on link integrity failures
In case of link integrity failures reported by sink, tear down
the hdcp session. Complete any thread waiting for a response
from sink as part of hdcp protocol to avoid unnecessary delays
in starting new hdcp session.

Change-Id: I0afc56e0177ceccf76b717a483584f7ad5055fe1
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
2016-11-29 15:45:14 -08:00
Shashank Babu Chinta Venkata
1e54d7815f msm: mdss: dsi: Add chromaticity values for HDR support
Add WRGB chromaticity values, peak brightness and blackness
level to panel information. This change also adds method to
parse afore mentioned parameters from device tree and exposes
this properties on sysfs node to read.

CRs-Fixed: 1095347
Change-Id: I039732d8c2a5fa98233647928283df8d9d3f3123
Signed-off-by: Shashank Babu Chinta Venkata <sbchin@codeaurora.org>
2016-11-29 15:37:23 -08:00
Shashank Babu Chinta Venkata
3d8ce6dd18 ARM: dts: msm: Add HDR support for NT35597 panel
Add chromaticity, peak brightness and blackness
level information for panel. This values are
needed for HDR support.

CRs-Fixed: 1095347
Change-Id: Ic3c10b6f8c80f68fec953fd4f0b4616eac7edee3
Signed-off-by: Shashank Babu Chinta Venkata <sbchin@codeaurora.org>
2016-11-29 15:36:33 -08:00
Vidyakumar Athota
a1ccb4d410 soc: qcom: avoid channel open during LOCAL_DISCONNECT state
Glink channel state LOCAL_DISCONNECT occurs only when remote
side channel is closed or device node closed from userspace.
In this case, glink LINK itself is not available to open channel.
So avoid opening glink channels during LOCAL_DISCONNECT state.

Change-Id: I637622d7bfd0cd1d0aa5b905173a7674093674c4
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
2016-11-29 13:41:14 -08:00
Jayant Shekhar
47d0c2b4a7 msm: mdss: Fix null pointer reference during debug init
Some targets doesn't seem to have vbif_nrt_phys in dtsi
file but we still register the debug node for vbif_nrt_reg
and off without checking whether it exists or not. Ensure
this is checked to avoid null pointer reference.

Change-Id: Icce8823f80e586bc4827d8db18dceb2fb866c2f9
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
2016-11-29 12:37:15 -08:00
feifanz
419c2b4a7c msm: mdss: Add HFP_CALC_CLK way to switch frame rate
Add support to switch non-standard framerate.To achieve this,
first map the fps to standard fps and then tune pixel clock
based non-standard framerate. Panel porches might need update
before pixel clock tuning based on standard framerate mapping.

CRs-fixed: 1032036
Change-Id: I49995875338cd2a3b57e88753cfda1bfa97910dd
Signed-off-by: feifanz <feifanz@codeaurora.org>
Signed-off-by: Krishna Srinivas <krisrini@codeaurora.org>
2016-11-29 12:35:47 -08:00
Sandeep Panda
b790cce49b msm: mdss: Access DSI registers before turning off clock
BTA complete interrupt comes and turns off the clocks. In another
thread we read the panel status and DSI ack returns error. In the
error condition we are trying to read some DSI registers even
when the clocks are turned off.

Change-Id: Ica77c16f3cf4b69f46c9003bb299c6413e199468
Signed-off-by: Sandeep Panda <spanda@codeaurora.org>
2016-11-29 12:35:47 -08:00
Krishna Chaitanya Devarakonda
1e4b598042 msm: mdss: change error return value for lineptr sysfs entries
Changing the error return value for lineptr sysfs entries, when
the sysfs operation is not allowed. Returning EAGAIN might make
the verification tests to continuously query the sysfs nodes, or
block it. Returning EPERM will fail the query, which is expected.

Change-Id: I43500c07a318da9e2624a1631134228ad45e1cc7
Signed-off-by: Krishna Chaitanya Devarakonda <kdevarak@codeaurora.org>
2016-11-29 12:35:06 -08:00
Xu Han
faa15e264a ARM: dts: msm: Change camera mount angle for msm8998 QRD device
Change rear and front camera mount angles to have proper orientation.

Change-Id: I7e06e71e0f30d5fa030af52c0bc297f6530bb2fb
CRs-fixed: 1069735
Signed-off-by: Xu Han <hanxu@codeaurora.org>
2016-11-29 12:33:43 -08:00
Tatenda Chipeperekwa
15a1ac8898 msm: mdss: dp: fix parity byte calculation
Fix the parity byte calculation for Audio SDP's that are
sent to the sink during audio playback. If the input data
for the parity byte calculation is only a byte in length,
then the shift operation must only take the first two
nibbles of the byte.

CRs-Fixed: 1076516
Change-Id: Ib686a9aa5198c8e1b30cf37bb3d9c8b259d5fd84
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2016-11-29 11:43:24 -08:00
Tatenda Chipeperekwa
bc41dd07f8 msm: mdss: dp: remove excessive logging from AUX transactions
Remove excessive logging from AUX transaction procedures as these
logs amount to log spam while debugging.

CRs-Fixed: 1076516
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
Change-Id: Id308267ffe9faf178f7b413c17b44fd68f5b6fef
2016-11-29 11:43:21 -08:00
Tatenda Chipeperekwa
99cb5f3d7b msm: mdss: dp: update sink count during hotplug event
Update the sink count during the hotplug event in order
to detect hotplug events which involve more than one
sink device.

CRs-Fixed: 1076516
Change-Id: Ic3956da41e04d6287803478527964001db46c67b
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2016-11-29 11:43:18 -08:00
Tatenda Chipeperekwa
7ea6182fb7 msm: mdss: dp: update AUX error codes to match I2C error codes
Update the AUX error codes to match the I2C error codes so that
the driver has the correct corresponding error code. This is
useful for debugging problems in which there is an AUX
transaction failure.

CRs-Fixed: 1076516
Change-Id: I3857905e5cc916a3e095fa8fcf3d170b172a8efd
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2016-11-29 11:43:14 -08:00
Tatenda Chipeperekwa
53863e5397 msm: mdss: dp: enter failsafe mode on EDID read failure
Add support to enter failsafe mode on EDID read failures
that might be caused by corrupt EDID blocks or AUX
transaction failures. The failsafe mode for this driver
is 640x480 at 60fps, in accordance with the Display Port
v1.3 specification.

CRs-Fixed: 1076516
Change-Id: Ia3895fb0e860991173ffcde604c165d007cfa972
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2016-11-29 11:43:11 -08:00
Tatenda Chipeperekwa
0178c6e499 msm: mdss: dp: add support for automated EDID tests
Add support to parse the test request vector to determine
whether an automated EDID test has been requested. If requested,
send the checksum found in the first EDID block back to the sink
for validation.

Change-Id: I40159e554c1be1972a7e2d91a9792aee89171ac3
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
CRs-Fixed: 1076516
2016-11-29 11:43:07 -08:00
Tatenda Chipeperekwa
ea4ad3a2de msm: mdss: dp: add support for a new 1080p configuration
Add support for a new 1080p configuration which utilizes 4 lanes
at a link rate of 2.7 GBps. This configuration is added to the
existing table that stores the transfer unit values for
different link and resolution combinations.

Change-Id: I37a20885445dfff4cf0b9a77c1e948d6793d834b
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
CRs-Fixed: 1062508
2016-11-29 11:43:04 -08:00
Osvaldo Banuelos
bcbd9bb8b3 clk: msm: clock-osm: set SEQ_REG(32) to L_VAL of corner in LEVEL_3_UP_VC
Set SEQ_REG(32) to match the L_VAL corresponding to the
first corner with MEM-ACC level 3 or LEVEL_3_UP_VC. This
is needed for compatibility with the latest OSM sequence.

CRs-Fixed: 1095224
Change-Id: Ib9f801f42c5d069ed906ed61bd96634736a07703
Signed-off-by: Osvaldo Banuelos <osvaldob@codeaurora.org>
2016-11-29 09:53:13 -08:00
Harshdeep Dhatt
c0d96c8a76 msm: kgsl: Update ringbuffer timer when preemption completes
Ringbuffer timer should always be reset whenever we finish
preempting to that ringbuffer. Currently, there is a case where
wptr in the hardware and the kgsl are identical and thus
the timer isn't reset. Reset the timer regardless if they are
identical or not.
There is one special case when we shouldn't reset the timer.
This happens when we try to figure out next ringbuffer to preempt
but the next ringbuffer is the same one as current. In that case,
if nothing new got submitted to this ringbuffer, then don't reset
the timer.

Change-Id: I6b5aea46f1769021b39ba6e135bef780719a92e7
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
2016-11-29 09:33:09 -07:00