clk pointer gets cached in the driver's private data and
can be used later instead of a __clk_lookup() call.
clk provider clk_data.clks[] and we can reference
the clk pointers directly rather than using __clk_lookup()
with global names.
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I058413a912e0eaf5bf551d2515ad55ae28709985
Rockchip common clocks to support GKI,
Avoid __clk_lookup() calls,so needed to replace the
rockchip_clk_protect_critical, and use the flag
CLK_IS_CRITICAL.(but use flag CLK_IS_CRITICAL,
the enable count is always "0")
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: Idfccd72db2abe43d5f3236e7bd065873b62279ea
The maximum alpha is 255, but after the product of color and alpha
in the blend formula, the final result is >> 8 (/256) instead of
/255, which will introduce errors.
This fix is that when alpha is 0x80~0xff, then +1.
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: Ibba964f29a11eb226aa008a0dd5bf89048524b43
By making the Y channel and the UV channel's access address equal,
the function of RGA input grayscale image is realized, without
need to allocate extra UV channel memory.
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I0110ec6935c7233905e724be3df9f4fba9ef8cf0
Some features are not updated to compat_ioctl, so add them.
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: Id89a0826a4125af97398200f7ce6e3cc73de4342
Fix some modes that did not set the U/V address and
cause the output error of the YUV format image.
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I41abd364576e0a73fd501f3dfc726eeaa6c9b118
Here a short summary of the changes:
- Modify the definition of proc ops
- Support mq
- Remove mtd partition support
- Add an independent GC thread to do garbage collection in idle time
- Remove some apis that are no longer used
Change-Id: I2ea7fe6218b32666b91fce54bc17f976feb7f4d2
Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
before the patch:
ls /dev/ttyS
ttyS0 ttyS1 ttyS2 ttyS3 ttyS4 ttyS5 ttyS6 ttyS7
after the patch:
ls /dev/ttyS
ttyS3 ttyS4 ttyS6
Change-Id: I844523408751cb579bbfb50fafb7923d5c2cafdf
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
As policy->cur may be changed by thermal and cpufreq_suspend,
the setspeed may be changed after resume.
Change-Id: I6d4e0672ff39127c522f305719afd52806c31f48
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Now a regulator device can supply multiple consumers at the same time,
if a consumer starts and set a low voltage, another consumer doesn't
start in kernel but has been set a high frequency in bootloader will
abort.
This patch implements the same function as the commit
d712e9b8d5 ("regulator: core: Add support to limit min_uV during system startup")
in 4.19.
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I3266d120c1b9327248a509196c0c32a26c0c355e
This change allows the user to read and edit regulator information
in user space through the debugfs file system.
Base on msm work.
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I038d2ad43ece4ed927db1ff36c7d1a644c1cf3d1
HDR window is fixed(not move in the overlay path with port_mux change)
and is the most slow window. And the bg is the fast. So other windows
and bg need to add delay number to keep align with the most slow window.
The delay number list in the trm is a relative value for port_mux set at
last level.
Change-Id: I731b909c0a3f483be081e16610536b4ce5b9b8b0
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
When area0 is disabled, all other sub multi area must be
disabled, or the win may run into unexpected situlation:
such as post_buf_empty or iommu fault.
Change-Id: I8a92e45849cfc31af029ba0e86562751be92ddbd
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
when only one vp(crtc) is registered to drm, all the
plane->possible_crtc will be force set to this crtc.
this make current hwc think that all these planes can be
assigned to this crtc, but the mirror plane(rk3566 feature)
cant't be activated on the same crtc with source plane.
So if some boards only use one vp(crtc), don't register
mirror plane.
Change-Id: Ib25246cf44a0fc4caf98e7c6d21ebba18f1a6c88
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
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>
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
move rockchip_register_crtc_funcs/rockchip_unregister_crtc_funcs
position by the way for easy to compare with linux 4.19
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I7959f654d9a0d3ea24bb747446f36c649797e2e0
before this commit, the DMC driver use drm_device_get_by_name() to get drm
connector info, now we use rockchip_drm_get_sub_dev_type() to instead of
it.
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Ief6546d933fbb49e46e6e8d2a99464eb5951e069
rockchip_drm_add_modes_noedid() used to get the following
recommend modes at rockchip platform when get edid failed:
the recommend modes is: 480p60, 576p50, 720p50, 720p60, 768p60,
1080p50, 1080p60 and 720p60 is the preferred mode.
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I9c82b3949506a616e8c98bfa2d77532bdb870390
Rockchip Socs have GPU, we need allocate GPU accelerated buffers.
So add special ioctls GEM_CREATE/GEM_MAP_OFFSET to support
accelerated buffers.
Change-Id: Ia4b13798aac97d16214da7a75a2479e6e334313a
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
If external device sends data continuously, then uart is
always busy, and baud rate can't be set. It is useful
to reset uart and set loop back mode to make sure it is
idle.
Change-Id: I87286711870ff685ea29e36e61c97d45be5a6d08
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
To reduce the uart interrupts, which may cause:
serial8250: too much work for irq xx
Change-Id: I89e0d990677e4cffae431e60521b3e16e8381f05
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
The UART CPR may be 0 of some rockchip soc,
but it supports fifo and AFC, fifo entry is 32 default.
Change-Id: I44f420c556f703c2848c38dc8449546274ef887d
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
convert from rockchip_defconfig to rockchip_gki.config by this script:
make gki_defconfig
cp .config gki.config
scripts/kconfig/merge_config.sh -m arch/arm64/configs/gki_defconfig arch/arm64/configs/rockchip_defconfig
make olddefconfig
scripts/diffconfig -m gki.config .config | sed -e "s/ is not set/=n/" -e "s/# //" > d.config
sed -e "s/ is not set/=n/" -e "s/# CONFIG_/CONFIG_/" -e "/#.*/d" -e "/^$/d" gki.config > g.config
> r.config
for i in $(cat d.config); do
c=${i%%=*};
v=${i##*=};
if grep -q "$c=n" g.config; then
if [ "$v" == "y" -o "$v" == "m" ]; then
echo $c=m >> r.config;
fi
elif ! grep -q "$c=" g.config; then
if [ "$v" == "n" ]; then
echo "# $c is not set" >> r.config;
elif [ "$v" == "y" ]; then
echo $c=m >> r.config;
else
echo $c=$v >> r.config;
fi
fi
done
sed -i 's/CONFIG_ARCH_ROCKCHIP=m/CONFIG_ARCH_ROCKCHIP=y/' r.config
scripts/kconfig/merge_config.sh -m arch/arm64/configs/gki_defconfig r.config
make olddefconfig 2>&1 | grep invalid | sed "s/.*symbol value 'm' invalid for /CONFIG_/" > nm.config
> r.config
for i in $(cat d.config); do
c=${i%%=*};
v=${i##*=};
if grep -q "$c=n" g.config; then
if ! grep -q "$c$" nm.config; then
if [ "$v" == "y" ]; then
echo $c=m >> r.config;
fi
fi
elif ! grep -q "$c=" g.config; then
if [ "$v" == "n" ]; then
echo "# $c is not set" >> r.config;
elif [ "$v" == "y" ]; then
if grep -q "$c$" nm.config; then
echo $c=y >> r.config;
else
echo $c=m >> r.config;
fi
else
echo $c=$v >> r.config;
fi
fi
done
sed -i 's/CONFIG_ARCH_ROCKCHIP=m/CONFIG_ARCH_ROCKCHIP=y/' r.config
scripts/kconfig/merge_config.sh -m arch/arm64/configs/gki_defconfig r.config
scripts/config -d CONFIG_BRIDGE_NETFILTER
scripts/config -d CONFIG_BRIDGE_NF_EBTABLES
scripts/config -d CONFIG_USB_MON
scripts/config -e CONFIG_ION
scripts/config -e CONFIG_ION_SYSTEM_HEAP
scripts/config -e CONFIG_SW_SYNC
make olddefconfig
make savedefconfig
scripts/diffconfig -m arch/arm64/configs/gki_defconfig defconfig > arch/arm64/configs/rockchip_gki.config
echo "# CONFIG_USB_DUMMY_HCD is not set" >> arch/arm64/configs/rockchip_gki.config
Test: make gki_defconfig rockchip_gki.config
Status: mounted/console/adb/tp ok
TODO: check configs
Signed-off-by: Bian Jin chen <kenjc.bian@rock-chips.com>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ifecf0a0cd836cbb1510704f9d120715ff7b01b35
'struct dwc3_ep at core.h:704:1' changed (indirectly):
type size changed from 1792 to 1856 (in bits)
there are data member changes:
type 'struct usb_ep' of 'dwc3_ep::endpoint' changed:
type size changed from 576 to 640 (in bits)
1 data member insertion:
'u8 transfer_type', at offset 576 (in bits) at gadget.h:246:1
93 impacted interfaces
21 ('list_head cancelled_list' .. 'u64 android_kabi_reserved2') offsets changed (by +64 bits)
2 impacted interfaces
Fixes: bcf7606d61 ("usb: gadget: add transfer_type in struct usb_ep for rockchip")
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: If7b276a054a18e6f49e59def6a4edf5ce4f3b694
Make sure this bool config do not affected by gki_defconfig.
Fixes: 9ec5db66aa ("clk: add COMMON_CLK_PROCFS to support clk debug")
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Idda0c054110c8587a8b1649cf65f045242b680d7
Make sure this bool config do not affected by gki_defconfig.
Fixes: 44f5b21367 ("fiq_debugger: print log by console thread")
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ied79a8b68580bacc4ec27cd98d38400e48de58ba
Make sure this bool config do not affected by gki_defconfig.
Fixes: 2943395673 ("rk: kbuild: Introduce CONFIG_DTC_SYMBOLS")
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I202378445d901e1bef20161483edc957b23d9fa1