Commit graph

572478 commits

Author SHA1 Message Date
Dhoat Harpal
63ef0b4134 ARM: dts: msm: Add G-Link SMEM Transport entries for MSMFALCON
These entries allow the G-Link SMEM Transport to function, which allows
G-Link to use shared memory as an underlying physical transport.

CRs-Fixed: 1043377
Change-Id: I879f2229b4ab74d760c03f2ce12a9ba3b1c9af8d
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
2016-07-22 15:56:12 +05:30
Dhoat Harpal
e77a507e6e ARM: dts: msm: Add glink_pkt devices for MSMFALCON
Glink_pkt devices expose access to certain SMD resources to userspace.

CRs-Fixed: 1043377
Change-Id: I0dc5dd822424096522d3b0b5c26da424d3c2e006
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
2016-07-22 15:53:36 +05:30
Bruce Ding
3979272bbd input: touchpanel: Add Mstar msg21xx touchpanel driver
This is the reference driver source code for the msg21xx series.

Signed-off-by: Bruce Ding <bruce.ding@mstarsemi.com>
Signed-off-by: mstar-touch <bruce.ding@mstarsemi.com>
Git-commit: c4cdbf1ae326b8745f5e50f044d23aa8e3d3e131
Git-repo: https://github.com/mstar-touch/msg21xx

Change-Id: Ia9cbfac5dc6e1b74f47bf13dbafaacc2624ee4fd
[maol@codeaurora.org: keep the mstar original code without any
change in this commit]
Signed-off-by: Mao Li <maol@codeaurora.org>
(cherry picked from commit 2ce52642057a25fca6337826533d4fbfddede290)
Signed-off-by: Abinaya P <abinayap@codeaurora.org>
2016-07-22 14:24:39 +05:30
Sudhakar Manapati
1bb8dffb61 input: touchscreen: remove dead code in it7258 driver
IT7258 touchscreen driver creates a character device which is
not used by anyone. Remove this dead code

Change-Id: Ied8a0048d8af17fa593c1970cabb572aac338786
Signed-off-by: Sudhakar Manapati <smanap@codeaurora.org>
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
2016-07-22 01:33:44 -07:00
Andrew Huang
cb440b458f input: touchpanel: Add GT9xx touchpanel driver for skuf
This is the reference driver source code V1.8 for the GT9XX series.For
this first commit just copy binary, the second commit decompress the
binary and the third commit upgrade the version. We just need the newest
version, so Squashed the following commits:

	commit 31915760747230826fa474fbb5b06a70b103c7e7
	Author: Andrew Huang <andrew@goodix.com>
	Date:   Thu Jun 27 10:06:56 2013 +0000

	    This is the official reference driver source code V1.8 for the GT9XX series CTP controller,release for CIENET.

	    Signed-off-by: Andrew Huang <andrew@goodix.com>

	    git-svn-id: http://gtp-drivers-for-android.googlecode.com/svn//drivers@15 4d552555-e8e2-8f43-36d7-85641c3b7a2e

	commit 82f70eaf58b0996e9f488b170f81a107642d4df8
	Author: unknowtree@gmail.com <unknowtree@gmail.com>
	Date:   Thu Jun 6 02:58:58 2013 +0000

	    git-svn-id: http://gtp-drivers-for-android.googlecode.com/svn//drivers@7 4d552555-e8e2-8f43-36d7-85641c3b7a2e

	commit 5c42b80f40a9731ac45d4e04a7a7528367f713e7
	Author: unknowtree@gmail.com <unknowtree@gmail.com>
	Date:   Tue Jun 4 08:53:01 2013 +0000

	    git-svn-id: http://gtp-drivers-for-android.googlecode.com/svn//drivers@5 4d552555-e8e2-8f43-36d7-85641c3b7a2e

