Commit graph

591444 commits

Author SHA1 Message Date
Jordan Crouse
c94c4109c3 drm/msm: Move hangcheck fence to ringbuffer
hangcheck_fence was missed when all the ring specific members were
moved out of the gpu struct.

Change-Id: Ic0dedbad00a86d6657bc2a3e0e5bbdc5eae21ae6
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2017-07-03 13:40:29 -06:00
Jordan Crouse
abfc1cf3b3 drm/msm: Remove adreno_last_fence
adreno_last_fence is no longer very useful since we have a handy
per-ring pointer directly to the values we need.

Change-Id: Ic0dedbadfb195551afcd016651776965da32fb2d
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2017-07-03 13:40:28 -06:00
Jordan Crouse
747d4d00db drm/msm: Change the priority order of the ringbuffers
When we first did preemption the priority was set at submission
time. In order to be properly backwards compatible we made ring id 0
the lowest priority ring so that when a legacy app made a submission
it didn't get itself onto the highest priority ring by accident.

Now that we set the priority with submitqueues this is no longer
a concern and ordering priorities this way goes against long
standing convention in similar GPU drivers.

Declare a flag day and invert the priority algorithm so that
priority '0' is the highest priority and it descends from there.
The lowest prority ring is 'number of rings - 1' where the number
of active rings can be acquired through a parameter query of
MSM_PARAM_NR_RINGS.

This change also ensures that the legacy submitqueue id '0' will
use the next-to-lowest ring buffer by default for legacy
submissions.

Change-Id: Ic0dedbadeea522e4f07babc4395cbf5fb7143fe3
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2017-07-03 13:40:28 -06:00
Jordan Crouse
9d7874731a drm/msm: Add a parameter query for the number of ringbuffers
In order to manage ringbuffer priority to its fullest userspace
should know how many ringbuffers it has to work with. Add a
parameter to return the number of active rings.

Change-Id: Ic0dedbada6010dd5122e8409141fd23b414d73e4
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2017-07-03 13:40:27 -06:00
Jordan Crouse
48db6e4716 drm/msm: Change the profiling structure
Remove the queued time from the profile struct and turn the submit time
into a proper timespec (tv_sec + tv_nsec).  This should sync up better
with what userspace is used to seeing.

Change-Id: Ic0dedbad0621fa248e6cffde2d1ee3f9b609e19d
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2017-07-03 13:40:27 -06:00
Jordan Crouse
130cbfae08 drm/msm: Add kernel side submit profiling and tracing
Record the GPU always on timer value at the start and end of a
submission on the ringbuffer. Since the timer runs at a constant
19.2 Mhz this is a handy way of tracking how long each
submission takes.

The timer values are recorded in the memptrs. Each ringbuffer is
given a circular list of 128 entries to store the event ticks;
this should be enough to avoid running out of room even when the
ring is completely full of submissions.

Add trace events for the user to track when submissions are
queued, submitted to the ringbuffer and retired. The submitted
trace point shows the GPU ticks and the current kernel time at
submit time (as read by the CPU) and the retired trace event shows
the GPU ticks at submission start/end as read by the GPU. Taken
together these two events can provide a pretty close match between
the current GPU time and the kernel time which is handy for tracing
tools that try to match up the various kernel events with one
another.

Change-Id: Ic0dedbadbcf89f032890820785b9fb49a6362b01
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2017-07-03 13:40:26 -06:00
Linux Build Service Account
bc399a65c4 Merge "msm: kgsl: Limit the frequency of logging on memory allocation failure" 2017-07-02 16:11:43 -07:00
Linux Build Service Account
b0bcf92508 Merge "msm: kgsl: Directly return page size of the supported pool" 2017-07-02 16:11:40 -07:00
Deepak Kumar
d9eb3ce9a8 msm: kgsl: Limit the frequency of logging on memory allocation failure
Excessive logging due to several successive memory allocation failure
may cause a watchdog bite. Hence, this change adds ratelimit to logging
on memory allocation failure.

Change-Id: I8e5d78918a32c48ef7fa587f3dc63cbd1f065d5f
Signed-off-by: Deepak Kumar <dkumar@codeaurora.org>
2017-06-30 20:39:29 +05:30
Linux Build Service Account
c1a5075d60 Merge "ARM: dts: msm: Add non-removable ufs property for SDM630" 2017-06-29 11:34:49 -07:00
Linux Build Service Account
e06e098ca3 Merge "msm: mdss: Allow post-processing clean-up for primary display" 2017-06-29 11:34:48 -07:00
Linux Build Service Account
b1db0d66cf Merge "msm: mdss: Correct PP register programming deferring" 2017-06-29 11:34:47 -07:00
Linux Build Service Account
40f83efeab Merge "scsi: ufs: Unblock UFS while ICE HW configuration" 2017-06-29 11:34:46 -07:00
Linux Build Service Account
ed7868840b Merge "msm: camera: Use mutex lock to avoid race condition" 2017-06-29 03:32:33 -07:00
Linux Build Service Account
586584b2b2 Merge "soc: qcom: glink: Move get reference to valid location" 2017-06-29 03:32:32 -07:00
Linux Build Service Account
7ce539a628 Merge "soc: qcom: glink: Remove magic number logic" 2017-06-29 03:32:32 -07:00
Sayali Lokhande
d74ea38a01 ARM: dts: msm: Add non-removable ufs property for SDM630
Defines the non-removable property for UFS device node.
This basically lets the driver know that UFS is the
boot device.

