Boot-on regulators are always kept on because their use_count value
is now incremented at boot time and never cleaned.
Only increment count value for alway-on regulators.
regulator_late_cleanup() is now able to power off boot-on regulators
when unused.
Change-Id: I7adc58a78fec934e245d9ec94c4604b4d7c7ebb5
Fixes: 05f224ca66 ("regulator: core: Clean enabling always-on regulators + their supplies")
Signed-off-by: Pascal Paillet <p.paillet@st.com>
Link: https://lore.kernel.org/r/20191113102737.27831-1-p.paillet@st.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit 089b3f61ec)
https://source.android.com/security/bulletin/2021-06-01
CVE-2020-14305
CVE-2020-14381
CVE-2021-0512
CVE-2021-3347
* tag 'ASB-2021-06-05_4.19-stable': (1641 commits)
Linux 4.19.193
usb: core: reduce power-on-good delay time of root hub
net: hns3: check the return of skb_checksum_help()
drivers/net/ethernet: clean up unused assignments
hugetlbfs: hugetlb_fault_mutex_hash() cleanup
MIPS: ralink: export rt_sysc_membase for rt2880_wdt.c
MIPS: alchemy: xxs1500: add gpio-au1000.h header file
sch_dsmark: fix a NULL deref in qdisc_reset()
ipv6: record frag_max_size in atomic fragments in input path
scsi: libsas: Use _safe() loop in sas_resume_port()
ixgbe: fix large MTU request from VF
bpf: Set mac_len in bpf_skb_change_head
ASoC: cs35l33: fix an error code in probe()
staging: emxx_udc: fix loop in _nbu2ss_nuke()
mld: fix panic in mld_newpack()
net: bnx2: Fix error return code in bnx2_init_board()
openvswitch: meter: fix race when getting now_ms.
net: mdio: octeon: Fix some double free issues
net: mdio: thunder: Fix a double free issue in the .remove function
net: fec: fix the potential memory leak in fec_enet_init()
...
Change-Id: If547ecdc8654e01ea17afea2ff2dd546f7a495d2
Conflicts:
drivers/media/i2c/ov5670.c
drivers/mmc/core/mmc_ops.c
drivers/regulator/core.c
drivers/usb/dwc3/gadget.c
drivers/usb/gadget/function/f_uac1.c
drivers/usb/gadget/function/f_uvc.c
This reverts commit 17823171af.
Relpaced by commit 3092012197 ("ANDROID: GKI: QoS: Prevent usage of dev_pm_qos_request as pm_qos_request").
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Iff9c38acdae14cee92c52ac833c7bf062c7fc74c
The vcnt event is similar to vblank event, but
userspace can set the time(which scan line) when
the event occur.
This add a new event type: DRM_EVENT_ROCKCHIP_CRTC_VCNT
userspace create this event by ioctl DRM_IOCTL_ROCKCHIP_GET_VCNT_EVENT
Change-Id: If3da4bb29469ac7dc379e9462994aeda3202d3d2
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
According to the specification, the controller should check the device
status before data transport. Generally, it can get the status of device
via CMD13. It's upset that command communication will produce a little
interrupt inside the controller.
To avoid interrupt storm whilst heavily I/O request, use card_busy
instead of send_status(CMD13).
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I3ba79ba2f563006112b0157b78aab5b31911b61a
RKPM_DBG_FSM_SOUT enables PMU FSM state signal output through
GPIO4_D5/SDMMC_CLK during sleep, mainly for debug PMU FSM flow.
Some one may use this pin as LED light, it's fine to drop it
to avoid influence on LED.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I54705292226d82829bc37db0758aa0d9a9995658
RKPM_DBG_FSM_SOUT enables PMU FSM state signal output through
GPIO4_D5/SDMMC_CLK during sleep, mainly for debug PMU FSM flow.
Some one may use this pin as LED light, it's fine to drop it
to avoid influence on LED.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I82af5fa676d6db8b81e877729c44b976bbfa9ea5
From test, sram_init_done can be used as a indicator to
see if phy power and input clock work find. Let's yell out
error is anything wrong with phy.
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I5493e32ec5a9a6a8f6fc45e95618a657d9a21a67
We have some plane not registered to drm core(Such as cluster
plane on some linux system), so they don't have pstate.
And also we don't need to check plane state for oetf for
a inactived plane(has no fb).
Change-Id: I909b665397c3df530ff0f466e0d654dcbb3f1a40
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Clean up the buffer pool if start streaming failed.
BUG=redmine:#301918
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
Change-Id: I4abcf17ef0c66dabcddcfac7395c7efabbfe6e47
keep sdr2hdr result consistent between VOP and GPU
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I3ef6b289978d4b0c083d99e93d97a95b2e7f0b25
reason: In rk356x, due to the hardware, vepu and jpegd should
disable auto freqence.
Change-Id: I2da5b5a7fc3b86180aef28b378a7b651e31a6b7a
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
On XferInProgress events, if the endpoint is isochronous
type, do not kick transfer directly even if the pending_list
isn't empty. Because it needs to wait for XferNotReady
event to start isoc transfer. Without this patch, it will
trigger a large number of unuseful XferInProgress events,
and easily cause loss of synchronization data if the cpu
core unable to handle the dwc3 thread interrupt in time.
Fixes: b77df21107 ("usb: dwc3: gadget: Continue to process pending requests")
Change-Id: I14d16240a6e10db466fd9822b4fdc35d79817508
Signed-off-by: William Wu <william.wu@rock-chips.com>
Add a BACKGROUND property for each crtc.
8 bit for every color channel(r/g/b/y/u/v).
Change-Id: I9439bf16a8142e936508e843cc25b6263e2f661d
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
It is not necessary to send rescheduling IPI when target cpu is not
idle for non-preempt kernel, because the target cpu will pick all the
tasks on the run-queue before enter idle.
Test this patch on RK3568-NVR, make cpu load to 100% with command:
taskset 01 yes > /dev/null &
taskset 02 yes > /dev/null &
taskset 04 yes > /dev/null &
taskset 08 yes > /dev/null &
So that the cpu will not enter idle.
without the patch, 32 channel video@25fps:
[root@RK356X:/]# cat /proc/interrupts | grep IPI0; sleep 10; cat /proc/interrupts | grep IPI0
IPI0: 74204 58815 99596 81177 Rescheduling interrupts
IPI0: 79503 76143 106149 87676 Rescheduling interrupts
with the patch, 32 channel video@25fps:
[root@RK356X:/]# cat /proc/interrupts | grep IPI0; sleep 10; cat /proc/interrupts | grep IPI0
IPI0: 28814 59314 60173 56759 Rescheduling interrupts
IPI0: 28814 59314 60173 56759 Rescheduling interrupts
Change-Id: I0d45a3d999696503124e693e7d6e145df719174a
Signed-off-by: Liang Chen <cl@rock-chips.com>
Enable bus_npu so that we can enable npu@1.0G safely when necessary.
Change-Id: I1a6ce1652aba7bafe91135bc79881cad0d5980ce
Signed-off-by: Liang Chen <cl@rock-chips.com>
RK3568 has 3 pmu io-domain, pmuio0/1/2, but the pmuio0 is 1.8v only, and
pmuio1 is 3.3v only, only pmuio2 support to select 1.8v or 3.3v.
RK3568 also has 7 io-domain, vccio1/2/3/4/5/6/7, but the vccio2
defaultly selected by the FLASH_VOL_SEL(GPIO0_A7).
Change-Id: I55ea1263c641112705b1443ff919c508cb3be2f0
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
We finally decide to set 16 for tx delay in driver, so no need for
dts to set it now.
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I642ed3039db5410ca478b255166d07a035e971aa
According to the new test result, set tx delay to 16
by default.
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I8e0bacfbf14f8c5db60a4d56a624d63c49e23051