Commit Graph

867993 Commits

Author SHA1 Message Date
Wang Panzhenzhuan
e3bf4f8d9f arm64: dts: rockchip: rk3399-evb-ind-lpddr4-android: add gc8034 config
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: I99e44cd0212e2a7d3a3e74ec528dae379f3930b5
2022-02-24 16:27:44 +08:00
Binyuan Lan
e242831e3c ASoC: rockchip: rk817-codec: enable chop and reduce record gain
Signed-off-by: Binyuan Lan <lby@rock-chips.com>
Change-Id: I144cf8845961f3c03d53afd48754d20fe7789a66
2022-02-24 15:53:28 +08:00
Zefa Chen
9ec09dae48 media: rockchip: cif clean unready subdev before async subdev-itf
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I2049f83a9d552109acca86d37d81ef0ceb2e9687
2022-02-24 15:31:53 +08:00
Wang Panzhenzhuan
672ec24093 ARM: dts: rockchip: rk3288-evb-android-rk808-edp: add gc8034 config
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: I40c74f9eecfde5a0df28bde77f7f9c5b02c29cc5
2022-02-24 15:31:11 +08:00
Wang Panzhenzhuan
9462007903 arm64: dts: rockchip: rk3399-sapphire-excavator-edp: add gc8034 config
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: Iae8b32357ca46563d12da0c17890bf70884df667
2022-02-24 15:29:56 +08:00
Yu Qiaowei
78d50f1d3f video: rockchip: rga3: Fix parameter error of RGA3 blend mode
layer binding:
    src => win0
    src1/dst => win1
    dst => wr

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I12709d578ce65b9a52d5275e873c660a5b1774d9
2022-02-23 17:49:13 +08:00
Yu Qiaowei
8454d38b6a video: rockchip: rga3: Fix "unknown ioctl cmd" error
Because of the difference in pointer size between 32/64 bit systems.

Update driver version to 1.2.4

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: If557cdeb69f1f811eed6cf44419cbb73679dada0
2022-02-22 19:13:54 +08:00
Li Huang
19e2d244b0 video: rockchip: rga3: use get_dma_buf to add ref for mpi dma_buf
Signed-off-by: Li Huang <putin.li@rock-chips.com>
Change-Id: Ie08cf1a296a166ed5b5bd273d485f6e56a6be022
2022-02-22 16:19:57 +08:00
Li Huang
c3f71e9029 video: rockchip: rga3: fixup rga load
Signed-off-by: Li Huang <putin.li@rock-chips.com>
Change-Id: Id09a22819f4d118d1702b6eb7299279f0bd3fcc8
2022-02-22 16:19:47 +08:00
Li Huang
cb40170ed3 video: rockchip: rga3: support batch mode
Signed-off-by: Li Huang <putin.li@rock-chips.com>
Change-Id: Ib2f9a7815024d468ce1babb0e19789c458653329
2022-02-22 16:19:35 +08:00
Liang Chen
d22ee3f726 arm64: dts: rockchip: rk356x: adjust opp-table by pvtm
Change-Id: I898578def36d38a673678183fdf96339f0d55f0d
Signed-off-by: Liang Chen <cl@rock-chips.com>
2022-02-21 16:32:20 +08:00
Tony Xie
46e8168a45 arm64: dts: rockchip: rk3568: support boot amp cpu.
Signed-off-by: Tony Xie <tony.xie@rock-chips.com>
Change-Id: I6cd62516b77af8916c8193e4fb03d5de31745d9e
2022-02-21 11:35:46 +08:00
Tony Xie
2a1a61d4fc soc: rockchip: amp: support amp cpu on/off.
Signed-off-by: Tony Xie <tony.xie@rock-chips.com>
Change-Id: I178ecf1ef41bbad4d3f8064695f44ecd635199cd
2022-02-21 11:35:46 +08:00
Tony Xie
6b245536ea firmware: rockchip_sip: support cpu on/off for amp os.
Signed-off-by: Tony Xie <tony.xie@rock-chips.com>
Change-Id: I723e20cb088063e8f9525b3d64e37090e0a10adf
2022-02-21 11:35:46 +08:00
Yu Qiaowei
730fa9b08b video: rockchip: rga3: Synchronization of user-space image formats
Update driver version to 1.2.3

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I73ff1105bf52f67809be42fb1b45ca08451e17cf
2022-02-21 10:04:54 +08:00
Yu Qiaowei
b07c100c5c video: rockchip: rga3: Integration of format-related processing
1. Wrapped some format-related functions, avoid using formatted
index values.
2. Fix incorrect format alignment requirements.

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I3f1493dc59f9b303f6e8f289f63b515ad56d3651
2022-02-18 15:11:52 +08:00
Yu Qiaowei
be0736b43a video: rockchip: rga3: rga_mm supports physically continuous dma_buf
When calling RGA2 with a physically contiguous dma_buf it will be called
with the physical address.

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: Iadb2d638b426c9be64a403b42513f8c7b58fb866
2022-02-18 11:29:03 +08:00
Lin Jinhan
4480a4647c crypto: rockchip: cryptodev: optimized CIOCGSESSION return value
When the CIOCGSESSION command creates an unsupported algorithm or mode,
 errno is set to -ENOEN.

