Commit graph

304689 commits

Author SHA1 Message Date
Padmanabhan Komanduru
46fd6a9478 msm_fb: Make Vsync IOCTL during disable sequence as NO WAIT
Change to make the vsync IOCTL no wait during the disable sequence.
This is to increase the performance. Handle the synchronization of
vsync interrupt using state variables in drivers from now.

Change-Id: Ia5ec14493f233a95f21d01ea627200a6c278239f
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
2013-03-07 15:22:25 -08:00
Padmanabhan Komanduru
a57b7f57a4 msm_fb: Handle vsync interrupt properly on MDP 3.03 targets
Handle enabling/disabling the vsync interrupt and mdp clock
enabling/disabling in a better way on MDP 3.03 targets. This
will avoid target crashes due to unclocked register access.

CRs-fixed: 388751
Change-Id: I5c4a409772464ce7d06869374dcba5ad7e335955
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
2013-03-07 15:22:25 -08:00
Huaibin Yang
f72ca836e3 msm_fb: display: extend mutex protection for mdp pan display
When mdp commits a buffer to play, functions inside pan display, e.g.
mdp4_overlay_mdp_perf_upd are based on the current state of play, so
extending mutex to the scope of pan display to avoid race conditions.

Change-Id: I2e55567fd21de3738be066a2dee298d8122f12a3
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
2013-03-07 15:22:24 -08:00
Siddhartha Agrawal
5a0a4dcebf msm_fb: display: Removing extra disable irq in cmds_rx API's
Disable IRQ for DSI_CMD_TERM was already called in the isr.
Removing the extra call present in the cmds_rx API's.

Change-Id: I0000dd3166beb2a3b0c788327e1d7520e0c11a13
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
2013-03-07 15:22:24 -08:00
Kuogee Hsieh
1dd0edc628 msm_fb: display: add wait4videodone for video mode
Add wait4videodone to commit dcs commands to dsi controller
while video engine is busy so that dcs commands will be
transmitted to panel at next beginning of BLLP.

Change-Id: I7ca40124813452f25a60f899437aeb9bce6feb14
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
2013-03-07 15:22:23 -08:00
Kuogee Hsieh
1dae7817be msm_fb: display: return fail if pipe still staged
Pipe is not un-staged from mixer when it is unset.
It expects a pan_display() to un-stage it out of mixer.
Return fail at overlay_set() if pipe was still stage
at mixer.

CRs-fixed: 399193, 393979
Change-Id: I562f6e133bb239b30f4f53669dbf1cc5ddf80d02
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
2013-03-07 15:22:23 -08:00
Kuogee Hsieh
4eab59af57 msm_fb: display: fix page fault during supend/resume
There has VG1 pipe commit (pan display) happen after system
suspended. This left VG1 still staged up at mdp mixer. Once timing
generator is enabled at resume, VG1 pipe start fetching contents from
address 0 since VG1 has not yet be configured. This cause page fault.
This patch has sanity check at system suspend to make sure no any pipe
stage up at mixer after suspend.

Change-Id: Idcf974ceb4afe2a3ec55b9603b700fa497f84045
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
2013-03-07 15:22:23 -08:00
Huaibin Yang
5aac7da9b0 msm_fb: display: add mdp clk rate calculation for low vbp
For the panels that have low v_back_porch, if h/w FIR scaling is used,
during vbp time, mdp clk should be fast enough to output a line from 4
input lines. MDP rate equation for very small scaling, e.g. 1 or 2
pixels' upscaling or downscaling cannot cover this case, where
underruns are seen on those panels.

Change-Id: I4f35f98c2c1bc4ef04dfee193427bd3ff674945d
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
2013-03-07 15:22:22 -08:00
Pradeep Jilagam
5f6cce3acf msm_fb: display: Fix blend configuration for MDP4.1
MDP4.1 blend operation registers are not double buffered and
take effect as soon as they are configured. Configuring these
registers at any place other than between dma and vsync produce
flickers as new blend values would get applied to previous
mixer configurations. Configure blend operation registers just
after dma is over, before vsync.

Change-Id: I377c11222f7a0cd77e98e90edec6e2e1dc0c17ca
Signed-off-by: Pradeep Jilagam <pjilagam@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
2013-03-07 15:22:22 -08:00
Subhash Chandra Bose Naripeddy
6c3753b13b ASoC: msm: Fixes for underrun issue in LPA Playback
Update LPA platform driver to register restart callback.
The implementation of the callback is to issue a pending buffer
written by the application to restart the session when the dequeue
process is stopped due to underrun issue.
The callback is triggered from ALSA core when the framework
detects that the renderer stopped pulling data but the application
is still writing data. It runs in atomic context.