Change-Id: I30420fc51fe1bb153c36342e607539e5cd74de61
Signed-off-by: Pan Fang <fangpan@codeaurora.org>
(cherry picked from commit ab45aab306d8b8d16619bc02f35465fb8d6ff066)
Signed-off-by: Abinaya P <abinayap@codeaurora.org>
2016-07-22 13:36:09 +05:30
Alfred.Deng
2e21c93ee9 input: touchscreen: Add Touch screen driver for IC it7258
This is the reference driver source code of it7258 touchscreen driver.
Signed-off-by: Alfred Deng <Alfred.Deng@ite.com.tw>
Git-commit: 3852a7ccce89c17ec3c4165acf9c81753c940104
Git-repo: git://github.com/ite-touch/touchscreen-driver

Change-Id: Ic1eab3ba79b8e8e5c259bb92f2692fd0db5fc8d3
Signed-off-by: Himanshu Aggarwal <haggarwa@codeaurora.org>
(cherry picked from commit c25c3f1a0f29d7989b7d7058da74e465665bf279)
Signed-off-by: Abinaya P <abinayap@codeaurora.org>
2016-07-22 12:21:01 +05:30
Mohan Pallaka
96a21fd1f8 input: ft5x06_ts: Add driver for ft5x06 series
Ft5x06 controllers are single chip capacitive
touch panel controller ICs with a built-in 8 bit
Micro Controller Unit. It supports multi-touch
capability and can detect up to five touches.

Change-Id: I39eb1175d473d1f2c463e1c4a0a1606307da9dc0
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
(cherry picked from commit a2595074a6528a1a2d28470c11ed14c21081068c)
2016-07-22 11:48:01 +05:30
Taniya Das
d81650468e clk: msm: Fix MDSS compilation issue
The MDSS clock drivers were not getting compiled due to an extra 'y', fix
the same.

CRs-Fixed: 1041122
Change-Id: I21e62361f40eb654c369048d01e158d4b96dd551
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2016-07-22 10:14:33 +05:30
Hemant Kumar
c24e9fe614 usb: dwc3: Fix NULL ptr dereference in ep disable ops
In RNDIS composition when windows PC is suspended RNDIS
driver sends flow control enable which frees the trb pool
of the RNDIS endpoints and trb pool pointer is set to NULL.
When bus suspend happens RNDIS gsi driver performs endpoint
disable operation because remote wake up is disabled. Endpoint
disable perform memset 0 on trb pool which is already set to
NULL causing the NULL pointer dereference. Fix this by adding
NULL check for trb pool before doing memset 0.

CRs-Fixed: 1044799
Change-Id: I2a233e85139be0612314e6fa3dfa1d1c0fa04547
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
2016-07-21 14:09:51 -07:00
Subbaraman Narayanamurthy
f56fc4b5af of_batterydata: Pass battery id directly to find battery profile
Currently power supply name is passed to get the battery profile
in of_batterydata_get_best_profile(). This creates a dependency
of waiting for the driver that has the power supply class device.

Improve this by passing the battery id directly to the API. This
way, getting battery id will be the responsibility of caller.

CRs-Fixed: 1043798
Change-Id: I7a8c2b2fcc9b43e2e858114f7312fccf96dc3f78
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2016-07-21 12:23:07 -07:00
Shubhraprakash Das
2826659913 msm: camera: isp: Vote bandwidth with clock enabled
Vote for bandwidth after clocks are enabled. For bandwidth
voting clocks need to be on.

CRs-Fixed: 1044777
Change-Id: I9be1ee26419c082cda6351ef6d5aeedc6e17de55
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
2016-07-21 11:41:09 -07:00
Tatenda Chipeperekwa
1022ba2b95 clk: msm: hdmi: fix value of constant for minimum VCO rate
Fix the value of the constant for the minimum VCO rate by
setting it to 250MHz. This fix will allow valid clock rates
such as 252MHz to be configured for the HDMI PHY and enable
certain HDMI modes to work correctly instead of failing the
validation checks when setting the VCO rate.

CRs-Fixed: 1039464
Change-Id: I0e90de49d295563aba87af39169bd3dea1f8ade7
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2016-07-21 11:19:03 -07:00
Chandan Uddaraju
ab2606e098 defconfig: msmcortex: Enable DisplayPort driver
Add support to displayport driver for msmcortex
platform.