Change-Id: I1c8aa298af4afc7e42d0c8a3690f7d3360e37647
Signed-off-by: Sayali Lokhande <sayalil@codeaurora.org>
2017-06-29 09:08:09 +05:30
Linux Build Service Account
41f7afc189 Merge "drm/msm/sde: add kernel traces to measure enable/disable/kickoff times" 2017-06-28 20:09:04 -07:00
Linux Build Service Account
f244955097 Merge "ARM: dts: msm: update rmtfs shared memory address for SDM660/630" 2017-06-28 20:09:03 -07:00
Linux Build Service Account
17fbca8726 Merge "defconfig: msm: enable remote debugger driver" 2017-06-28 20:09:02 -07:00
Linux Build Service Account
1014096cda Merge "mm: avoid taking zone lock in pagetypeinfo_showmixed()" 2017-06-28 20:09:01 -07:00
Linux Build Service Account
04fdd6f571 Merge "icnss: Fix incorrect clean-up of stats" 2017-06-28 20:09:00 -07:00
Linux Build Service Account
e80ffe4ec7 Merge "icnss: Add specific statistics for PDR" 2017-06-28 20:08:59 -07:00
Linux Build Service Account
823d04d683 Merge "input: synaptics_dsx: validate bounds of intr_reg_num" 2017-06-28 11:59:58 -07:00
Linux Build Service Account
2a24534bf6 Merge "soc: qcom: glink_smem_native_xport: Allocate smem item in non cache region" 2017-06-28 11:59:58 -07:00
Linux Build Service Account
821524723a Merge "power: reset: msm: add support to select both dumps" 2017-06-28 11:59:57 -07:00
Linux Build Service Account
5901738d81 Merge "ARM: dts: msm: Update USB PHY0 parameters for SDA660/630 HDK platform" 2017-06-28 11:59:56 -07:00
Linux Build Service Account
c7773e1eca Merge "drm/msm: program hdr information to HDMI registers" 2017-06-28 11:59:55 -07:00
Linux Build Service Account
c6fd1ba1ad Merge "drm/msm/sde: add sde_connector kickoff callbacks" 2017-06-28 11:59:54 -07:00
Linux Build Service Account
62cf4dab17 Merge "soc: qcom: ipc_router: Improve IPC attribution" 2017-06-28 11:59:53 -07:00
Linux Build Service Account
9435c0d514 Merge "msm: camera: Fix a deadlock in power-up sequence of the I2C-TZ relay" 2017-06-28 11:59:52 -07:00
Linux Build Service Account
3a2719b7df Merge "msm: camera: isp: Set the sync mode to async" 2017-06-28 11:59:51 -07:00
Dhoat Harpal
1cc3948d8b soc: qcom: glink_smem_native_xport: Allocate smem item in non cache region
rx fifo is allocated in cached region of smem, this leads to
inconsistency when reading at remote side.

rx fifo is allocated in non cached region of smem.

CRs-Fixed: 2056955
Change-Id: I0c7d5bf55222920cffdcd2c7f48968a4f49ee790
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
2017-06-28 17:13:36 +05:30
Linux Build Service Account
84c69cb5aa Merge "ARM: dts: msm: Disable adv7481 on Mojave lite platform" 2017-06-28 04:35:58 -07:00
Linux Build Service Account
49472a4970 Merge "ARM: dts: msm: Enable ACD functionality for SDM660 silver cluster" 2017-06-28 04:35:57 -07:00
Linux Build Service Account
c6704cbfaf Merge "perf: stop deadlock if attempt to bring cpu up fails" 2017-06-28 04:35:56 -07:00
Linux Build Service Account
272ee3f114 Merge "soc: qcom: avoid calling sleeping functions in interrupt context" 2017-06-28 04:35:55 -07:00
Linux Build Service Account
4b5f18dc54 Merge "ARM: dts: msm: Change headset jack configuration for apq8098 mediabox" 2017-06-28 04:35:54 -07:00
Linux Build Service Account
00be8b5375 Merge "msm: rmnet_ipa3: fix QMAP command xfer" 2017-06-28 04:35:53 -07:00
Linux Build Service Account
1b7d2301c4 Merge "msm: sensor: Fix for variable being de-referenced without proper check" 2017-06-28 04:35:52 -07:00
Sahitya Tummala
2ccfe717e4 ARM: dts: msm: update rmtfs shared memory address for SDM660/630
Use reserved memory as shared memory between apps and modem for
writing modem data using rmt_storage service on apps.

