Last_status is used to calculate dmc's power in thermal control.
If last_status is neithor inited nor kept updated, the power model will
get the wrong status and then the wrong power. And dmc gets wrong
cooling state at last.
Meanwhile this issue reports the warning "core: dev_pm_opp_get_voltage
: Invalid parameters"
Change-Id: Ic371796ad94fd6dab376fefbea91adff0068d26b
Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com>
The vpu qos registers need to save and restore when reset.
Change-Id: I649cf4a360842ad1abb06c35a6fd8d3868fbf706
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
The rkvdec and vpu qos registers need to save and restore when reset.
Change-Id: If0fbee0aed9227cfd795c5f439cfb8c3b2f0ccaf
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
This bit enables the automatic mechanism to stop providing clock in
the clock lane when time allows.
Change-Id: Ia3d85589f54adcf6206ee7ded32624b8e92936af
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
use framework internal dynamic power calc function. Do not use
global data, rk_dmcfreq.
Change-Id: I1f46b2471b5d25a9233724fdd61efe63ea13b860
Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com>
There are many isp driver in 4.4 kernel, let's add a dtsi
to help switch between them.
Change-Id: Ida1af575b6c64ffec56ad695933dfdf22cdd72c1
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
We now trap accesses to CNTVCT_EL0 when the counter is broken
enough to require the kernel to mediate the access. But it
turns out that some existing userspace (such as OpenMPI) do
probe for the counter frequency, leading to an UNDEF exception
as CNTVCT_EL0 and CNTFRQ_EL0 share the same control bit.
The fix is to handle the exception the same way we do for CNTVCT_EL0.
Fixes: a86bd139f2 ("arm64: arch_timer: Enable CNTVCT_EL0 trap if workaround is enabled")
Reported-by: Hanjun Guo <guohanjun@huawei.com>
Tested-by: Hanjun Guo <guohanjun@huawei.com>
Reviewed-by: Hanjun Guo <guohanjun@huawei.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
(cherry picked from commit 9842119a23)
CVE-2017-13218
Change-Id: I2f163e2511bab6225f319c0a9e732735cbd108a0
Since people seem to make a point in breaking the userspace visible
counter, we have no choice but to trap the access. Add the required
handler.
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
(cherry picked from commit 6126ce0588)
CVE-2017-13218
Change-Id: I0705f47c85a78040df38df18f51a4a22500b904d
In current code, the driver attributes of DWC2 controller is
created during driver initialization, if we get or set them
before finish probe device, the device's pointer in attribute
function will be NULL and this will crash the system. So this
patch make the function return directly if the pointer is NULL.
The attributes mention above:
/sys/bus/platform/drivers/usb20_otg/dwc_otg_conn_en
/sys/bus/platform/drivers/usb20_otg/force_usb_mode
/sys/bus/platform/drivers/usb20_otg/vbus_status
Change-Id: If063a884249afa7172bf28719b8c2b8a5641ac4b
Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
A lock-unlock is missing in ASHMEM_SET_SIZE ioctl which can result in a
race condition when mmap is called. After the !asma->file check, before
setting asma->size, asma->file can be set in mmap. That would result in
having different asma->size than the mapped memory size. Combined with
ASHMEM_UNPIN ioctl and shrinker invocation, this can result in memory
corruption.
Bug: 66954097
Signed-off-by: Viktor Slavkovic <viktors@google.com>
Change-Id: I268225133f96fde0fadd1ec621aafef27d392d65
Even "rockchip,system-power-controller" is not found,
rk808_i2c_client is needed for suspend/resume and the
other.
Change-Id: I17ebb3a1d1e7ec8dc9f4a3ee2dbdcd9ae4c1648b
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Android8.0 CTS needs to get max charging current,
max charging voltage and battery charge counter.
Change-Id: I83371d5b9f126ee17979f56e92d78b7887c316c6
Signed-off-by: Shunqing Chen <csq@rock-chips.com>