Change-Id: I90d82873381cb1e9b86ed339d755365cccded537
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
2016-07-21 11:11:41 -07:00
Chandan Uddaraju
5e4e4dc4ec msm: mdss: dp: rename EDP files to DP
EDP is a add-on support for DP driver. Rename the
EDP [.ch] files and the AUX channel driver file to DP.

Change-Id: Ifeadae2f58eb4fbf398a682beb9180c4f7419041
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
2016-07-21 11:11:30 -07:00
Chandan Uddaraju
cd6d9f1131 mdss: Update EDP driver to support DisplayPort
Create new "util" files to support IO operations.
Use default resolution to register DP driver with FB.
Update regulator and clock changes to support generic
implementation.

Change-Id: I896ab17afce77faf3dcf64fd75b15eaec9d5a00e
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
2016-07-21 11:11:18 -07:00
Ping Li
d1e486c5fa msm: mdss: Update backlight filter for AD
A new post-processing ioctl is added to pass AD backlight threshold
and AD backlight low limit to driver. AD backlight low limit is used
to prevent very small backlight value been sent to AD core, which
will cause over-sensitivity for AD core.

Change-Id: I6e4222728d805d5b1d07cce4bf4648219cdaf587
Signed-off-by: Ping Li <pingli@codeaurora.org>
2016-07-21 10:36:44 -07:00
Subash Abhinov Kasiviswanathan
3d78e43011 net: Revert upstream changes which break routing in tunnel scenarios
This reverts the following -

