Clock driver has initialization functions to do some one time
clock configurations e.g. enable/disable clock dynamic gating.
Add this support for 8930ab. Note that the dynamic clock gating
is disabled and will be added once it is verified on 8930ab.
Change-Id: I5f9dbbd1deeb084ca3d58d7be2407ccbb10bc977
Signed-off-by: Tianyi Gou <tgou@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
On 8930ab, gfx3d and vcodec maximum frequencies have been bumped
to 500MHz and 266MHz respectively. Therefore, update PLL15 frequency
to 1000MHz to support gfx3d clock at 500MHz and also update Fmax
values for both gfx3d and vcodec clocks.
Change-Id: I6296a59fcc67b4edc38834009ce9403df2cf2ab6
Signed-off-by: Seemanta Dutta <seemanta@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
Remove support for 325 MHz in 8960ab and 8064, and replace with
320 MHz. This allows the targets to share the same freq table with
8930.
Change-Id: Ib1d4a850b46683db5ae818eb157abde164c0ca65
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
Not all clocks can capture their fmax data with an array size of 4. So,
change the fmax entry from an array to a pointer and add a num_fmax field.
This allows each clock to specify fmax data of different length. Also, this
makes fixing up of fmax entries based on SoC id and version a lot easier.
Obviously, if a clock can have more than 4 fmax levels, the vdd class would
also need more than 4 levels. So, update the vdd class code in a similar
fashion.
Conflicts:
arch/arm/mach-msm/clock-9625.c
Change-Id: I12568dd8fa7c0f8dcfeff68d8ca8de8810445cc7
Signed-off-by: Saravana Kannan <skannan@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
There is no reason to hold a spinlock here anymore when the
vdd_class is only updated in non-atomic context. Move to using a
mutex instead. We couldn't do this before because voltage voting
was done in atomic context.
Change-Id: I7cd0469194d9fd57bd6a6ba34ff51a089812b96d
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
Expose the features of "clock.h" outside of mach-msm so that new clock
drivers leveraging the framework in mach-msm/clock.c can be implemented
outside of the mach-msm sub-architecture directory.
Conflicts:
arch/arm/mach-msm/board-8226.c
arch/arm/mach-msm/clock-mdss-8974.c
Change-Id: I0dea8c716ed6f81c0296a21dd1d96701dfed5a63
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
If multiple clock drivers wish to use the framework in mach-msm/clock.c,
then it is necessary for additional clock tables to be registered after
msm_clock_init(). Add the msm_clock_register(table, size) API to
accomplish this. Unlike msm_clock_init(), msm_clock_register() can be
used multiple times and called after the kernel has finished booting.
To support debugfs features for clocks registered with the new API,
changes are required to debugfs initialization, which is now done as
part of msm_clock_init() rather than clock_late_init(). A linked list
is used to chain together the tables of clocks so their state can be
printed by clock_debug_print_enabled().
Change-Id: I55f1b804513d5d343f4a4ecf8858577db3759c9c
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
Now that all clock consumers have moved over to using the
clk_prepare/unprepare APIs we can remove the warned flag that
used to indicate that we had already warned about improper usage
of the clock APIs. In particular, we used this flag to avoid
printing warnings for "source" clocks such as PLLs and
crystals that no consumer directly controls but that the clock
driver calls clk_enable() on during clk_set_rate().
Let's use a local variable for clk->dbg_name too because we use
it many times and it makes lines too long.
Change-Id: I0cb3052fd3dec2e46788fbf039ac73f65551e9f9
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
The mdss_extpclk clock is sourced from the HDMI PHY PLL, which
is programmed by the HDMI driver. Add support for this PLL, and
link up the PLL with the exptclk via the set_rate op in the RCG.
Change-Id: I32d31780bab32c4bef92dbe230014030f8dc9a06
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
The display clocks require the display driver to configure a PHY PLL.
Add support for calling into the PLL configuration code and link this
into the clock ops for the DSI pixel and byte clocks.
The RCG clock type is re-used here for the pixel and byte clocks; the
interaction between the DSI PLL code and these clocks can fit into
the existing RCG ops. As the design matures, this decision may change
in the future.
Change-Id: I7f5ed95f7f2af48f5d860d072fd5040b3a10cd86
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
Update cpu_is call sites and users of the 8930 CPU macro to
to include support for MSM8930AB where appropriate.
Change-Id: I4192cf55e15799f5b96bf7d847add4fa543a4e7a
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
Add the MSM SoC ID information and cpu_is function for
supporting the MSM8930AB target.
Change-Id: I669bf77389fde84d2278f132fae804bf77c37b74
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
Refactor common combinations of cpu_is macros into logical
SoC class macros to reduce the maintenance burden of
implementing support for additional product variants.
Conflicts:
arch/arm/mach-msm/include/mach/socinfo.h
Change-Id: I6916dcb30378cd3ba33ea8d863403f93f62a13f2
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
MSM8930AB supports higher cpu frequencies than MSM8930. In
addition, it supports both pmic 8038 and pmic 8917. Add these
support in this patch.
(cherry picked from commit 2520b6eff1349a43036f77af33b2b47a7a28a8aa)
Conflicts:
arch/arm/mach-msm/Makefile
Change-Id: I3f64ab0968aa06e3813d90f848def1d3484e0bb8
Signed-off-by: Tianyi Gou <tgou@codeaurora.org>
Signed-off-by: Anil Gahlot <anilg@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
Heap mask field passes as argument at allocation time to specify ion
heap.
Change-Id: I6951da81b11bfcb0e006d2539c1707aabbb12db6
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
All msm_ion clients need to use <linux/msm_ion.h> instead of
<linux/ion.h>
Change-Id: I9a6e95048b9c7a89e6a01c456a36a315ce79e64b
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
All msm_ion clients need to use <linux/msm_ion.h> instead of
<linux/ion.h>
Change-Id: Ia8cf2d01d72e30a9fa68a1608ecefb07867e6504
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
All msm_ion clients need to use <linux/msm_ion.h> instead of
<linux/ion.h>
Change-Id: I05f5fb6c606768b480f664fc780d88edcd1b95bc
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
All msm_ion clients need to use <linux/msm_ion.h> instead of
<linux/ion.h>
Change-Id: I7ab1595d0811dc6d053195ec80cb57cc108b23d6
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
All msm_ion clients need to use <linux/msm_ion.h> instead of
<linux/ion.h>
Change-Id: I809bc6b523e5469591ca38e663ebc0e0a38181f6
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
All msm_ion clients need to use <linux/msm_ion.h> instead of
<linux/ion.h>
Change-Id: I8572215d3826824044e71f624143d612637dd4b2
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
All msm_ion clients need to use <linux/msm_ion.h> instead of
<linux/ion.h>
Change-Id: I3a1609e57c5156742300706cee698bd6e829c948
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
All msm_ion clients need to use <linux/msm_ion.h> instead of
<linux/ion.h>
Change-Id: I16ad3bb40a76e414881bbf41b789d7bbed07ccdd
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
All msm_ion clients need to use <linux/msm_ion.h> instead of
<linux/ion.h>
Change-Id: Iccf733e83c0621125f5e32e58f4bc7891b2159a0
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
All msm_ion clients need to use <linux/msm_ion.h> instead of
<linux/ion.h>
Change-Id: I6d05f982b35cbfed70bdd36c3b09fa1b37c88dfe
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
All msm_ion clients need to use <linux/msm_ion.h> instead of
<linux/ion.h>
Change-Id: I834f3959985e74843b81b367df92fa48aa87cec7
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
All msm_ion clients need to use <linux/msm_ion.h> instead of
<linux/ion.h>
Change-Id: I7abd97d3beeee7b3d5639871ebd50ebf89d87f5d
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
All msm_ion clients need to use <linux/msm_ion.h> instead of
<linux/ion.h>
Change-Id: Id9ca03e8f9c8c53b2ad8f17ebbe6ceecc596a211
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
All msm_ion clients need to use <linux/msm_ion.h> instead of
<linux/ion.h>
Change-Id: I41320985706f1771ed98d982b02f20db1990d29e
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
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)