Fixes:
-A disturbance was heard when switching from one song
to the other, or when the song is paused for greater
than 3 seconds and then resumed
-This was due to the previous value of the track
volume being used in the lpa driver
-This was fixed by setting 0 as the initial volume

Change-Id: I035760937d032038fb3f3383dc87ecbdc5f4700d
Signed-off-by: Subhash Chandra Bose Naripeddy <snariped@codeaurora.org>
2013-03-07 15:22:21 -08:00
Steve Muckle
f0c313dfbe msm: dcvs: set gpu actual freq when setting gpu floor
If actual_freq of gpu is not updated when a gpu floor
is set, TZ is unaware of the gpu frequency change and
computations are based on an incorrect value. By setting
actual_freq, TZ is notified of the new gpu frequency at
the next idle exit.

Change-Id: Ifc69996ef309ed4f8a5d46a2048757e57dd1a8ec
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
(cherry picked from commit 81599d50a0d122c52c966279640d6d8c64def656)
2013-03-07 15:22:21 -08:00
Steve Muckle
83ae19aa8d msm: dcvs: add sysfs parameter for active and leakage offsets
The active and leakage energy offsets for each frequency are
best left configurable from userspace to make tuning easier.

Change-Id: I435a30d46cc02861dd7e8371b21d0433c0aa6a28
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
(cherry picked from commit 8104d6dde814e8dbb4f91a3e37a19627e7512f50)
2013-03-07 15:22:21 -08:00
Steve Muckle
425da39187 msm: dcvs: set algo params according to number of online CPUs
It is desirable for performance reasons to be able to run dcvs
with different algorithm parameters depending on the number of
CPUs that are online. The algorithm parameters are already replicated
per-CPU, but all CPUs operate in DCVS with the same parameters at
any given time.

These per-CPU parameters now correspond to the total number of CPUs
online. For example, if 2 CPUs are online, the algorithm parameters
for CPU2 are used.

Change-Id: If308a2fa949ac669823e759e0fd8e2cdbf6e4c03
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
(cherry picked from commit c48381e2336125410549d7df1425dc8009c0c495)
2013-03-07 15:22:20 -08:00
Steve Muckle
35845f10be msm: dcvs: set gpu frequency floor when multiple CPUs online
Performance is enhanced if the GPU frequency is floored at its
maximum nominal frequency when multiple CPUs are online.

Change-Id: Ib6bfd5007d660064844876b06f552f4d8c84865c
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
(cherry picked from commit 749f301c94312d2ec827c67cecb858e02383c8ab)
2013-03-07 15:22:20 -08:00
Steve Muckle
824a2394ff msm: dcvs: do not run gpu set_floor_frequency callbacks after stop_sink
Once a gpu calls stop_sink and is no longer participating in dcvs, we
should not call set_floor_frequency callbacks for that gpu.

Change-Id: I3cde82dc9975bcb37f065ea7ab8eb88a8f7fc933
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
(cherry picked from commit 77c66a3c6c27729aa0594b2f1b140aaf8f556b67)
2013-03-07 15:22:19 -08:00
Steve Muckle
fef0aad7bd msm: dcvs: drop pending frequency update on stop sink
If there is a pending frequency update when a core stops
acting as a dcvs sink, it should just be dropped, rather
than trying to honor that last frequency request.

Change-Id: Iac30cc7e06a8a70eecc4da712fdf160b788a7c2c
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
(cherry picked from commit 016af00bf66bb267cab573131598edbf83204f3f)
2013-03-07 15:22:19 -08:00
Steve Muckle
4bd4d0280d msm: dcvs: start and stop temp updates with core sink
Temperature updates should not be sent continuously just
because a core has registered with dcvs. Instead, start
and stop the updates when the core starts and stops as a
dcvs frequency sink.

Change-Id: If7721f523eb44026c421dd7ec4fa3975bc65cd09
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
(cherry picked from commit 4eb5d7cf22bbea963251ff70a7b4e28a2d883b77)
2013-03-07 15:22:19 -08:00
Steve Muckle
b4f38f5378 msm: mpdecision: wait at least 100ms between cpu hotremoves
To avoid spending a lot of time at once in the cpu hotremove
path, do not perform multiple hotremoves back to back.

