From 63cf02202281c3d78cca88fb5362b8deb79796fd Mon Sep 17 00:00:00 2001 From: Jernej Skrabec Date: Sun, 14 Jan 2024 11:01:07 +0100 Subject: media: cedrus: Enable JPEG decoding in various variants As far as manuals go, only A10 and A13 don't have JPEG support mentioned, all others do. To be safe, enable it on all variants except A10 and A13. Signed-off-by: Jernej Skrabec --- drivers/staging/media/sunxi/cedrus/cedrus.c | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/drivers/staging/media/sunxi/cedrus/cedrus.c b/drivers/staging/media/sunxi/cedrus/cedrus.c index 519e0524885c..ad573db6af57 100644 --- a/drivers/staging/media/sunxi/cedrus/cedrus.c +++ b/drivers/staging/media/sunxi/cedrus/cedrus.c @@ -550,6 +550,7 @@ static int cedrus_remove(struct platform_device *pdev) static const struct cedrus_variant sun4i_a10_cedrus_variant = { .capabilities = CEDRUS_CAPABILITY_MPEG2_DEC | + CEDRUS_CAPABILITY_JPEG_DEC | CEDRUS_CAPABILITY_H264_DEC | CEDRUS_CAPABILITY_VP8_DEC, .mod_rate = 320000000, @@ -564,8 +565,10 @@ static const struct cedrus_variant sun5i_a13_cedrus_variant = { static const struct cedrus_variant sun7i_a20_cedrus_variant = { .capabilities = CEDRUS_CAPABILITY_MPEG2_DEC | + CEDRUS_CAPABILITY_JPEG_DEC | CEDRUS_CAPABILITY_H264_DEC | - CEDRUS_CAPABILITY_VP8_DEC, + CEDRUS_CAPABILITY_VP8_DEC | + CEDRUS_CAPABILITY_JPEG_DEC, .mod_rate = 320000000, }; @@ -573,7 +576,8 @@ static const struct cedrus_variant sun8i_a33_cedrus_variant = { .capabilities = CEDRUS_CAPABILITY_UNTILED | CEDRUS_CAPABILITY_MPEG2_DEC | CEDRUS_CAPABILITY_H264_DEC | - CEDRUS_CAPABILITY_VP8_DEC, + CEDRUS_CAPABILITY_VP8_DEC | + CEDRUS_CAPABILITY_JPEG_DEC, .mod_rate = 320000000, }; @@ -582,13 +586,15 @@ static const struct cedrus_variant sun8i_h3_cedrus_variant = { CEDRUS_CAPABILITY_MPEG2_DEC | CEDRUS_CAPABILITY_H264_DEC | CEDRUS_CAPABILITY_H265_DEC | - CEDRUS_CAPABILITY_VP8_DEC, + CEDRUS_CAPABILITY_VP8_DEC | + CEDRUS_CAPABILITY_JPEG_DEC, .mod_rate = 402000000, }; static const struct cedrus_variant sun8i_v3s_cedrus_variant = { .capabilities = CEDRUS_CAPABILITY_UNTILED | - CEDRUS_CAPABILITY_H264_DEC, + CEDRUS_CAPABILITY_H264_DEC | + CEDRUS_CAPABILITY_JPEG_DEC, .mod_rate = 297000000, }; @@ -596,7 +602,8 @@ static const struct cedrus_variant sun8i_r40_cedrus_variant = { .capabilities = CEDRUS_CAPABILITY_UNTILED | CEDRUS_CAPABILITY_MPEG2_DEC | CEDRUS_CAPABILITY_H264_DEC | - CEDRUS_CAPABILITY_VP8_DEC, + CEDRUS_CAPABILITY_VP8_DEC | + CEDRUS_CAPABILITY_JPEG_DEC, .mod_rate = 297000000, }; @@ -604,7 +611,8 @@ static const struct cedrus_variant sun20i_d1_cedrus_variant = { .capabilities = CEDRUS_CAPABILITY_UNTILED | CEDRUS_CAPABILITY_MPEG2_DEC | CEDRUS_CAPABILITY_H264_DEC | - CEDRUS_CAPABILITY_H265_DEC, + CEDRUS_CAPABILITY_H265_DEC | + CEDRUS_CAPABILITY_JPEG_DEC, .mod_rate = 432000000, }; @@ -613,7 +621,8 @@ static const struct cedrus_variant sun50i_a64_cedrus_variant = { CEDRUS_CAPABILITY_MPEG2_DEC | CEDRUS_CAPABILITY_H264_DEC | CEDRUS_CAPABILITY_H265_DEC | - CEDRUS_CAPABILITY_VP8_DEC, + CEDRUS_CAPABILITY_VP8_DEC | + CEDRUS_CAPABILITY_JPEG_DEC, .mod_rate = 402000000, }; @@ -622,7 +631,8 @@ static const struct cedrus_variant sun50i_h5_cedrus_variant = { CEDRUS_CAPABILITY_MPEG2_DEC | CEDRUS_CAPABILITY_H264_DEC | CEDRUS_CAPABILITY_H265_DEC | - CEDRUS_CAPABILITY_VP8_DEC, + CEDRUS_CAPABILITY_VP8_DEC | + CEDRUS_CAPABILITY_JPEG_DEC, .mod_rate = 402000000, }; @@ -632,7 +642,8 @@ static const struct cedrus_variant sun50i_h6_cedrus_variant = { CEDRUS_CAPABILITY_H264_DEC | CEDRUS_CAPABILITY_H265_DEC | CEDRUS_CAPABILITY_H265_10_DEC | - CEDRUS_CAPABILITY_VP8_DEC, + CEDRUS_CAPABILITY_VP8_DEC | + CEDRUS_CAPABILITY_JPEG_DEC, .mod_rate = 600000000, }; -- cgit v1.2.3