Age | Commit message (Collapse) | Author |
|
This addresses a type warning, which elevates to a broken build
because of -Werror:
CC drivers/gpu/arm/midgard/ipa/mali_kbase_ipa.o
drivers/gpu/arm/midgard/ipa/mali_kbase_ipa.c:582:22: warning:
initialization from incompatible pointer type
[-Wincompatible-pointer-types]
error, forbidden warning:mali_kbase_ipa.c:582
.get_static_power = &kbase_get_static_power,
^
drivers/gpu/arm/midgard/ipa/mali_kbase_ipa.c:582:22: note: (near
initialization for ‘kbase_ipa_power_model_ops.get_static_power’)
drivers/gpu/arm/midgard/ipa/mali_kbase_ipa.c:583:23: warning:
initialization from incompatible pointer type
[-Wincompatible-pointer-types]
error, forbidden warning:mali_kbase_ipa.c:583
.get_dynamic_power = &kbase_get_dynamic_power,
^
drivers/gpu/arm/midgard/ipa/mali_kbase_ipa.c:583:23: note: (near
initialization for ‘kbase_ipa_power_model_ops.get_dynamic_power’)
scripts/Makefile.build:277: recipe for target
'drivers/gpu/arm/midgard/ipa/mali_kbase_ipa.o' failed
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
|
|
user_atom.atom_number can be indirectly controlled by user-space,
hence leading to a potential exploitation
of the Spectre variant 1 vulnerability.
This issue was detected with the help of Smatch:
drivers/gpu/arm/midgard/mali_kbase_jd.c:1397 kbase_jd_submit() warn:
potential spectre issue 'jctx->atoms' [r]
katom = &jctx->atoms[user_atom.atom_number];
Fix this by sanitizing user_atom.atom_number
before 'katom = &jctx->atoms[user_atom.atom_number];'.
Notice that given that speculation windows are large, the policy is
to kill the speculation on the first load and not worry if it can be
completed with a dependent load/store [1].
[1] https://marc.info/?l=linux-kernel&m=152449131114778&w=2
Fixes: 5cf27d0b6090 ("Mali: midgard: changes to enlarge BASE_JD_ATOM_COUNT to 512, for defect 184210")
Change-Id: If52f30d29a80a06c6693ddadd5947ab9fe8fbc25
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
|
|
The source code of mali_so must be modified correspondingly.
Change-Id: I3f4bd03fa2d369d912e6bc05c53d2d3abefb92d3
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
|
|
According to commit "mmap: introduce sane default mmap limits"
Change-Id: I96bc78053c06fdeaef178662dda36770da867436
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
|
|
For RK redmine Defect #168230.
Change-Id: I3cd6544dd23b833138e4cc700a8f2cdd627ff592
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
|
|
Change-Id: Ibf1c6ebd91d2e793fa8efe0383df346dd8c67b45
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
|
|
The midgard for linux is used for mali r9 library, which is not
used and update anymore.
Change-Id: I446c9b223b5235b40eb28cd8001d318578b16ba2
Signed-off-by: Randy Li <randy.li@rock-chips.com>
|
|
Change-Id: I2358d75c2fdada7cfe385e85d2106370f9aa5ea3
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
|
|
Sometimes the regulator is shared between several devices, if target rate
and target voltage are equal to initial rate and iniital voltage , the
min_uV and max_uV of regulator will be always equal to zero, other devices
may set a low voltage.
Change-Id: Ibf82f335ce0739776286e3733be5415f84bf035b
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
|
|
with following modifications :
fix some compile errors when ARCH=arm;
replace "mali_base" with "midgard_base" in Kbuild files;
fix a compile error when MALI_PWRSOFT_765 enabled;
set "default n" for MALI_KUTF and MALI_IRQ_LATENCY.
Change-Id: I858c72aab939002c8e6241cd75fa8877ebbf6c35
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
|
|
Change-Id: I31ecc394c8ac971ed915b18b08d5b5cba5d440e2
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
|
|
Opp rate is used to calc power in thermal framework, so we record
this rate instead of real clock rate.
Devfreq is not ready in target() when use performance governor, so
we need record opp rate in probe().
Change-Id: Iec1918ad5d12124b9f112964f247339e0d50645f
Signed-off-by: Liang Chen <cl@rock-chips.com>
|
|
Some optimizations on files of KBuild in addition.
Change-Id: I1db012e116b8b69897a2791ae610da35365a1a61
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
|
|
Change-Id: I754250669891307b0deab2bdab1bd01512713f79
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
|
|
callbacks
When the devfreq cooling device was designed, it was an oversight not to
pass a pointer to the struct devfreq as the first parameters of the
callbacks. The design patterns of the kernel suggest it for a good
reason.
By passing a pointer to struct devfreq, the driver can register one
function that works with multiple devices. With the current
implementation, a driver that can work with multiple devices has to
create multiple copies of the same function with different parameters so
that each devfreq_cooling_device can use the appropriate one. By
passing a pointer to struct devfreq, the driver can identify which
device it's referring to.
Change-Id: I384bf9aafd2391eccab2ca6a76e4e57f2740aa6b
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Eduardo Valentin <edubezval@gmail.com>
Reviewed-by: Punit Agrawal <punit.agrawal@arm.com>
Reviewed-by: Ørjan Eide <orjan.eide@arm.com>
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
Signed-off-by: Javi Merino <javi.merino@arm.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit 3aa5374376746f20a27be8682be7f91c8b71d1d8)
|
|
Some chips need adjust opp level by different chip-process, add
common functions to select opp level from device-tree, so modules
can select opp level easy.
Change-Id: Ifbd5f720e6a52a68f13697bbb37ac01ff4a87e3e
Signed-off-by: Liang Chen <cl@rock-chips.com>
|
|
The greater leakage, the lower the OPP's voltage. In order to reduce
power consumption, it is necessary to adjust OPP's voltage according
to leakage.
Change-Id: I2bba04ac941cc6a0703b5208cb4e757ec2813bab
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
|
|
At same voltage and frequency, the greater the PVTM value, the lower
the OPP's voltage. In order to reduce power consumption, it is necessary
to adjust OPP's voltage according to PVTM value.
Change-Id: Ifcac57fc965e3ea45523db2d9df19435479f6cee
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
|
|
If the temperature(sbs-battery) reaches the switch_on_temp, it would try
to calculate requested power of all thermal instances. Then hit the
crash[0] caused by the gpu thermal sensor, since the thermal driver had not
registered in time.
[0]
[ 0.827943] Call trace:
[ 0.827953] [< (null)>] (null)
[ 0.827969] [<ffffffc00070af1c>] get_static_power+0xd8/0xe8
[ 0.827981] [<ffffffc00070b190>] devfreq_cooling_get_requested_power+0x94/0x170
[ 0.827997] [<ffffffc0007094c8>] power_allocator_throttle+0x270/0x804
..
Change-Id: I63f66e54d69115165a7b3ec798b9009c360daa62
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
|
|
This reverts commit eb6c2ed7207f4dd086548dd58589ed4ea042504f.
Change-Id: I09424d08bfac3457da24b10fe2b97d2856399e63
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
|
|
voltage""
This reverts commit e7db50b51268386fd0e9f88a95c45a4ef3454c4e.
Change-Id: I47f9c1d114b06264d6dd4098bc0e00228fd8f187
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
|
|
To ensure that the work is executed before system being suspended.
Change-Id: Iec1bd114dfff53e2464540f09ced66cf6be81d1a
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
|
|
Change-Id: I383779bd39d6ae52f65ad25bf2e0eb0f1a25dd00
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
|
|
Along with a slight modification in mali_kbase_core_linux.c,
for building in rk Linux 4.4:
-#if KERNEL_VERSION(4, 6, 0) > LINUX_VERSION_CODE
+#if KERNEL_VERSION(4, 4, 0) > LINUX_VERSION_CODE
Change-Id: I34565cb975866b46c5e3a4d8e2ac5e350dcceb80
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
|
|
This reverts commit d94880b547779baaaa9e9b733c38881cad8aa685.
Change-Id: Iac64d84ff5a7ee3e5666ed2829c17de413fc9bcd
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
|
|
This reverts commit 89501d8dd3c214e4a162e94804f0d56c61c23237.
Change-Id: I403b63847da10bc2c5536bd26f692bafc849588e
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
|
|
This reverts commit 57984d531806892a8e14bb7c1b42b1c4c406ddf9.
Change-Id: If538c9bbeb5d3fc7302f9683cb85f8acdd309a09
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
|
|
This reverts commit 85b4e1dffa2e7a0bbd092d294043f19f82417d74.
Change-Id: Ie8fb980cb8a8b063dd6c9626d5b6c858b36f0976
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
|
|
This reverts commit d1637ff80953fd46692f923f3ee7b656fb917081.
Change-Id: Ib99bae99fe7246142bfa7369b8e79ebbfae1e736
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
|
|
Along with a slight modification in mali_kbase_core_linux.c,
for building in rk Linux 4.4:
-#if KERNEL_VERSION(4, 6, 0) > LINUX_VERSION_CODE
+#if KERNEL_VERSION(4, 4, 0) > LINUX_VERSION_CODE
Change-Id: I9a8f4696c603cf0be6ce7b9b31b23a928a21b2a6
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
|
|
If the regulator is shared between several devices then the lowest
request voltage that meets the system constraints will be used.
Change-Id: I7dda43b24c7e19098db65b51ae0c4386b46ee0b7
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
|
|
If there is only one opp whose frequency is equal to the initial value
in opp table list, the GPU voltage domain will keep the initial voltage,
it may be too large.
Change-Id: I87a5fb82eaac8466123b61e39a5d7587da3066da
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
|
|
This is a workaround for the issue that
"400M, 500M and 600M of clk_gpu needs high vdd_gpu",
according to "6.2" of Mali Application Note
"Potential glitches on Power Domain interfaces".
Change-Id: I8b8eccd2079e21ac5e1db7b4552c8f998f676a9f
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
|
|
This reverts commit 47a9fbf6c4de1dddaf82ed9159307f8ba039f85c.
Change-Id: I4cfc36a5dab7e6cb4a766995d456301c54728498
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
|
|
comes from mali support case [TAC674871].
Change-Id: I5e7c54190e24eea0306a9d64545482c6209a2c0d
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
|
|
This is a workaround for the issue that
"400M, 500M and 600M of clk_gpu needs high vdd_gpu",
according to "6.1" of Mali Application Note
"Potential glitches on Power Domain interfaces".
Change-Id: I58daa3cf796802f073f67bacb62734516be76205
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
|
|
Conflicts:
drivers/gpu/arm/midgard/backend/gpu/mali_kbase_devfreq.c
drivers/gpu/arm/midgard/backend/gpu/mali_kbase_power_model_simple.c
drivers/gpu/arm/midgard/backend/gpu/mali_kbase_power_model_simple.h
drivers/gpu/arm/midgard/mali_kbase_defs.h
Change-Id: Ia7b8004b09ce31a5af6414c27b8ec776c247835a
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
|
|
Change-Id: I4eb6fcae00d934c1fc2cbffc888a88c2fda9c22d
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
|
|
Change-Id: I2ba7988bd08bb05661a324b66a27cf2028ebd5db
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
|
|
Change-Id: I758369bdd9ef945a89fd87fd7a69bd9f391f0880
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
|
|
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
Conflicts:
drivers/gpu/arm/midgard/mali_kbase_core_linux.c
Change-Id: I17d67d066f6e029c2d8f1711002c347002a48399
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
|
|
Change-Id: I5af2a464db88b08530b063d90b3a7ce61e26f201
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
|
|
Otherwise, clk_gpu won't be disabled actually in the runtime.
Change-Id: If1e32061cbffc1564a5cf95fbf01aa91c827550d
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
|
|
As gpu power on and off frequently, and the interval time is smaller
than the polling time of devfreq, add power-off-delay function to
ensure devfreq work fine.
Change-Id: Iba2405c9ead91a437233f1fedf2f3555703aa9e1
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
|
|
When CONFIG_NEED_SG_DMA_LENGTH is enabled,
sg_dma_len is defined as follow :
"#define sg_dma_len(sg) ((sg)->dma_length)"
But, dma_length is not used by the framework indeed.
Change-Id: I51d1adf9f2738b1036fdaf6172ae932c007fac76
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
|
|
Conflicts:
drivers/gpu/arm/midgard/mali_kbase_core_linux.c
drivers/gpu/arm/midgard/mali_kbase_jd.c
Change-Id: I9c910f2b08ffd2e9101fbe85958030ac7bca1642
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
|
|
Conflicts:
drivers/gpu/arm/midgard/Kconfig
Change-Id: Ib7975ebe959624bedd92f126768987f2e2f0f84b
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
|
|
Change-Id: Ia58cba15b43f875ac572a3b35807b5ec48e3df01
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
|
|
Change-Id: Ic5f3947b032deaaa800ee316636a8cc61259ba5d
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
|
|
When CONFIG_NEED_SG_DMA_LENGTH is enabled,
sg_dma_len is defined as follow :
"#define sg_dma_len(sg) ((sg)->dma_length)"
But, dma_length is not used by the framework indeed.
Change-Id: Ibfd3223b38b96701f839cdc91207a49f20789fec
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
|