Change-Id: I78a643f73718e4e08786193c71bbe2237aa790d2
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
(cherry picked from commit 9c0aa035f7aeac1b1039125bf27d51d11861fa03)
2013-03-07 15:22:18 -08:00
Steve Muckle
b84423dc28 msm: dcvs: gpu minimum frequency levels
System performance is enhanced if the gpu frequency is given a
minimum corresponding to various frequency levels of CPU 0.

Change-Id: Iba168d708524fc8ef164428bb5f4e0631a499342
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
(cherry picked from commit 682c7a01c1d86518cdc7bec25cb413498811137b)
2013-03-07 15:22:18 -08:00
Srinu Gorle
90c8000195 msm: wfd: Add error handling for input buffer ion map failure
Target reset happens when trying to do a ion_unmap_iommu
on the above fd, which was never mapped. Added a check for
non-zero virtual address.

Change-Id: I9a4d81eea6ee0cdbe3e8bbcb0c1d05c005680555
CRs-Fixed: 394779
Signed-off-by: Srinu Gorle <sgorle@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
2013-03-07 15:22:17 -08:00
Suman Tatiraju
0e217d7960 msm: kgsl: Don't reregister msm policy every time we switch policies
DCVS only expects a core to be registered once and kgsl reregisters
the core every time the policy changes. Kgsl should only do the
sink start and stop every time and only do the register the first time.

Change-Id: Id54f078d6013586899bf85fc2462e6c473ffc6b5
Signed-off-by: Suman Tatiraju <sumant@codeaurora.org>
(cherry picked from commit 229d24c088699c5f7a3591e5335dcc1668e5e913)
2013-03-07 15:22:17 -08:00
Steve Muckle
0ee68e4fdb msm: dcvs: create cpu freq table dynamically
CPU frequencies can differ between different revisions, so create
the table of cpu frequencies dynamically based on data from
acpuclock rather than using a fixed table.

Some of the data in the table comes from sync points that will be
implemented between CPU and GPU frequencies. The sync points are
defined here, but the sync implementation itself will come in a
subsequent commit.

Change-Id: I24cf17b199df1e5d064c1894b269e49118b39ac7
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
(cherry picked from commit f9a8749b17961be653e9cbb426b1b72cada7f61c)
2013-03-07 15:22:17 -08:00
Steve Muckle
cc67f22968 msm: dcvs: run dcvs, mpdecision threads at default priority
It is not necessary to run these threads at a realtime
priority level.

Change-Id: I8c6492f22e803811db5757c51beeeb81f93f32b6
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
(cherry picked from commit 8862f41f1c632ba84f0a21e8045d70278fd67fd3)
2013-03-07 15:22:16 -08:00
Steve Muckle
b3bac64cee msm: dcvs: add frequency transient control to sysfs
It is useful to be able to toggle at runtime whether
particular DCVS points are used as transient levels. This
adds a sysfs node per core which when read returns a list
of the currently enabled DCVS transient levels. Writing
the frequency of a DCVS transient level toggles whether it
is enabled or not.

Change-Id: I69ebb6974e97efa832798047259b9acdfd08aa7c
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
(cherry picked from commit 2f6db34b3216695d4f624d2204d5e1356e62c3d5)
2013-03-07 15:22:16 -08:00
Azam Sadiq Pasha Kapatrala Syed
7ef421aecd msm: camera: Recover camera when sensor is pulled off.
This patch ensures that camera is recovered by propogating the
error event when sensor is pulled off.

Change-Id: I4147e02342c2538db8337d3e04735cf97b2d7635
Signed-off-by: Azam Sadiq Pasha Kapatrala Syed <akapatra@codeaurora.org>
2013-03-07 15:22:15 -08:00
Carter Cooper
2f3e71caaa msm: kgsl: Enable GPU to use multiple IOMMU devices
Set the defualt IOMMU count to two for the GPU.
If the device is 8960 (ie not 8960PRO), set the IOMMU
count to one and let kgsl take care of initializing only
one IOMMU device.

Change-Id: I736a6d6744c4359ec5cc923d6eddd652451c81a1
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
Signed-off-by: Gopal Goberu <ggober@codeaurora.org>
2013-03-07 15:22:15 -08:00
Sameer Thalappil
7a2b4d8d3b defconfig: wlan: Remove prima WLAN driver
Prima WLAN driver is now built as DLKM

