If a configs function sets bind_deactivated flag, upon removal it will be
left with an unbalanced deactivation. Let's make sure that we conditionally
call usb_function_activate() from purge_configs_funcs() and make sure
purge_configs_funcs() is called from configfs_composite_unbind().
Change-Id: Ibe91837fdb7754f8af343a18138556901a0e089f
Signed-off-by: William Wu <william.wu@rock-chips.com>
Fix the following build warnings in configfs driver instead of
scripts/gcc-wrapper.py.
"configfs.c:1488", # drivers/usb/gadget/configfs.c:1488:12: warning: 'configfs_composite_setup' defined but not used
"configfs.c:1513", # drivers/usb/gadget/configfs.c:1513:13: warning: 'configfs_composite_disconnect' defined but not used
Fixes: a77196fc01 ("ANDROID: usb: gadget: configfs: Add Uevent to notify userspace")
Change-Id: I58ef495d6e84af8000d0bd7a3ce3a2ed7947b71f
Signed-off-by: William Wu <william.wu@rock-chips.com>
1.When the system starts, enable vcc_lcd.
2.when the System sleep, disable vcc_lcd.
Change-Id: I29afc3e98a8cbe7ded65a8b9de1990fa2ea26b53
Signed-off-by: Wang Jie <dave.wang@rock-chips.com>
merge cmd:
MPP_CMD_SET_REG -->
MPP_CMD_SET_VEPU22_CFG -->
MPP_CMD_SET_RKVENC_OSD_PLT --> MPP_CMD_SET_REG_WRITE
MPP_CMD_SET_RKVENC_L2_REG -->
change cmd:
MPP_CMD_GET_REG --> MPP_CMD_SET_REG_READ
tips:
1. the xx_WRITE cmd is to write register, while xx_READ cmd is to
read register.
2. move MPP_CMD_GET_REG to MPP_CMD_SET_REG_READ, then it can set
output when input.
Change-Id: Iee1d5c6aafdfea5e0d02d1865cd06079ef5f716b
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
If the USB cable is unplugged when powered on or connected to PC,
it will cause the system to freeze. The final log is as follows:
[ 5.109122] read descriptors
[ 5.109180] read strings
[ 5.113205] udc fe800000.dwc3: registering UDC driver [g1]
The crash is caused by visit registers of dwc3 when PD is off. the
function dwc3_gadget_set_speed is added in udc_bind_to_driver in
kernel 4.19 update. We need jump of this function when dwc3 is
suspended.
Change-Id: Ie0337aaf225543b4e9e05ee57a5eb7416797d56e
Signed-off-by: Jianing Ren <jianing.ren@rock-chips.com>
To avoid the potential parent PLL clock of display being
closed when PD is shutdown, excute protect loader clocks
earlier.
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Change-Id: I5125590aac51b423e7e9fdc0032da9185c450be1
Add IOMMU_TLB_SHOT_ENTIRE prot for iommu_map_sg, this shoot down entire
iommu tlb one time after iommu_map_sg.This may save about 5ms when DRM
mapping 12MB buffer.
Change-Id: I618aff1b3928bd1ec1dd3d896db746e09e96acdc
Signed-off-by: Simon Xue <xxm@rock-chips.com>
This patch is used by android 8+ system on RK3368 SoCs.
When drm to free object, it needs map sg again when alloc it next
time. For RK3368 SoCs' system, one dma buffer may used by ion and
drm devices together, it spend time to map sg, this patch remove
the destroy object and do it after final dma_buf_put.
Change-Id: Ia39a3d4691f0b545039efb880c999a35886178a0
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
This patch is required by system on RK3368 SoCs.
Since its system used ion and drm drivers together, one dma-buf
may used by two devices, if one device deattached buffer, then
the other one need to map sg again, that takes time several ms.
The patch fix it by set buffer release operation in a list, and
do release after final dma_buf_put.
Change-Id: Ibfb4ffe3d97fae0a27f20032fdfbc3cc561aa375
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Because the kernel debug fs will removed from android 11, so we move
sw_sync to misc devices, as android lib sync has done the compatibility
work, so after this commit, the hwc there is no need to update.
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
Change-Id: I799b66b1ba98c9370893b9554095664010b635df
commit 6404674acd upstream.
Brown paperbag time: fetching ->i_uid/->i_mode really should've been
done from nd->inode. I even suggested that, but the reason for that has
slipped through the cracks and I went for dir->d_inode instead - made
for more "obvious" patch.
Analysis:
- at the entry into do_last() and all the way to step_into(): dir (aka
nd->path.dentry) is known not to have been freed; so's nd->inode and
it's equal to dir->d_inode unless we are already doomed to -ECHILD.
inode of the file to get opened is not known.
- after step_into(): inode of the file to get opened is known; dir
might be pointing to freed memory/be negative/etc.
- at the call of may_create_in_sticky(): guaranteed to be out of RCU
mode; inode of the file to get opened is known and pinned; dir might
be garbage.
The last was the reason for the original patch. Except that at the
do_last() entry we can be in RCU mode and it is possible that
nd->path.dentry->d_inode has already changed under us.
In that case we are going to fail with -ECHILD, but we need to be
careful; nd->inode is pointing to valid struct inode and it's the same
as nd->path.dentry->d_inode in "won't fail with -ECHILD" case, so we
should use that.
Change-Id: I9aa97857bdf3944d67c47a45161465ec1055b41d
Reported-by: "Rantala, Tommi T. (Nokia - FI/Espoo)" <tommi.t.rantala@nokia.com>
Reported-by: syzbot+190005201ced78a74ad6@syzkaller.appspotmail.com
Wearing-brown-paperbag: Al Viro <viro@zeniv.linux.org.uk>
Cc: stable@kernel.org
Fixes: d0cb50185a ("do_last(): fetch directory ->i_mode and ->i_uid before it's too late")
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit 8d7a5100e2)
Add eDP controller support for RK3368 SoC.
RK3368 eDP controller is similar to the RK3288.
Change-Id: I738ddf122776081cf41adef2921644ddfc6e07dd
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Add eDP PHY support for RK3368 SoC. RK3368 eDP PHY is similar to
the RK3288.
Change-Id: Ic2134ba719dadba121dc2fcc944662ef06b2ecfa
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
tips: vdpu_mmu and vepu_mmu have the same address, than it will double
map when probe. Thus, merge this to vpu_mmu to avoid it.
Change-Id: I0482e3c9a992aa93a1d28ed389ec3ef63ab4a6ee
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
tips: In rk3368, hevc and vdpu use the same register region.
However, devm_ioremap_resource will call function
devm_request_mem_region to check region whether map.
Thus, use devm_ioremap instead to avoid it.
Change-Id: I339b7d5a4e02e9f2304a9c40b146057e1ce13817
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
Some rk3288 chips have been writen special efuse, and uboot will
overwrite the compatible of dtb from rk3288 to rk3288w.
For cpufreq platdev driver, needs to add rk3288w to blacklist to
aviod generic cpufreq-dt driver work.
Change-Id: Ib079647b0ca483c9fbb729a7f81514a0d6a9931b
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
include/soc/rockchip/rockchip_opp_select.h: In function 'rockchip_set_opp_prop_name':
include/soc/rockchip/rockchip_opp_select.h:83:9: warning: returning 'int' from a function with return type 'struct opp_table *' makes pointer from integer without a cast [-Wint-conversion]
Change-Id: Id8c0fc331bcece33692ddde2084a7e8d3142bd94
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
drivers/video/rockchip/rga2/rga2_mmu_info.c: In function 'rga2_dma_flush_page':
drivers/video/rockchip/rga2/rga2_mmu_info.c:69:11: error: implicit declaration of function 'kmap_high_get' [-Werror=implicit-function-declaration]
Change-Id: If389e8b1e61c1dcdffb94eb27d12e612a663193c
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
The newly added suspend/resume functions are only used if CONFIG_PM
is enabled:
drivers/mfd/rk808.c:752:12: error: 'rk8xx_resume' defined but not used [-Werror=unused-function]
drivers/mfd/rk808.c:732:12: error: 'rk8xx_suspend' defined but not used [-Werror=unused-function]
Mark them as __maybe_unused so the compiler can silently drop them
when they are not needed.
Change-Id: I3db25d369f04883988fd934e11e26126de8cc6a4
Fixes: 586c1b4125 ("mfd: rk808: Add RK817 and RK809 support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit 5752bc4373)
This patch add the rockchip can to the device tree bindings
documentation.
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I7a15174dda4a6eec6196fca5e2c386a7844b70ee
the mm operation for logo memory will conflict with userspace
memory operation, so we add mm_lock to guaranteed no conflict.
Change-Id: If02310e3a9e48478124201edd94af38dd900944a
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
We need to enable lvds mode before calling phy_power_on.
Change-Id: I38625c44998bde81bb4c98b70b8be5995d64b477
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>