Change-Id: I0e5bc8b1e3dbe2f8d49686894667b4a6ee1a3529
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
2017-06-28 16:44:22 +05:30
tharun kumar
d565f916a8 defconfig: msm: enable remote debugger driver
Adding remote debugger device configuration. The Remote Debugger driver
allows a debugger running on a host PC to communicate with a remote
stub running on peripheral subsystems.

Change-Id: I14b3ef92e96819d119af335691e8902eb3b0178c
Acked-by: Chenna Kesava Raju <chennak@qti.qualcomm.com>
Signed-off-by: tharun kumar <mtharu@codeaurora.org>
2017-06-28 04:11:37 -07:00
Lingutla Chandrasekhar
f4beb49226 power: reset: msm: add support to select both dumps
With Minidump support enabled, user may need to request
to dump both fulldump as well as minidump for debug purpose.

Add support on dload_mode sysfs entry to select both dumps.
Enable both dumps with command:
	echo both > /sys/kernel/dload/dload_mode

Change-Id: I2f7c4c6e26dc236c75ab89490990c87b7139880b
Signed-off-by: Lingutla Chandrasekhar <clingutla@codeaurora.org>
2017-06-28 14:42:39 +05:30
Vinayak Menon
7128b46468 mm: avoid taking zone lock in pagetypeinfo_showmixed()
pagetypeinfo_showmixedcount_print is found to take a lot of time to
complete and it does this holding the zone lock and disabling interrupts.
In some cases it is found to take more than a second (On a 2.4GHz,8Gb
RAM,arm64 cpu).  Avoid taking the zone lock similar to what is done by
read_page_owner, which means possibility of inaccurate results.

Change-Id: I11ec4a3a445d602e47fcc18a3e40480b74ad98af
Link: http://lkml.kernel.org/r/1498045643-12257-1-git-send-email-vinmenon@codeaurora.org
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: zhongjiang <zhongjiang@huawei.com>
Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: David Rientjes <rientjes@google.com>
Cc: Minchan Kim <minchan@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Git-commit: a94b5fd913ac55a32fe05dfba21eb6af0e539781
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
[vinmenon@codeaurora.org: fix trivial merge conflicts]
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
2017-06-28 10:44:10 +05:30
Linux Build Service Account
f2485229cd Merge " base: firmware: add /lib64/firmware to firmware loading path" 2017-06-27 22:10:51 -07:00
Neil Leeder
5f71e693df perf: stop deadlock if attempt to bring cpu up fails
When an attempt is made to free an event on a CPU which is
no longer online, perf tries to bring the CPU online. This
can fail, resulting in an UP_CANCELLED notifier, which
eventually tries to acquire the ctx->mutex which is already
being held by the code, which brings up the CPU.

Removing the attempt to bring the cpu up will remove this
deadlock, but also requires temporarily removing support of
counting events across hotplug. This will be restored in a
later patch.

Conflicts:
	kernel/events/core.c
	kernel/events/hw_breakpoint.c

Change-Id: Iaafa3c6688d26508857472fd5bb32139a137880e
Signed-off-by: Neil Leeder <nleeder@codeaurora.org>
2017-06-28 10:09:20 +05:30
Shiju Mathew
8fcb6249ad ARM: dts: msm: Disable adv7481 on Mojave lite platform
On Mojave lite, adv7481 hardware is not available hence
disable adv7481 and bridge abstraction driver.

CRs-Fixed: 1097877
Change-Id: I1969fc45e50f5ddff25fd70780458d23a9abeed8
Signed-off-by: Shiju Mathew <shijum@codeaurora.org>
2017-06-27 21:19:16 -07:00
Tirupathi Reddy
791e28b55c ARM: dts: msm: Enable ACD functionality for SDM660 silver cluster
The adaptive clock distribution (ACD) mitigates the impact of
high-frequency supply voltage (VDD) droops on microprocessor
performance.

Program ACD functional configuration for silver cluster of sdm660.

Also add the voltage margin savings with ACD to the existing
APC0 CPR closed-loop voltage margins.

Also set CPR_RAMP_EN and VCTL_RAMP_EN bits to 1 in AVS control
register of silver cluster.

Change-Id: Iaff7769cd1e71bbeb773658d0649092bff6e8916
Signed-off-by: Tirupathi Reddy <tirupath@codeaurora.org>
2017-06-28 08:25:26 +05:30
Linux Build Service Account
be58516a4e Merge "drm/msm: pass the HDR metadata sent from userspace to sink" 2017-06-27 17:07:45 -07:00
Abhinav Kumar
dc0487cb90 drm/msm: program hdr information to HDMI registers
HDR metadata information is passed down from userspace
based on the HDR frame.

Program these properties to relevant HDMI registers
using the pre_kickoff callback registered for the
DRM HDMI connector.

This ensures that HDR information is updated on a
per-frame basis to the sink.

Change-Id: I20c4018316329b1b35a11b8ab4b96e923b3abb3a
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
2017-06-27 15:54:20 -07:00