Change-Id: I8ecbebf59efe9a77579b6efb087b6add81a47702
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
2013-03-07 15:22:14 -08:00
Gagan Mac
1dd5d0ee94 msm: 8960ab: Correct graphics 3d port representation
The graphics 3d ports need to be separately halted/unhalted.
Facilitate this by mapping to separate external IDs.

Change-Id: I88221ba574267ffcc42d1b30df3c77647df3df8f
Signed-off-by: Gagan Mac <gmac@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
2013-03-07 15:22:14 -08:00
Arun Menon
26c973246d msm: wfd: enable CONFIG_MSM_WFD for msm8960.
CONFIG_MSM_WFD needs to be set to build wfd driver.

Change-Id: I9d3ee99998fe284bfaad59dc15f44a295fe9f0e4
Signed-off-by: Arun Menon <menon@codeaurora.org>
(cherry picked from commit dbea05705f5ac5fe266f3cf75cc839e53bbb67fa)
2013-03-07 15:22:13 -08:00
Carl Vanderlip
c52e9d66b7 video: msm: Update MDP revision definition
Update the display board file to reflect the correct MDP revision.

CRs-Fixed: 417080
Change-Id: I67fd13670225c97be857ae3826cf90bb8724bb5d
Signed-off-by: Carl Vanderlip <carlv@codeaurora.org>
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
(cherry picked from commit 1606ca35012c89f0dc52a6c3a9a574668915c4f8)
2013-03-07 15:22:13 -08:00
Huaibin Yang
1a842e0ea7 msm_fb: display: add config of wb_mux_sel during update
To make sure for each writeback play the reg is configured and avoid
mdp hang.

Change-Id: I29bdc31f27accca84e7add126c1c1e3c8a78fa15
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
(cherry picked from commit 36ca4e992dc5c75a2dd709969db850aa02e7c6e7)
2013-03-07 15:22:13 -08:00
Huaibin Yang
86f43ec47d msm_fb: display: empty pending queue during suspend for wfd
Add the logic for wfd writeback interface. It already presents on
other display interfaces.

Change-Id: I389be77ec18041e260d0e71940586e86f1841ff8
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
(cherry picked from commit 3df55288659cfa826e9ad89cb38a8b722b2ae20f)
2013-03-07 15:22:12 -08:00
Nagamalleswararao Ganji
d366a8bb2c msm: board-8930: adding the dsi pll client to 8917 dsi regulators
pm8917 dsi regualators missing the dsi pll client which is causing
the clock warnings while system suspend

Change-Id: I9ffa310df81b66d3adf8c272666c4d3d9f933103
Signed-off-by: Nagamalleswararao Ganji <nganji@codeaurora.org>
(cherry picked from commit c2e5752d280d1ab8fb3efe341fcb3a56c7bd1a65)
(cherry picked from commit 30f86aa5c694215b89965b633330af4459f1c4e3)
2013-03-07 15:22:12 -08:00
Aravind Venkateswaran
b330a534d7 msm: board-8930: Remove HDMI clocks from MDP GDHS data
MSM8930 with PMIC8917 does not support HDMI. This change
ensures that HDMI clocks are not set/reset as part of the
MDP GDHS sequence for this particular cofiguration.

Change-Id: I020a87b5c96df3c75b47aa13b65da0f03eb60b00
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
(cherry picked from commit 67d033439cd3d632a062b76bb6e74a5819c99851)
(cherry picked from commit d49ea2e1924bde3d67e8bb9195cc81c88a119d69)
2013-03-07 15:22:11 -08:00
Kalyan Thota
531c753232 msm_fb: Wifi display changes for commit ioctl
This change handles panel updates for WFD panel via
overlay_commit interface, along with conglomeration of
some common code across pan_update and overlay_commit ioctls

Signed-off-by: Kalyan Thota <kalyant@codeaurora.org>

Conflicts:

	drivers/video/msm/mdp4_overlay.c
	drivers/video/msm/msm_fb.c
	include/linux/msm_mdp.h

Change-Id: I9e332856782c59ab598bb388a2ec482076746ad2
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:22:11 -08:00
Kuogee Hsieh
0cb749aee4 msm_fb: display: empty pending queue during suspend
Overlay_play() adds a pipe into pending queue and pan_display()
will commit those pipes to hardware and empty queue. This patch
will make sure queue is empty at suspend so that no unexpected
pipes will be commited to hardware by pan_display() at resume.
Otherwise, iommu page fault may happen.

