When a user imports the same buffer from multiple threads, relying only
on put to reduce the reference count after the process exits will lead
to memory leaks.
Change-Id: I22e48eb89d23d0d1bc3066048235f1d58ba93511
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
There could be following scenario where there is a ongoing reboot
is going from processA which tries to call all the reboot notifier
callback and one of them is firmware reboot call which tries to
abort all the ongoing firmware userspace request under fw_lock but
there could be another processB which tries to do request firmware,
which came just after abort done from ProcessA and ask for userspace
to load the firmware and this can stop the ongoing reboot ProcessA
to stall for next 60s(default timeout) which may not be expected
behaviour everyone like to see, instead we should abort any firmware
load request which came once firmware knows about the reboot through
notification.
ProcessA ProcessB
kernel_restart_prepare
blocking_notifier_call_chain
fw_shutdown_notify
kill_pending_fw_fallback_reqs
__fw_load_abort
fw_state_aborted request_firmware
__fw_state_set firmware_fallback_sysfs
... fw_load_from_user_helper
.. ...
. ..
usermodehelper_read_trylock
fw_load_sysfs_fallback
fw_sysfs_wait_timeout
usermodehelper_disable
__usermodehelper_disable
down_write()
Bug: 309378049
Change-Id: I61eb91f21a01460f340f890b25c60de7597a87ff
Signed-off-by: Mukesh Ojha <quic_mojha@quicinc.com>
Acked-by: Luis Chamberlain <mcgrof@kernel.org>
Link: https://lore.kernel.org/r/1698330459-31776-2-git-send-email-quic_mojha@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit effd7c70eaa0440688b60b9d419243695ede3c45)
Signed-off-by: Srinivasarao Pathipati <quic_c_spathi@quicinc.com>
In some special applications, tx has read data from the fifo, rx to read
the fifo is 0 when there is no need to do timeout waiting.
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I7f4bc88ace026088228396da96d628bebb9e4b94
Set the frequency of SYS_STATUS_DEEP_SUSPEND to devfreq->suspend_freq,
which is the device frequency set during deep suspend phase.
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Change-Id: Ic33ded5cc6a17335404ef65dd071e856bdf7e598
Set all default pins to expected input/output values to
prevent glitch during probe.
Change-Id: I29e882f47b8ab1e4d89e29cc1525187a434cba53
Signed-off-by: Cody Xie <cody.xie@rock-chips.com>
If the default-brightness-level is 0 and related pwm
has been enabled in uboot, the pwm_backlight may not
actually be turned off.
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I92c0c363a13040e300dd8aa2d40edcad87fa50d0
when vp0 is disabled, the vop2->vps[0].rockchip_crtc.crtc.state is NULL.
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I93b3ea4f3ddc6076f2105ebcabf7317627b602a3
We introduce an interrupt hook in Android to manage memory compression
using madvise, improving user experience.
Currently, when a user returns to the home screen, memory compression is
triggered using madvise. The vma and PAGEOUT flag are sent to
process_madvise, initiating page reclaim.
However, if an app is re-opened soon after starting compression, the
reclaim process can cause read delays, leading to potential lag.
To resolve this, we propose to skip pte range traversal. By comparing
the vma's task uid with the current app's uid, we can identify and
interrupt the madvise operation for that vma.
Implementing this requires a vendor hook for should_end_madvise. This
allows us to skip traversal, enhancing user experience.
Bug: 307846869
Change-Id: If2bdbc200b7305e92f836353b7356aa115e00705
Signed-off-by: zihan ju <zihan.ju@transsion.com>
When we enable Dual LVDS, there will be the following
output in the VOP summary node:
$ cat /sys/kernel/debug/dri/0/summary
...
Video Port1: ACTIVE
Connector: LVDS-1
...
The connector information here is not clear enough. When Dual LVDS is enabled,
both LVDS-0 and LVDS-1 will be enabled (but we will only expose one connector
to user space for operation, which can shield the underlying differences).
In addition, if only LVDS1 is enabled instead of using Dual LVDS,
"LVDS-1" will also be printed here.
In order to express this information more accurately, we will change
the corresponding connector name to "LVDS-DUAL" when using Dual LVDS:
$ cat /sys/kernel/debug/dri/0/summary
...
Video Port1: ACTIVE
Connector: LVDS-DUAL
...
Change-Id: I9621338c8bdec4b32772c3558d55b5b426d3ccc4
Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
1. Add a way to trigger soft interrupts for rpmsg communication
soft irq refers to reserved irq in shared peripheral interrupt (SPI).
2. Rename rockchip_rpmsg.c to rockchip_rpmsg_mbox.c.
Change-Id: I8007f4b77ba669073db9074e9c19623c37c27fb6
Signed-off-by: Hongming Zou <hongming.zou@rock-chips.com>
The mmc_idmac run at the address [512KB ~ (2M - 8KB)] which is SPL's
Stack and Heap.
SPL'mmc_idmac use malloc and Kernel reserve this memory.
Signed-off-by: Weiwen Chen <cww@rock-chips.com>
Change-Id: I267759d6acd1137a19e0e5d534c481b8f579b1ee
Avoid the *clk_emmc* are disabled by *unused_off* when the ramdisk is
too large.
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I38b6f33ab55fbb65781ee266237382c977848e68