commit f1900fb5ec ("net: Really fix vti6 with oif in dst
lookups")
'commit 4148987a51 ("net: Fix vti use case with oif in dst
lookups for IPv6")
commit 42a7b32b73 ("xfrm: Add oif to dst lookups")

Routing in tunneled scenarios are completely broken due to these
upstream commits. Revert these changes as a workaround till a
solution is determined internally and is accepted upstream.

CRs-Fixed: 1039009
Change-Id: I4e02573bc6dadf8d1a2ce50313e6d0c6e6a0e599
Acked-by: Abhinav Kannan <kannana@qti.qualcomm.com>
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2016-07-21 10:58:54 -06:00
Yuanyuan Liu
e5c576964b icnss: Add state check before calling wlan suspend/resume
Check if wlan module is loaded before calling wlan
suspend/resume as wlan could be turned on before FW
ready. In this case, wlan driver operations are registered
to icnss platform but wlan driver is not loaded.

CRs-Fixed: 1044223
Change-Id: I134790377e15d4003ecfa686a9fa7ab720e08865
Signed-off-by: Yuanyuan Liu <yuanliu@codeaurora.org>
2016-07-21 09:48:10 -07:00
Taniya Das
190ac0a1b8 clk: qcom: clk-dummy: Add a dummy clock provider
Add a dummy clock provider that registers a simple callback that
in turn always returns the dummy clock for any clk_get call. This is useful
for unimplemented clocks.

Change-Id: I08fcb174fd0e0c49f8069e106b48597bcdfe847d
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2016-07-21 22:04:06 +05:30
Ram Chandrasekar
f70b8219bb msm: thermal: Update the hotplug initialization
Hotplug initialization will trigger a hotplug if temperature stays above
the trip threshold and will try to online if temperature is below the
clear threshold. Since KTM does boot mitigation till thermal-engine is
running, hotplug init can be called twice. First from post init script
and second when the hotplug task is initialized. There is a possiblity
the first init call can set the hotplug local mask and the second init
call wont clear or update the mask with correct value if the temperature
is between the hotplug trip and clear threshold.

Update the hotplug init API to perform the check only if the hotplug
task is initialized. Also the hotplug check will clear the hotplug local
mask if the temperature is not above the trip threshold.

Change-Id: Ica1325f8aa65c338ea0e5b201f566607c3ddf904
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
2016-07-21 10:20:07 -06:00
Ashish Jain
e9276dfdcd ASoC: msm: qdsp6v2: DAP: Update check to validate data length
A big negative data length value can bypass the current check,
update the condition to ensure that only valid data length is used
to copy the params.

CRs-Fixed: 1041130
Change-Id: I6e1a58e901e4c042acfb0ab0a6223dec2949aefe
Signed-off-by: Ashish Jain <ashishj@codeaurora.org>
2016-07-21 07:46:43 -07:00
Dhoat Harpal
c2e4cfd2db ARM: dts: msm: Add G-Link SSR entries for MSMFALCON
SSR entries contain the list of subsystems to notify when an SSR for a
given subsystem occurs. This information enables G-Link to handle
closing and re-opening channels in the case of SSR.

CRs-Fixed: 1043377
Change-Id: Ibd8ceb8149b3041ce1f58ac4c3642d7391b89385
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
2016-07-21 18:52:30 +05:30
Dhoat Harpal
d375ea2d63 ARM: dts: msm: Add SMEM entry for MSMFALCON
Add the SMEM entry to enable the use of shared memory by different
processors in the SoC.

CRs-Fixed: 1043377
Change-Id: Ic36a67c724d7f8a0e64affba92856160cce914bb
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
2016-07-21 18:38:32 +05:30
Dhoat Harpal
7e1c3ad225 soc: qcom: smem_xprt: Add CDSP entry in smem xprt driver
CDSP processor entry in function add subsys_name_to_id to convert
string cdsp to corresponding id.

CRs-Fixed: 1043377
Change-Id: Iba226aa328906427593ecae35fab3396f34c19ae
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
2016-07-21 18:28:56 +05:30
Dhoat Harpal
ed6db47f7e soc: qcom: glink: Included sched.h to avoid build error
32 bit Compilation is failed due to undeclared usage of
TASK_UNINTERRUPTIBLE.

Include sched.h header file for the definition of
TASK_UNINTERRUPTIBLE.

CRs-Fixed: 1042813
Change-Id: I947b8d08f61624b914bd82caf4276364b9833cef
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
2016-07-21 18:13:40 +05:30
Venkatesh Yadav Abbarapu
52096a1896 arm: dma-mapping: Export arch_setup_dma_ops symbol
Some test modules need to call "arch_setup_dma_ops" to setup
the proper dma operations.

Change-Id: Icc884b53c85941f59f84bed108b536cc18b8be60
Signed-off-by: Venkatesh Yadav Abbarapu <vabbar@codeaurora.org>
2016-07-21 17:42:20 +05:30
Dhoat Harpal
a3f2ed3879 soc: qcom: smem: Add CDSP processor ID
The local table of processor IDs maintained by SMEM must match the table
of processor IDs maintained by SMEM on remote processors, because the
IDs are global.

Update the local table of processor IDs to match the table on remote
processors.

CRs-Fixed: 1043377
Change-Id: I6df0575cf54003374a5ebdbfa54e169d3545ffe7
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
2016-07-21 17:40:52 +05:30
Hemant Gupta
0ef7e894f7 Bluetooth: HID: Add support for building hid drivers
This patch adds support for enabling uhid driver in kernel which
provides interface for user space hid module to interact with
hid drivers of kernel. Without support for uhid driver, Bluetooth
HID functionality is broken completely. Also support for vendor
hid drivers is enabled so that HID profile can be connected with
these HID devices.

Change-Id: If56742a9c6b6c4ef774da6e83d57aee56bf28842
CRs-Fixed: 553571
Signed-off-by: Hemant Gupta <hemantg@codeaurora.org>
2016-07-21 03:46:48 -07:00
Susheel Khiani
36c23da759 iommu/iommu-debug: Make debug driver 32 bit compatible
Currently iommu-debug was enable only for 64 bit
targets as there were compilation issues coming
up while enabling it for 32 bit. Fix these issues
to ensure that we can use it on 32 bit targets
too.

Change-Id: If230af86f2fdd12fb5396f3b4736e57a123422bd
Signed-off-by: Susheel Khiani <skhiani@codeaurora.org>
2016-07-21 03:13:27 -07:00
Manish Poddar
80eb335deb msm: Camera buffer overflow fix
find_first_zero bit is considering addr parameter as unsigned
long and we are passing int variable.In the function it access
addr[i], so it tries to access 8 bytes , actual size of
open_idx and stream_id are 4 bytes.we change open_idx and
stream_id to long to fix it.

Change-Id: I510059cc8f495957bd2b5af9973b3495761edd06
Signed-off-by: Manish Poddar <mpoddar@codeaurora.org>
2016-07-20 22:50:49 -07:00
Krishna Chaitanya Devarakonda
25817c2873 msm: mdss: Fix mixer extension offset
The mixer extension offset for VIG3 is pointing to VIG2.
Correcting the offset value.

Change-Id: Ie54c2edc940495484f01e539cf42d5c83c4b0535
Signed-off-by: Krishna Chaitanya Devarakonda <kdevarak@codeaurora.org>
2016-07-20 18:54:42 -07:00
Satyajit Desai
8624f4eca5 coresight-etm4x: avoid reading trace-id from ETM hardware block
I/O read of trace-id when the CPU is in power collapse can result
in undefined behavior and system crash. Trace-id is set during
ETM init and not modified thereafter. So, there is no real need
to read the value from I/O.

Change-Id: I83029c721f7b90c65fcc8a958c7a82e65d005ed5
Signed-off-by: Satyajit Desai <sadesai@codeaurora.org>
2016-07-20 17:14:31 -07:00
Abhijeet Dharmapurikar
b4713c2ca1 smb-lib: account for Jeita while distributing FCC
The master charger has built in Jeita compensation where it reduces
FCC when the battery is in cool/warm Jeita threshold. This skews
the distribution of FCC between master and slave in parallel
configuration.

Fix this by checking if soft Jeita is active. If so reduce the requested
fcc so that master and slave get reduced share. However, since master
is reducing its FCC, add the reduction again to its share so the net
FCC on master is as per the distribution.

This also calls to handle the battery temperature change interrupt and
redistribute FCC.

Change-Id: I413cc0231a9125422efc71ed67717921af939959
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2016-07-20 16:54:55 -07:00
Abhijeet Dharmapurikar
6899c6bfff smb-lib: improve handling of usbin plugin interrupt
Currently the code disables the dpdm regulator if VBUS is present and
regulator is enabled.

It could happen that the charger oscillates its VBUS as it settles and
based on the delay's in responding to an interrupt, the software could
read vbus_present while the regulator was enabled earlier causing an
incorrect disable of the dpdm regulator.

It is required to ignore the interrupt in such cases.

Change-Id: I882780c1bcbc7713973eda5383291d891787f144
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2016-07-20 16:50:56 -07:00
Abhijeet Dharmapurikar
bc356bece8 qcom-charger: smb2: configure input from wipower
Wipower feeds to the DCIN input of the smb2 charger and relies on
input current configurations on six different voltage ranges for
optimal power draw.

Provide means to configure the current limits in them via a device
tree setting.

Change-Id: I81d1dc3ed1d588d67525b15120e7d8b947536099
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2016-07-20 16:50:54 -07:00
Patrick Daly
99b8b105fd defconfig: Enable IOMMU debugfs in perf-defconfig
This is required for testing iommu performance on non-debug builds.

Change-Id: Ie1514b6cf78d3dd34de83608ec00c454316b75bd
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
2016-07-20 14:30:05 -07:00
Jordan Crouse
a5c4e52c5e msm: kgsl: Keep the active draw context until it is switched out
Instead of trying to make a decision to switch out the active
draw context for NULL at detach time leave the reference count
for it until the next context switch or until the next slumber
whichever comes first. This avoids races with the preemption
code and ensures a smooth transition.

A side effect is that we were depending heavily on the context
detach to reset the ringbuffer to the default at power down and
we didn't touch it on power up (though we did on soft reset and
wake from slumber. Curious).  Obviously if we are no longer
switching we will need to force the default pagetable during start
but it seems to me like this would be the right thing to do even
if we were still switching out.

