Skip to content

Commit d3bfed3

Browse files
Kwiboomchehab
authored andcommitted
media: hantro: Add support for MPEG-2 decoding on RK3328
Add necessary bits to support MPEG2 decoding on RK3328. Signed-off-by: Jonas Karlman <[email protected]> Signed-off-by: Ezequiel Garcia <[email protected]> Signed-off-by: Philipp Zabel <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent 56613e7 commit d3bfed3

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

drivers/staging/media/hantro/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ config VIDEO_HANTRO_ROCKCHIP
2020
depends on ARCH_ROCKCHIP || COMPILE_TEST
2121
default y
2222
help
23-
Enable support for RK3288 and RK3399 SoCs.
23+
Enable support for RK3288, RK3328, and RK3399 SoCs.

drivers/staging/media/hantro/hantro_drv.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,7 @@ static const struct v4l2_file_operations hantro_fops = {
425425
static const struct of_device_id of_hantro_match[] = {
426426
#ifdef CONFIG_VIDEO_HANTRO_ROCKCHIP
427427
{ .compatible = "rockchip,rk3399-vpu", .data = &rk3399_vpu_variant, },
428+
{ .compatible = "rockchip,rk3328-vpu", .data = &rk3328_vpu_variant, },
428429
{ .compatible = "rockchip,rk3288-vpu", .data = &rk3288_vpu_variant, },
429430
#endif
430431
{ /* sentinel */ }

drivers/staging/media/hantro/rk3399_vpu_hw.c

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,3 +184,20 @@ const struct hantro_variant rk3399_vpu_variant = {
184184
.clk_names = rk3399_clk_names,
185185
.num_clocks = ARRAY_SIZE(rk3399_clk_names)
186186
};
187+
188+
static const struct hantro_irq rk3328_irqs[] = {
189+
{ "vdpu", rk3399_vdpu_irq },
190+
};
191+
192+
const struct hantro_variant rk3328_vpu_variant = {
193+
.dec_offset = 0x400,
194+
.dec_fmts = rk3399_vpu_dec_fmts,
195+
.num_dec_fmts = ARRAY_SIZE(rk3399_vpu_dec_fmts),
196+
.codec = HANTRO_MPEG2_DECODER,
197+
.codec_ops = rk3399_vpu_codec_ops,
198+
.irqs = rk3328_irqs,
199+
.num_irqs = ARRAY_SIZE(rk3328_irqs),
200+
.init = rk3399_vpu_hw_init,
201+
.clk_names = rk3399_clk_names,
202+
.num_clocks = ARRAY_SIZE(rk3399_clk_names),
203+
};

0 commit comments

Comments
 (0)