Skip to content

Commit

Permalink
media: hantro: Add support for MPEG-2 decoding on RK3328
Browse files Browse the repository at this point in the history
Add necessary bits to support MPEG2 decoding on RK3328.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
  • Loading branch information
Jonas Karlman authored and Mauro Carvalho Chehab committed Jul 22, 2019
1 parent 56613e7 commit d3bfed3
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/media/hantro/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ config VIDEO_HANTRO_ROCKCHIP
depends on ARCH_ROCKCHIP || COMPILE_TEST
default y
help
Enable support for RK3288 and RK3399 SoCs.
Enable support for RK3288, RK3328, and RK3399 SoCs.
1 change: 1 addition & 0 deletions drivers/staging/media/hantro/hantro_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,7 @@ static const struct v4l2_file_operations hantro_fops = {
static const struct of_device_id of_hantro_match[] = {
#ifdef CONFIG_VIDEO_HANTRO_ROCKCHIP
{ .compatible = "rockchip,rk3399-vpu", .data = &rk3399_vpu_variant, },
{ .compatible = "rockchip,rk3328-vpu", .data = &rk3328_vpu_variant, },
{ .compatible = "rockchip,rk3288-vpu", .data = &rk3288_vpu_variant, },
#endif
{ /* sentinel */ }
Expand Down
17 changes: 17 additions & 0 deletions drivers/staging/media/hantro/rk3399_vpu_hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,3 +184,20 @@ const struct hantro_variant rk3399_vpu_variant = {
.clk_names = rk3399_clk_names,
.num_clocks = ARRAY_SIZE(rk3399_clk_names)
};

static const struct hantro_irq rk3328_irqs[] = {
{ "vdpu", rk3399_vdpu_irq },
};

const struct hantro_variant rk3328_vpu_variant = {
.dec_offset = 0x400,
.dec_fmts = rk3399_vpu_dec_fmts,
.num_dec_fmts = ARRAY_SIZE(rk3399_vpu_dec_fmts),
.codec = HANTRO_MPEG2_DECODER,
.codec_ops = rk3399_vpu_codec_ops,
.irqs = rk3328_irqs,
.num_irqs = ARRAY_SIZE(rk3328_irqs),
.init = rk3399_vpu_hw_init,
.clk_names = rk3399_clk_names,
.num_clocks = ARRAY_SIZE(rk3399_clk_names),
};

0 comments on commit d3bfed3

Please sign in to comment.