Add SM3/HMAC_SM3 support.

Move CMAC/CBCMAC from cipher to hmac.

Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: I4f5f274ffe47d2b81584c192991670ddb2e3def5
2022-02-18 10:03:06 +08:00
Su Yuefu
8ccfd6aac0 media: i2c: add tp9950 driver
Signed-off-by: Su Yuefu <yuefu.su@rock-chips.com>
Change-Id: Ie3c9ebab575717d26beaded23314c9504828d500
2022-02-17 19:25:30 +08:00
Zorro Liu
f3578f1e73 arm64: dts: rockchip: rk3566-eink: update gpu opp table
improve touch interactive for rk3566-eink

Signed-off-by: Zorro Liu <lyx@rock-chips.com>
Change-Id: Ia880a417d255bd7a5a0da70d09232f2245888b2d
2022-02-17 19:20:44 +08:00
Wyon bi
9159680c50 drm/bridge: analogix_dp: Fix YCbCr Coefficients
Signed-off-by: Wyon bi <bivvy.bi@rock-chips.com>
Change-Id: If560fd514a2c946abcca35a5bbc18edf051cea5b
2022-02-17 15:52:56 +08:00
Wyon Bi
eb1afc1397 phy/rockchip: naneng-edp: Convert to use regmap
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I9a4a489b7df34a15d2b8e57cf9e2f4c97cc06118
2022-02-17 10:23:59 +08:00
Wyon Bi
a8fa434b92 soc: rockchip: grf: Add platform driver for edp phy grf
We need to overwrite the default register value to put the PHY into
low power mode in idle state.

Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I4c788ce04880d6e25d4454e5594882d511b0bc97
2022-02-17 10:23:59 +08:00
Wyon Bi
e8bbfb9fb2 arm64: dts: rockchip: rk3568: Add edp phy grf node
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I0ee522627cc057bd5b0be2c862e56f020dae57a2
2022-02-17 10:23:59 +08:00
Fabrice Gasnier
2031ba0fc1 UPSTREAM: mfd: syscon: Add optional clock support
Some system control registers need to be clocked, so the registers can
be accessed. Add an optional clock and attach it to regmap.

Change-Id: If23c2fc31b5d32b496b964a1c628b8be2bc2bc68
Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
(cherry picked from commit a00406b71c)
2022-02-16 11:32:47 +08:00
Zorro Liu
f9dc5f6f2f arm64: dts: rockchip: update wacom touch i2c clock frequency for
rk3566-rk817-eink-w103 board

Signed-off-by: Zorro Liu <lyx@rock-chips.com>
Change-Id: I24037b12a3a071ecccb618abd2b680a55dc79664
2022-02-16 10:05:46 +08:00
Zorro Liu
add2a4f115 drm/rockchip: ebc_dev: release version v3.00
1.improve handwrite rate
2.fix auto mode refresh uncompletely last version

Signed-off-by: Zorro Liu <lyx@rock-chips.com>
Change-Id: I8416d03d01b15196c71df440c34212a57aea793c
2022-02-16 10:05:46 +08:00
Zorro Liu
88f2f6b782 drm/rockchip: ebc_dev: release version v2.28
revert handwrite improve last version