Change-Id: Iafdf469c6cdbf5d469c9dee114555a8d1adb9c66
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>

Conflicts:

	drivers/video/msm/mdp4_overlay_dsi_cmd.c

Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:22:10 -08:00
Kuogee Hsieh
03528a7a6a msm_fb: display: wfd with vsync driven frame push
To improve performance, hardware vsync event at mdp driver
is passed to framework so that both composition and frame
update are aligned at vsync event. This patch will upgrade
wfd to incorporate vsync driven frame push in consistence
with other interfaces.

Change-Id: If088826ec387446301f1f6acc311d909edb04163
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
(cherry picked from commit d74db5fcf24a223570137087aa5632593b315fcc)

Conflicts:

	drivers/video/msm/mdp4_overlay.c
	drivers/video/msm/mdp4_overlay_writeback.c

Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:22:10 -08:00
Ameya Thakur
d695cf135e msm:subsystem_restart:Restart device when SSR phase one is invoked
When subsystem restart is called and the restart level is one the device
will reboot. It was earlier set up to just print out a warning message.

Change-Id: I7a652d64d71bbd7ab8de33e97c01bf3c4c2c7e4b
Signed-off-by: Ameya Thakur <ameyat@codeaurora.org>
2013-03-07 15:22:09 -08:00
Carter Cooper
434b27366c msm: kgsl: Always reset global ts_cmp_enable on GPU interrupts
Always rest the ts_cmp_enable when an interrupt is received
from the GPU.  This keeps legacy code that is not using
per context timestamps correctly updated.  No effect is
seen with mainline code using per context timestamps.

CRs-fixed: 418172
Change-Id: I7f29086d4885571bdb165c0e759dc6ffc40b554f
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
Signed-off-by: Rajeev Kulkarni <krajeev@codeaurora.org>
2013-03-07 15:22:09 -08:00
Ranjhith Kalisamy
c9e2c31da4 msm: kgsl: Set sysfs max clock for devices with no power scale policy
When the sysfs entry for max clock is updated, set it immediately for the
devices that has no power scale policy. This prevents the device from
running with undesired clock.

Change-Id: I3211234f6d2afe4c2de115dace70b332d2b30f21
CRs-fixed: 408963
Signed-off-by: Ranjhith Kalisamy <ranjhith@codeaurora.org>
Signed-off-by: Rajeev Kulkarni <krajeev@codeaurora.org>
2013-03-07 15:22:09 -08:00
Rajeev Kulkarni
6fa6ec1564 msm: msm_bus: Add support for 64-bit bandwidth requests
With 8974, bandwidth requests are exceeding integer size.
Update ab and ib to ensure values over 4Gbps can be requested.
For 64-bit support, there are four changes in this patch:
Changes in the bus driver structures and functions to
update ab and ib values to uint64.
Updates in client drivers to ensure that the bus APIs
are called with the right types.
Updates to the device-tree. Device-tree nodes don't
provide a clean mechanism to read a combination of u32
and u64 variables within the same property name. So, the
ab and ib values must be specified in kbps instead of
bytes/sec from the device tree. The bus driver function
will convert the ab and ib values read from device-tree
to Mbps.
Change the existing property names to make them consistent
with the convention used by the new property  name, which
abides to the Device Tree convention.

Change-Id: Ib0a6db0e221af366c61c51cc21ac722f02cb7a34
CRs-Fixed: 408786
Signed-off-by: Gagan Mac <gmac@codeaurora.org>
Signed-off-by: Rajeev Kulkarni <krajeev@codeaurora.org>
2013-03-07 15:22:08 -08:00
Phani Kumar Uppalapati
8e3c504629 kernel/msm: 8974: Audio ocmem driver changes to use bus dt APIs
Populate bus vectors for the audio ocmem driver with use of new
bus device tree APIs.

Change-Id: If965c269706763a3a67b22243f265429f23427d6
Signed-off-by: Phani Kumar Uppalapati <phanik@codeaurora.org>
Signed-off-by: Rajeev Kulkarni <krajeev@codeaurora.org>
2013-03-07 15:22:07 -08:00
Phani Kumar Uppalapati
5803131281 ASoC: msm8974: Audio ocmem driver changes to fix playback issues
Fix issues when alloc grow, shrink requests received while display
off/on. Add return statement to the audio/voice workqueue for the safe
exit.