CRs-Fixed: 1009124
Change-Id: Ic0dedbadff8df192096292b221130c8ef5b31e12
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2016-07-20 15:19:35 -06:00
Jordan Crouse
d8fa23c244 msm: kgsl: Force all command level context switches to the GPU
Force any command triggered context switch to the GPU - it should
be on the GPU anyway, but we were already passing a flags parameter
(unused) so this is a good chance to force the issue and make sure
that the cpu path decision isn't in play here.

CRs-Fixed: 1009124
Change-Id: Ic0dedbadb277a6498d0840b45c90e1265e2f354a
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2016-07-20 15:19:34 -06:00
Jordan Crouse
cdb650787d msm: kgsl: Record the ringbuffer start of pipeline timestamp
We are only writing the ringbuffer start of pipeline timestamp for
internal commands that do not have a draw context associated which
happen rarely (if ever).  We should be recording the timestamp for
*ALL* commands so when something goes wrong we can get a fuller
idea of the timestamp picture for each ringbuffer.

CRs-Fixed: 1009134
Change-Id: Ic0dedbad6d99130e31cd8a06dfe025610e9157a8
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2016-07-20 15:19:34 -06:00
Jordan Crouse
75437b98b1 msm: kgsl: Relax timestamp comparisons for processing events
When processing an event group we check the previously processed
timestamp to avoid going through the loop if we don't need to.
We use timestamp_cmp() to check the timestamp. In situations
where the retired timestamp has advanced by more than 0x80000000
since the last time we checked the timestamp, timestamp_cmp()
will return -1 as it thinks that the new timestamp is older than
the processed timestamp. This can happen with certain tests and
scheduling hiccups.