Signed-off-by: Zorro Liu <lyx@rock-chips.com>
Change-Id: I99f0ef5a39943d14b0df41b21b5b65f2d361cca4
2022-02-16 10:05:46 +08:00
Yu Qiaowei
82801bc14d video: rockchip: rga3: Fix compile warning about 'make W=1 ...'
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: Idc6656489051ff75abcca19acd362c52d5513226
2022-02-15 14:58:19 +08:00
Eric Biggers
3558721d95 UPSTREAM: crypto: ofb - fix handling partial blocks and make thread-safe
Fix multiple bugs in the OFB implementation:

1. It stored the per-request state 'cnt' in the tfm context, which can be
   used by multiple threads concurrently (e.g. via AF_ALG).
2. It didn't support messages not a multiple of the block cipher size,
   despite being a stream cipher.
3. It didn't set cra_blocksize to 1 to indicate it is a stream cipher.

To fix these, set the 'chunksize' property to the cipher block size to
guarantee that when walking through the scatterlist, a partial block can
only occur at the end.  Then change the implementation to XOR a block at
a time at first, then XOR the partial block at the end if needed.  This
is the same way CTR and CFB are implemented.  As a bonus, this also
improves performance in most cases over the current approach.

Fixes: e497c51896 ("crypto: ofb - add output feedback mode")
Cc: <stable@vger.kernel.org> # v4.20+
Cc: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit b3e3e2db7d)

Change-Id: I5b9174ef596f72cb295d931217d6132f8c9ec820
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2022-02-14 17:11:49 +08:00
Gilad Ben-Yossef
66b7c56bf4 UPSTREAM: crypto: ofb - add output feedback mode
Add a generic version of output feedback mode. We already have support of
several hardware based transformations of this mode and the needed test
vectors but we somehow missed adding a generic software one. Fix this now.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit e497c51896)

Change-Id: Iffac55d5830ee1c0df5acffd82fbd01d6dcafa31
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2022-02-14 17:11:37 +08:00
Zheng Yang
f6bbf076bb drm/bridge: synopsys: dw-hdmi: fixed an error in setting the avi quantization range
According CEA-861 and HDMI2.0 spec, if EDID indicate the sink
support hdmi2.0 or support quantization range, setting the avi
quantization range to non-zero value.

Change-Id: I866d2e5c3c8e1e3eb73b7a8ebddd5a86aa477e63
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2022-02-14 15:26:09 +08:00
Lin Jinhan
73159fe2be crypto: rockchip: v2: modify the length limit under user_ptr
When using user buffer, hardware crypto is used regardless of
 whether the data length is greater than 32K.

Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: I3228910def265765e772da1ab4eda3b54d9927cb
2022-02-14 14:12:40 +08:00
Lin Jinhan
851a745238 crypto: rockchip: v2: modify the length limit under dma_fd
When using DMA_fd, hardware crypto is used regardless of
 whether the data length is greater than 32K.

Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: Ifcc78bca17beb99ae7eae73f3def6ebf55f5cf1b
2022-02-14 14:12:40 +08:00
Li Huang
3999666d09 arm64: rockchip_defconfig: Enable CONFIG_ROCKCHIP_MULTI_RGA
Signed-off-by: Li Huang <putin.li@rock-chips.com>
Change-Id: I95fbef30eb87fc69379cfce7feb976bfc261ab8c
2022-02-14 11:04:23 +08:00
Li Huang
9f95b5fc62 video: rockchip: rga3: Init multi rga
Signed-off-by: Li Huang <putin.li@rock-chips.com>
Change-Id: Ib19d2d141e6b0eefa9d67b062e564559f58fb0b4
2022-02-14 11:03:45 +08:00
Jianwei Fan
80eac8dcf1 media: i2c: gc0312: fix flip and mirror register
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Change-Id: Ibc7ebf2de267022497808f61fb5719797ba3b789
2022-02-12 10:36:10 +08:00
Zefa Chen
80152a3dcd include: rk-camera-module: add control for sensor adapter driver
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I2d434a4b608bf6e6168237280e75c933fc192df3
2022-02-10 17:12:34 +08:00
Lin Jinhan
2991ef890f arm64: dts: rockchip: px30: support enable rng and crypto module at the same time
Change-Id: If3c289629a265e678bdfdb57a084d67b241da4a8
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2022-02-09 10:16:20 +08:00
Lin Jinhan
67994eb6c1 ARM: rockchip_linux_defconfig: enable CONFIG_CRYPTO_DEV_ROCKCHIP_DEV
CONFIG_CRYPTO_DEV_ROCKCHIP_DEV is used to export kernel crypto interface
 into user space.

Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: I06e49ba8c430eaa06315c4b549c939a73bdb7c4c
2022-02-09 10:16:19 +08:00
Lin Jinhan
8acd934a54 ARM: rockchip_defconfig: enable CONFIG_CRYPTO_DEV_ROCKCHIP_DEV
CONFIG_CRYPTO_DEV_ROCKCHIP_DEV is used to export kernel crypto interface
 into user space.

Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: I3d1069b83ba1d29304deccda0392ac5b27e6fd0f
2022-02-09 10:16:19 +08:00
Lin Jinhan
140fef0411 arm64: rockchip_linux_defconfig: enable CONFIG_CRYPTO_DEV_ROCKCHIP_DEV
CONFIG_CRYPTO_DEV_ROCKCHIP_DEV is used to export kernel crypto interface
 into user space.

Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: Id7f33508567fc3c55704a8325774c3f4c57c187f
2022-02-09 10:16:19 +08:00
Lin Jinhan
ca8394bfa5 arm64: rockchip_defconfig: enable CONFIG_CRYPTO_DEV_ROCKCHIP_DEV
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: Ieb4cdbda11c166467f86f1b442043a6c2fc60a35
2022-02-09 10:16:19 +08:00
Lin Jinhan
8ce924b9c4 crypto: rockchip: change hardware crypto driver's priority
Decrease RK_CRYPTO_PRIORITY from 300 to 0.Hardware driver
will only invoked by user layer through the driver name.

