2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2025-01-17 18:14:34 +08:00

media: cedrus: Make VP8 codec as capability

Commit 31d9b9ef8564 ("media: cedrus: Register all codecs as capability")
makes separate capability flags for each codec. However, VP8 codec was
merged at the same time as mentioned patch, so there is no capability
flag for it.

This patch adds capability flag for VP8 and enables it for all variants
except for V3s.

Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
Jernej Skrabec 2020-12-02 18:44:13 +01:00 committed by Mauro Carvalho Chehab
parent e469d0b09a
commit 68b4a01f88
3 changed files with 20 additions and 9 deletions

View File

@ -514,26 +514,30 @@ static int cedrus_remove(struct platform_device *pdev)
static const struct cedrus_variant sun4i_a10_cedrus_variant = { static const struct cedrus_variant sun4i_a10_cedrus_variant = {
.capabilities = CEDRUS_CAPABILITY_MPEG2_DEC | .capabilities = CEDRUS_CAPABILITY_MPEG2_DEC |
CEDRUS_CAPABILITY_H264_DEC, CEDRUS_CAPABILITY_H264_DEC |
CEDRUS_CAPABILITY_VP8_DEC,
.mod_rate = 320000000, .mod_rate = 320000000,
}; };
static const struct cedrus_variant sun5i_a13_cedrus_variant = { static const struct cedrus_variant sun5i_a13_cedrus_variant = {
.capabilities = CEDRUS_CAPABILITY_MPEG2_DEC | .capabilities = CEDRUS_CAPABILITY_MPEG2_DEC |
CEDRUS_CAPABILITY_H264_DEC, CEDRUS_CAPABILITY_H264_DEC |
CEDRUS_CAPABILITY_VP8_DEC,
.mod_rate = 320000000, .mod_rate = 320000000,
}; };
static const struct cedrus_variant sun7i_a20_cedrus_variant = { static const struct cedrus_variant sun7i_a20_cedrus_variant = {
.capabilities = CEDRUS_CAPABILITY_MPEG2_DEC | .capabilities = CEDRUS_CAPABILITY_MPEG2_DEC |
CEDRUS_CAPABILITY_H264_DEC, CEDRUS_CAPABILITY_H264_DEC |
CEDRUS_CAPABILITY_VP8_DEC,
.mod_rate = 320000000, .mod_rate = 320000000,
}; };
static const struct cedrus_variant sun8i_a33_cedrus_variant = { static const struct cedrus_variant sun8i_a33_cedrus_variant = {
.capabilities = CEDRUS_CAPABILITY_UNTILED | .capabilities = CEDRUS_CAPABILITY_UNTILED |
CEDRUS_CAPABILITY_MPEG2_DEC | CEDRUS_CAPABILITY_MPEG2_DEC |
CEDRUS_CAPABILITY_H264_DEC, CEDRUS_CAPABILITY_H264_DEC |
CEDRUS_CAPABILITY_VP8_DEC,
.mod_rate = 320000000, .mod_rate = 320000000,
}; };
@ -541,7 +545,8 @@ static const struct cedrus_variant sun8i_h3_cedrus_variant = {
.capabilities = CEDRUS_CAPABILITY_UNTILED | .capabilities = CEDRUS_CAPABILITY_UNTILED |
CEDRUS_CAPABILITY_MPEG2_DEC | CEDRUS_CAPABILITY_MPEG2_DEC |
CEDRUS_CAPABILITY_H264_DEC | CEDRUS_CAPABILITY_H264_DEC |
CEDRUS_CAPABILITY_H265_DEC, CEDRUS_CAPABILITY_H265_DEC |
CEDRUS_CAPABILITY_VP8_DEC,
.mod_rate = 402000000, .mod_rate = 402000000,
}; };
@ -554,7 +559,8 @@ static const struct cedrus_variant sun8i_v3s_cedrus_variant = {
static const struct cedrus_variant sun8i_r40_cedrus_variant = { static const struct cedrus_variant sun8i_r40_cedrus_variant = {
.capabilities = CEDRUS_CAPABILITY_UNTILED | .capabilities = CEDRUS_CAPABILITY_UNTILED |
CEDRUS_CAPABILITY_MPEG2_DEC | CEDRUS_CAPABILITY_MPEG2_DEC |
CEDRUS_CAPABILITY_H264_DEC, CEDRUS_CAPABILITY_H264_DEC |
CEDRUS_CAPABILITY_VP8_DEC,
.mod_rate = 297000000, .mod_rate = 297000000,
}; };
@ -562,7 +568,8 @@ static const struct cedrus_variant sun50i_a64_cedrus_variant = {
.capabilities = CEDRUS_CAPABILITY_UNTILED | .capabilities = CEDRUS_CAPABILITY_UNTILED |
CEDRUS_CAPABILITY_MPEG2_DEC | CEDRUS_CAPABILITY_MPEG2_DEC |
CEDRUS_CAPABILITY_H264_DEC | CEDRUS_CAPABILITY_H264_DEC |
CEDRUS_CAPABILITY_H265_DEC, CEDRUS_CAPABILITY_H265_DEC |
CEDRUS_CAPABILITY_VP8_DEC,
.mod_rate = 402000000, .mod_rate = 402000000,
}; };
@ -570,7 +577,8 @@ static const struct cedrus_variant sun50i_h5_cedrus_variant = {
.capabilities = CEDRUS_CAPABILITY_UNTILED | .capabilities = CEDRUS_CAPABILITY_UNTILED |
CEDRUS_CAPABILITY_MPEG2_DEC | CEDRUS_CAPABILITY_MPEG2_DEC |
CEDRUS_CAPABILITY_H264_DEC | CEDRUS_CAPABILITY_H264_DEC |
CEDRUS_CAPABILITY_H265_DEC, CEDRUS_CAPABILITY_H265_DEC |
CEDRUS_CAPABILITY_VP8_DEC,
.mod_rate = 402000000, .mod_rate = 402000000,
}; };
@ -578,7 +586,8 @@ static const struct cedrus_variant sun50i_h6_cedrus_variant = {
.capabilities = CEDRUS_CAPABILITY_UNTILED | .capabilities = CEDRUS_CAPABILITY_UNTILED |
CEDRUS_CAPABILITY_MPEG2_DEC | CEDRUS_CAPABILITY_MPEG2_DEC |
CEDRUS_CAPABILITY_H264_DEC | CEDRUS_CAPABILITY_H264_DEC |
CEDRUS_CAPABILITY_H265_DEC, CEDRUS_CAPABILITY_H265_DEC |
CEDRUS_CAPABILITY_VP8_DEC,
.quirks = CEDRUS_QUIRK_NO_DMA_OFFSET, .quirks = CEDRUS_QUIRK_NO_DMA_OFFSET,
.mod_rate = 600000000, .mod_rate = 600000000,
}; };