The event processor can be much less restrictive - all we really
care about is that the retired timestamp didn't slip backwards by
accident (highly unlikely). So just check that the last proccessed
timestamp is not equal to the retired timestamp and if the
retired timestamp has already rolled, that the delta is outside
of the 0x8000000 window.

CRs-Fixed: 1009149
Change-Id: Ic0dedbad641bfa3fd6cbc1c91a37fb0e37f72bae
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2016-07-20 15:19:34 -06:00
Jordan Crouse
858b8e0264 msm: kgsl: Remove unneeded error message in kgsl_iommu.c
iommu_attach_device() should return a log message for every
possible error and we don't need to double up the pain
especially for situations when we run out of available
domains and start getting a storm of ENOSPC errors back.

CRs-Fixed: 1009158
Change-Id: Ic0dedbad7416abb23c769a4d3be9ebd0ca04810c
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2016-07-20 15:19:34 -06:00
Jordan Crouse
dd9a770d23 msm: kgsl: Do INIT_WORK() just before queueing a deferred mem entry
gpuobj_free_on_fence() is used infrequently enough that it doesn't
make sense to do INIT_WORK() when the memory object is created,
especially if debug objects are enabled because INIT_WORK() will go
off and do a bunch of accounting that we don't need.  Do the
INIT_WORK() just before queueing in those rare cases that this
actually happens.

CRs-Fixed: 1009183
Change-Id: Ic0dedbad1015883788e12815806e3249a1e09b21
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2016-07-20 15:19:34 -06:00
Jordan Crouse
340d8516dc msm: kgsl: Remove idle wait in kgsl_iommu_set_pf_policy()
We don't need to wait for idle before changing the pagefault
policy on the IOMMU which is a good thing because on a busy
system we may never hit idle.

CRs-Fixed: 1009187
Change-Id: Ic0dedbadb8f6122e32a0a34a65c54a7bca2a523c
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2016-07-20 15:19:34 -06:00
Jordan Crouse
091839e4c3 msm: kgsl: Allow a draw context to skip snapshot
Some test applications intentionally generate a GPU fault for
various reasons. Because a GPU fault generates a snapshot and
snapshots are persistent until they are pulled, running the test
application may take up the snapshot slot and prevent a real fault
from being captured and debugged.