Change-Id: Ifda7823f68ef0f26b9fe781c4c509c7633291169
CRs-fixed: 404445
Signed-off-by: Phani Kumar Uppalapati <phanik@codeaurora.org>
Signed-off-by: Rajeev Kulkarni <krajeev@codeaurora.org>
2013-03-07 15:22:06 -08:00
Rajeev Kulkarni
89a03c7ada msm: kgsl: Fix adreno idle detection during hang
Adreno idle detection during a hang was being obstructed when
called from adreno_waittimestamp(). The variable active_cnt which
was meant to protect the device from going into suspend while
doing a waittimestamp was being set and was preventing the
check of rbbm_status register which was leading to a false hang
detection, where, if the rbbm_status register value had been
probed the device would have been found to be idle. We fix this by
having a separate function is_adreno_rbbm_status_idle() which checks
this register and report whether the core is idle or not. And we call
this function instead of the generic adreno_isidle() inside
adreno_hang_detect(). Doing this fixes at least one scenario of false
hang detection.
CRs-fixed: 406631

Change-Id: I44b5446769eaa361cca63674f700153ee3faff45
Signed-off-by: Harsh Vardhan Dwivedi <hdwivedi@codeaurora.org>
Signed-off-by: Rajeev Kulkarni <krajeev@codeaurora.org>
2013-03-07 15:22:06 -08:00
Shubhraprakash Das
0d3bba906a msm: kgsl: On pagefault stall GPU so that it hangs
Prevent the iommu fault handler from clearing the stalled status
of GPU on page fault. This will cause a GPU hang and print out
the snapshot that will help in fault analysis.

Change-Id: I9dcab83a098a988f86a0c03c46b0dbe6624de937
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Signed-off-by: Rajeev Kulkarni <krajeev@codeaurora.org>
2013-03-07 15:22:05 -08:00
Rajeev Kulkarni
8f8d09ec70 msm: kgsl: Enable "big page" memory allocations
Allow users to specify "big page" mode when allocating GPU
memory. This will attempt to allocate contigious units of 64k
bytes per instead of the usual PAGE_SIZE units.  If the allocation
fails, then automatically fall back to allocate the rest of the
region with 4K pages. This means that potentially any allocation
could be comprised of a mixture of 64k chunks and 4k chunks.

Change-Id: Ib92c0c099d3b10ba54dbb864c5f977f8df4912f2
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
Signed-off-by: Rajeev Kulkarni <krajeev@codeaurora.org>
2013-03-07 15:22:05 -08:00
Suman Tatiraju
06ab48ada4 msm: kgsl: set io_fraction to max for msm policy
io_fraction is set to max so that io_wait gets reported
for DCVS so that MP decision won't offline cores
during GPU activity.

Change-Id: I39db72dd9c443069675a8a1b1f4e17d8928625b8
Signed-off-by: Suman Tatiraju <sumant@codeaurora.org>
Signed-off-by: Rajeev Kulkarni <krajeev@codeaurora.org>
2013-03-07 15:22:04 -08:00
Jeremy Gebben
6f8e31e840 msm: kgsl: add per-process memory info to debugfs
Add a file for each process in debugfs named, kgsl/proc/<pid>/mem
which contains information about all memory allocations the process
has made.

Change-Id: Ice3f039d92cc1b1cdb5a6192808441ddfdf8abfb
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
Signed-off-by: Rajeev Kulkarni <krajeev@codeaurora.org>
2013-03-07 15:22:04 -08:00
Jeremy Gebben
4935c87a80 msm: kgsl: add userspace memory type to ftrace events
Add a "usage" field to memory allocation, mapping and
free ftrace events.

Change-Id: I673a9593650d5285b0abc8c94de8f9f80d3d449e
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
Signed-off-by: Rajeev Kulkarni <krajeev@codeaurora.org>
2013-03-07 15:22:03 -08:00
Jeremy Gebben
fa66e94752 msm: kgsl: set userspace memory type on each memdesc
Userspace passes a set of values indicating how it
uses each buffer it allocates, which were previously
ignored. These are useful hints for debugging and
profiling applications. These flags will be exposed
through ftrace and debugfs in later patches.

Change-Id: Ie26c26e413c074dcd5dfa24d355443ee47c3cd6a
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
Signed-off-by: Rajeev Kulkarni <krajeev@codeaurora.org>
2013-03-07 15:22:03 -08:00