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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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>
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>
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)
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)
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)
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>
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>
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>
Set the address translation to happen via ttbr0 for GPU IOMMU till
address 0x80000000 instead of 0x40000000. Also, adjust the size of
virtual pool so that it does not allocate an address greater
than 0x80000000.
CRs-fixed: 401364
Change-Id: I268dda47e82e80a7ee0a72a835c7777be8b6f7f5
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Signed-off-by: Rajeev Kulkarni <krajeev@codeaurora.org>
Update data from preliminary values to final data.
Change-Id: I2ab9caa46d2bfabcd24a1ece7bd69296d8c8cde0
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
Write packing control prevents degradation of read throughput
in parallel read and write scenarios when the write packing
feature is enabled
(cherry picked from commit dffdbad64760df63918aad2cb148f7286f852dd1)
Change-Id: Id1aadcd21c88619e4c848872a149542495ede180
Signed-off-by: Maya Erez <merez@codeaurora.org>
Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org>
(cherry picked from commit 681c3b752850b8d8a8ef8e16905e1b1fb290551a)
Signed-off-by: Maya Erez <merez@codeaurora.org>
The write packing allows sending several requests in a single command
to the card and increases the eMMC performance in sequential write
operations.
(cherry picked from commit 34a444f2041763d617391be44f4a9ac1b7d6eab7)
Change-Id: I45978c8130d3898b21e36309696647c380521a87
Signed-off-by: Maya Erez <merez@codeaurora.org>
Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org>
(cherry picked from commit 94a78f62307a53e9051e6f3970e1a937361078ba)
Signed-off-by: Maya Erez <merez@codeaurora.org>
Adds three new subdevices:
- Encoder subdevice to interface with new venus driver
o Renamed enc-subdev.c to enc-mfc-subdev.c which only
compiles for targets using the Samsung MFC core.
- MDP subdevice to interface with new MDSS driver
o Renamed mdp-subdev.c to mdp-4-subdev.c used for targets
using MDP4.
- MDP subdevice for debugging purposes
- Introduce a Kconfig file to properly choose between subdevices
according to target
Change-Id: I125b39cfdeb1fbb4adf7c15d0c4452146764f985
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
Signed-off-by: Amara Venkata Mastan Manoj Kumar <manojavm@codeaurora.org>
Starting with B family chips, the IOMMU client is responsible
for registering a domain (page table) and attaching it with
the corresponding device context when required.
Signed-off-by: Ankit Premrajka <ankitp@codeaurora.org>
Conflicts:
include/media/videobuf2-msm-mem.h
Change-Id: I2105f3cdd94a5e42c09a46e32ed615a35615485d
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
This reverts commit 181fc587a179363624b9a3b47bcd0c04c05a8553
Reverting as Bluez stack need to be supported
Change-Id: I057586ea30381cf9ef0fa0bdcb26f9fc734b1423
To workaround a Krait errata on 8064, disable secondary clock source
gating during the MUX switch. This errata was already worked around
in msm-krait-l2-accessors.c in a different way, but that will soon
be removed in favor of this and some power-collapse changes.
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
Change-Id: Iffe42ee7216c9b9c4a4e68ddfe80fbc03b0413b0
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
Add support for 1.7 GHz and 2.0 GHz parts and their corresponding
L2 and memory bandwidth votes.
Support selecting different PVS tables based upon EFUSE speed bin
across all krait targets.
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
Conflicts:
arch/arm/mach-msm/acpuclock-8064.c
Change-Id: I560371c3c5476f72444a8f2a88b9c441f3451ae1
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
With use of the QSB clock source recently eliminated, only one
input of the secondary clock MUX is used on any target. Since
there is overhead involved reprogramming this MUX when changing
the CPU and L2 frequencies, change the code to just program the
MUX at boot. Most noticeably, this removes a 1us delay from
every CPU and L2 frequency switch.
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
Conflicts:
arch/arm/mach-msm/acpuclock-8064.c
Change-Id: I404913cec05f8893e08bf3f8d0c0f691c8d0f7d9
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
Devices appear stable at these increased rates, even on early
hardware. Raise the frequency limit from 1.0GHz to 1.5GHz.
Change-Id: Ic0b5e8193a94d39c53721350b966656d5f734e33
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
When AVS support is available, it must be disabled during any
CPU frequency or CPU voltage changes. Add the hooks to do this.
Since AVS isn't supported on all variants of Krait that
acpuclock-krait supports, have a flag indicating if AVS is
enabled and only configure AVS if the tables support an AVS
setting.
Change-Id: Ide542596b51af18dece4c062b38173ce6e1bc2a0
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Correct the efuse address base and offset for 8974. Since the offset
is now different on 8974 than on other Krait-based targets, it's no
longer possible to hard-code it in acpuclock-krait.c. Instead, move
it into the QFPROM address passed from SoC specific files.
Since the PTE EFUSE is not yet used on 8974 to select different
frequency/voltage tables, this change should have no current
functional effect.
Change-Id: I26de7c9ce84e2873b883123f9fe420b3cb14e364
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
This line was somehow left out when initially copying the
acpuclock-8960 file over to the acpuclock-8960ab file.
Without this line, power collapse leaves the Krait PLL enabled,
causing failures upon resume.
Change-Id: I1339192d59d8b7f4135b32dcb5807bfc4dababfc
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
Starting with B family chips, the IOMMU client is responsible
for registering a domain (page table) and attaching it with
the corresponding device context when required.
Signed-off-by: Ankit Premrajka <ankitp@codeaurora.org>
Conflicts:
include/media/videobuf2-msm-mem.h
Change-Id: I98f97805a67d597da55780f8c6739c9734a19a14
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
The version of packing support excepted by the linux community is
slightly different from the one that was merged. This revert is needed
in order to upload the latest version from the linux community.
This patch reverts the following commits:
1.mmc: card: Add eMMC4.5 write packed commands unit-tests
2.mmc: card: Fix packing control enabling algorithm
3.mmc: block: Add MMC write packing statistics
4.mmc: msm_sdcc: enable the write packing control
5.mmc: msm_sdcc: Enable write packing capability
6.mmc: block: Add write packing control
7.mmc: core: Support packed write command for eMMC4.5 device
8.mmc: core: Add packed command feature of eMMC4.5
(cherry picked from commit f94cf3da103b344b13fa4d6665fd21dad1b95ead)
Change-Id: I2efc6dc8d8f6d5cc7e9efa99ec74914ffff96fcd
commit: 9b54d88c6a11ebfe069b7fdebcb521da21754c3f
commit: e2ecb58a6c5011549aac3e86fb1c13e7b7c65104
commit: e544d700e2dac1584a8172c4dc347d81ede203bd
commit: 8afe8d2a98a1bbf3804162ff5c95a56226935f5a
commit: 25e2261a556c4393f79d58bce814bb3df34b9549
commit: 63c61d6d8b8f37c71b4162b3affffdf72ac06811
commit: 968c774ea6466fa7adbf2eac333220132acda306
commit: 516994eee39282b8648b509e449ff83b49833209.
Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org>
(cherry picked from commit 31fe84d6edae65f9df5663538e528697897be86e)
Signed-off-by: Maya Erez <merez@codeaurora.org>