Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: hantro: Add support for the Rockchip PX30

The PX30 SoC includes both the VDPU2 and VEPU2 blocks which are similar
to the RK3399 (Hantro G1/H1 with shuffled registers).

Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

authored by

Paul Kocialkowski and committed by
Mauro Carvalho Chehab
fb7cb344 1f82f2df

+19
+1
drivers/staging/media/hantro/hantro_drv.c
··· 582 582 583 583 static const struct of_device_id of_hantro_match[] = { 584 584 #ifdef CONFIG_VIDEO_HANTRO_ROCKCHIP 585 + { .compatible = "rockchip,px30-vpu", .data = &px30_vpu_variant, }, 585 586 { .compatible = "rockchip,rk3036-vpu", .data = &rk3036_vpu_variant, }, 586 587 { .compatible = "rockchip,rk3066-vpu", .data = &rk3066_vpu_variant, }, 587 588 { .compatible = "rockchip,rk3288-vpu", .data = &rk3288_vpu_variant, },
+1
drivers/staging/media/hantro/hantro_hw.h
··· 209 209 210 210 extern const struct hantro_variant imx8mq_vpu_g2_variant; 211 211 extern const struct hantro_variant imx8mq_vpu_variant; 212 + extern const struct hantro_variant px30_vpu_variant; 212 213 extern const struct hantro_variant rk3036_vpu_variant; 213 214 extern const struct hantro_variant rk3066_vpu_variant; 214 215 extern const struct hantro_variant rk3288_vpu_variant;
+17
drivers/staging/media/hantro/rockchip_vpu_hw.c
··· 548 548 .clk_names = rockchip_vpu_clk_names, 549 549 .num_clocks = ARRAY_SIZE(rockchip_vpu_clk_names) 550 550 }; 551 + 552 + const struct hantro_variant px30_vpu_variant = { 553 + .enc_offset = 0x0, 554 + .enc_fmts = rockchip_vpu_enc_fmts, 555 + .num_enc_fmts = ARRAY_SIZE(rockchip_vpu_enc_fmts), 556 + .dec_offset = 0x400, 557 + .dec_fmts = rk3399_vpu_dec_fmts, 558 + .num_dec_fmts = ARRAY_SIZE(rk3399_vpu_dec_fmts), 559 + .codec = HANTRO_JPEG_ENCODER | HANTRO_MPEG2_DECODER | 560 + HANTRO_VP8_DECODER | HANTRO_H264_DECODER, 561 + .codec_ops = rk3399_vpu_codec_ops, 562 + .irqs = rockchip_vpu2_irqs, 563 + .num_irqs = ARRAY_SIZE(rockchip_vpu2_irqs), 564 + .init = rk3036_vpu_hw_init, 565 + .clk_names = rockchip_vpu_clk_names, 566 + .num_clocks = ARRAY_SIZE(rockchip_vpu_clk_names) 567 + };