This flag allows the draw context to intentionally avoid generating
a snapshot.

CRs-Fixed: 1009190
Change-Id: Ic0dedbad8476c308a13572d999540b243d97eabc
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2016-07-20 15:19:33 -06:00
Jordan Crouse
e6814f052b msm: kgsl: Program the secvid registers in the soft reset path
The secure buffer registers were not being programmed in the soft
reset path which was causing a failure for the critical packets
workaround and forcing a hard reset.

CRs-Fixed: 1009194
Change-Id: Ic0dedbad998767a1ffdfe265e52fae7baa18d203
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2016-07-20 15:19:33 -06:00
Jordan Crouse
46369030ee msm: kgsl: Implement fast preemption for 5XX
Allow 5XX targets to preempt quickly from an atomic context. In
particular this allows quicker transition from a high priority
ringbuffer to a lower one without having to wait for the worker
to schedule.

CRs-Fixed: 1009124
Change-Id: Ic0dedbad01a31a5da2954b097cb6fa937d45ef5c
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2016-07-20 15:19:33 -06:00
Jordan Crouse
0da2fbad58 msm: kgsl: Preemption cleanups
Remove some unused gpudev hooks and further segment the A4XX and
A5XX specific code into their respective areas.  Remove some bits
that are only applicable to 4XX from the 5XX side.

CRs-Fixed: 1009124
Change-Id: Ic0dedbadc324b979583d7a3998195bf15ac537f6
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2016-07-20 15:19:33 -06:00
Jordan Crouse
ea91f74673 msm: kgsl: Leave the MMU clocks on with the rest of the GPU
It is no longer power efficient to independently enable and disable
the MMU clocks. We can safely enable and disable them with the rest
of the GPU clocks and take back the infrastructure needed to handle
the clocks.

CRs-Fixed: 1009124
Change-Id: Ic0dedbadc48095eada9c5fce6004475a2cb0f0a9
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2016-07-20 15:19:33 -06:00
Carter Cooper
2e7b23f2af msm: kgsl: Use the GPU to write the RPTR
The memstore shared between the CPU and GPU is old but can not be
messed with. Rather than stealing values from it where available,
add a new block of shared memory that is exclusive to the driver
and GPU. This block can be used more freely than the old
memstore block.

Program the GPU to write the RPTR out to an address the CPU can read rather
than having the CPU read a GPU register directly. There are some very
small but very real conditions where different blocks on the GPU have
outdated values for the RPTR. When scheduling preemption the value read
from the register could not reflect the actual value of the RPTR in the CP.
This can cause the save/restore from preemption to give back incorrect RPTR
values causing much confusion between the GPU and CPU.

Remove the ringbuffers copy of the read pointer shadow.
Now that the GPU will update a shared memory address with the
value of the read pointer, there is no need to poll the register
to get the value and then keep a local copy of it.

CRs-Fixed: 987082
Change-Id: Ic44759d1a5c6e48b2f0f566ea8c153f01cf68279
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2016-07-20 15:19:32 -06:00
Rajesh Kemisetti
0ff59e6262 msm: kgsl: Stop fault_timer before reading fault registers
Currently adreno_ft_regs_val is getting updated at the time of
first submission or on the expiry of fault_timer.

If the fault_timer expires exactly at the time of inflight becomes 0
and there is an immediate submission for which GPU finishes the work
within short time. Then there is a chance to read the fault registers
in fault_detect_read() and fault_detect_read_compare() with less
time gap and declare it as a fault.

Stop the timer before reading fault registers and start it again.

CRs-Fixed: 1043478
Change-Id: Ib35104adf7b3618f94c6adf7fab531abffea3f76
Signed-off-by: Rajesh Kemisetti <rajeshk@codeaurora.org>
2016-07-20 15:19:32 -06:00