Change-Id: Ifeda13a2b9ce6fec6be60a2422b7507f91eedbb5
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2022-02-09 10:16:19 +08:00
Lin Jinhan
8f6c27d9fc crypto: rockchip: cryptodev_linux: add rk algo support
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: I1d1f4214b29546eed2d1c29da8f375ec30a9bac3
2022-02-09 10:16:18 +08:00
Lin Jinhan
5f283800ca crypto: rockchip: cryptodev_linux: add rk_cryptodev_ioctl
RIOCCRYPT_FD         : used to support dma_fd crypt.
RIOCCRYPT_FD_MAP     : used to map dma_fd to phys_addr.
RIOCCRYPT_FD_UNMAP   : used to unmap between dma_fd and phys_addr.
RIOCCRYPT_CPU_ACCESS : for cpu access after dma_fd map
RIOCCRYPT_DEV_ACCESS : for DEV access after dma_fd map

Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: Ifa016c0009fde3d6909fb4e2313af341d808f793
2022-02-09 10:16:18 +08:00
Lin Jinhan
290e947ae0 crypto: rockchip: core: register crypto device into rk_cryptodev
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: I29364e0b5dd82a227dc74567dc12565e3b97ad1c
2022-02-09 10:16:18 +08:00
Lin Jinhan
bf0b14dceb crypto: rockchip: cryptodev_linux: add rk_cryptodev.c
Add register and unregister for crypto driver.

Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: I406776514374bb460875ce8bd71a3031cd110587
2022-02-09 10:16:18 +08:00
Tao Huang
c408b3ebfd crypto: rockchip: cryptodev_linux: rename global func name
Add cryptodev_ prefix.

Replacements are done by the following command:
for i in kcaop_from_user kcaop_to_user adjust_sg_array release_user_pages sg_advance sg_copy; do sed -i "s/$i/cryptodev_$i/g" *.c *.h; done
sed -i -e "s/ get_userbuf(/ cryptodev_get_userbuf(/g" -e "s/ __get_userbuf(/ __cryptodev_get_userbuf(/g" *.c *.h

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I7a3aee655427faffac6baad0e155bd76638ae040
2022-02-09 10:16:17 +08:00
Lin Jinhan
f0fb767f43 crypto: rockchip: add cryptodev_linux driver
provide crypto api to user space, you can open
"/dev/crypto" to use it.

cryptodev-linux source repository:
  https://github.com/cryptodev-linux/cryptodev-linux.git

use commit 356a45e63bbce94b9cea73b8c1e20d0d8ec02f04
  Author: cristian-stoica <cristianmarian.stoica@nxp.com>
  Date:   Thu Nov 11 09:30:19 2021 +0200

Change-Id: I91ca3660060f4adcf531e3efb8e720308bbd9f0e
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2022-02-09 10:16:17 +08:00