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
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
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
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
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)
1.improve handwrite rate
2.fix auto mode refresh uncompletely last version
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
Change-Id: I8416d03d01b15196c71df440c34212a57aea793c
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>
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>
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>
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
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
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
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
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
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>
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
Add register and unregister for crypto driver.
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: I406776514374bb460875ce8bd71a3031cd110587
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
CRYPTO_ALG_KERN_DRIVER_ONLY means the algorithm provided is hardware
accelerated but not available to userspace via instruction set or so.
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: Ia4265944a058aaaa4aeb7e6f1adc3bd1b8d4af5d
Crypto only supports DMA32 address addressing and behaves
abnormally on more than 4G DDR.
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: I5b6b5c9eb5f00698d25e47a778f358380f4121eb
Compared to 4.19, there are many new algorithm boundary
condition tests in 5.10. Drivers need to be fixed to
pass these tests and increase driver robustness.
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: I597a478a5cfff5fa6c5389f45adec21acb63c68e