mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-23 19:14:30 +08:00
media: cedrus: Register all codecs as capability
All codecs should have capabilities. For example "Allwinner V3s" does not support "MPEG2". Signed-off-by: Martin Cerveny <m.cerveny@computer.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
parent
dbf0b3a7b7
commit
503dab0b8a
@ -486,47 +486,65 @@ static int cedrus_remove(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
static const struct cedrus_variant sun4i_a10_cedrus_variant = {
|
||||
.capabilities = CEDRUS_CAPABILITY_MPEG2_DEC |
|
||||
CEDRUS_CAPABILITY_H264_DEC,
|
||||
.mod_rate = 320000000,
|
||||
};
|
||||
|
||||
static const struct cedrus_variant sun5i_a13_cedrus_variant = {
|
||||
.capabilities = CEDRUS_CAPABILITY_MPEG2_DEC |
|
||||
CEDRUS_CAPABILITY_H264_DEC,
|
||||
.mod_rate = 320000000,
|
||||
};
|
||||
|
||||
static const struct cedrus_variant sun7i_a20_cedrus_variant = {
|
||||
.capabilities = CEDRUS_CAPABILITY_MPEG2_DEC |
|
||||
CEDRUS_CAPABILITY_H264_DEC,
|
||||
.mod_rate = 320000000,
|
||||
};
|
||||
|
||||
static const struct cedrus_variant sun8i_a33_cedrus_variant = {
|
||||
.capabilities = CEDRUS_CAPABILITY_UNTILED,
|
||||
.capabilities = CEDRUS_CAPABILITY_UNTILED |
|
||||
CEDRUS_CAPABILITY_MPEG2_DEC |
|
||||
CEDRUS_CAPABILITY_H264_DEC,
|
||||
.mod_rate = 320000000,
|
||||
};
|
||||
|
||||
static const struct cedrus_variant sun8i_h3_cedrus_variant = {
|
||||
.capabilities = CEDRUS_CAPABILITY_UNTILED |
|
||||
CEDRUS_CAPABILITY_MPEG2_DEC |
|
||||
CEDRUS_CAPABILITY_H264_DEC |
|
||||
CEDRUS_CAPABILITY_H265_DEC,
|
||||
.mod_rate = 402000000,
|
||||
};
|
||||
|
||||
static const struct cedrus_variant sun8i_r40_cedrus_variant = {
|
||||
.capabilities = CEDRUS_CAPABILITY_UNTILED,
|
||||
.capabilities = CEDRUS_CAPABILITY_UNTILED |
|
||||
CEDRUS_CAPABILITY_MPEG2_DEC |
|
||||
CEDRUS_CAPABILITY_H264_DEC,
|
||||
.mod_rate = 297000000,
|
||||
};
|
||||
|
||||
static const struct cedrus_variant sun50i_a64_cedrus_variant = {
|
||||
.capabilities = CEDRUS_CAPABILITY_UNTILED |
|
||||
CEDRUS_CAPABILITY_MPEG2_DEC |
|
||||
CEDRUS_CAPABILITY_H264_DEC |
|
||||
CEDRUS_CAPABILITY_H265_DEC,
|
||||
.mod_rate = 402000000,
|
||||
};
|
||||
|
||||
static const struct cedrus_variant sun50i_h5_cedrus_variant = {
|
||||
.capabilities = CEDRUS_CAPABILITY_UNTILED |
|
||||
CEDRUS_CAPABILITY_MPEG2_DEC |
|
||||
CEDRUS_CAPABILITY_H264_DEC |
|
||||
CEDRUS_CAPABILITY_H265_DEC,
|
||||
.mod_rate = 402000000,
|
||||
};
|
||||
|
||||
static const struct cedrus_variant sun50i_h6_cedrus_variant = {
|
||||
.capabilities = CEDRUS_CAPABILITY_UNTILED |
|
||||
CEDRUS_CAPABILITY_MPEG2_DEC |
|
||||
CEDRUS_CAPABILITY_H264_DEC |
|
||||
CEDRUS_CAPABILITY_H265_DEC,
|
||||
.quirks = CEDRUS_QUIRK_NO_DMA_OFFSET,
|
||||
.mod_rate = 600000000,
|
||||
|
@ -28,6 +28,8 @@
|
||||
|
||||
#define CEDRUS_CAPABILITY_UNTILED BIT(0)
|
||||
#define CEDRUS_CAPABILITY_H265_DEC BIT(1)
|
||||
#define CEDRUS_CAPABILITY_H264_DEC BIT(2)
|
||||
#define CEDRUS_CAPABILITY_MPEG2_DEC BIT(3)
|
||||
|
||||
#define CEDRUS_QUIRK_NO_DMA_OFFSET BIT(0)
|
||||
|
||||
|
@ -38,10 +38,12 @@ static struct cedrus_format cedrus_formats[] = {
|
||||
{
|
||||
.pixelformat = V4L2_PIX_FMT_MPEG2_SLICE,
|
||||
.directions = CEDRUS_DECODE_SRC,
|
||||
.capabilities = CEDRUS_CAPABILITY_MPEG2_DEC,
|
||||
},
|
||||
{
|
||||
.pixelformat = V4L2_PIX_FMT_H264_SLICE,
|
||||
.directions = CEDRUS_DECODE_SRC,
|
||||
.capabilities = CEDRUS_CAPABILITY_H264_DEC,
|
||||
},
|
||||
{
|
||||
.pixelformat = V4L2_PIX_FMT_HEVC_SLICE,
|
||||
|
Loading…
Reference in New Issue
Block a user