View File

@ -31,6 +31,7 @@
#define CEDRUS_CAPABILITY_H265_DEC BIT(1) #define CEDRUS_CAPABILITY_H265_DEC BIT(1)
#define CEDRUS_CAPABILITY_H264_DEC BIT(2) #define CEDRUS_CAPABILITY_H264_DEC BIT(2)
#define CEDRUS_CAPABILITY_MPEG2_DEC BIT(3) #define CEDRUS_CAPABILITY_MPEG2_DEC BIT(3)
#define CEDRUS_CAPABILITY_VP8_DEC BIT(4)
#define CEDRUS_QUIRK_NO_DMA_OFFSET BIT(0) #define CEDRUS_QUIRK_NO_DMA_OFFSET BIT(0)

View File

@ -53,6 +53,7 @@ static struct cedrus_format cedrus_formats[] = {
{ {
.pixelformat = V4L2_PIX_FMT_VP8_FRAME, .pixelformat = V4L2_PIX_FMT_VP8_FRAME,
.directions = CEDRUS_DECODE_SRC, .directions = CEDRUS_DECODE_SRC,
.capabilities = CEDRUS_CAPABILITY_VP8_DEC,
}, },
{ {
.pixelformat = V4L2_PIX_FMT_SUNXI_TILED_NV12, .pixelformat = V4L2_PIX_FMT_SUNXI_TILED_NV12,