On 2019-05-29 10:11, Hans Verkuil wrote: > On 5/28/19 7:02 PM, Ezequiel Garcia wrote: >> From: Jonas Karlman <jonas@xxxxxxxxx> >> >> Add necessary bits to support MPEG2 decoding on RK3328. >> >> Signed-off-by: Jonas Karlman <jonas@xxxxxxxxx> >> Signed-off-by: Ezequiel Garcia <ezequiel@xxxxxxxxxxxxx> >> -- >> Changes from v5: >> * New patch. >> >> drivers/staging/media/rockchip/vpu/rk3399_vpu_hw.c | 12 ++++++++++++ >> .../staging/media/rockchip/vpu/rockchip_vpu_drv.c | 1 + >> drivers/staging/media/rockchip/vpu/rockchip_vpu_hw.h | 1 + >> 3 files changed, 14 insertions(+) >> >> diff --git a/drivers/staging/media/rockchip/vpu/rk3399_vpu_hw.c b/drivers/staging/media/rockchip/vpu/rk3399_vpu_hw.c >> index 2b3689968ef4..341f8d69c33d 100644 >> --- a/drivers/staging/media/rockchip/vpu/rk3399_vpu_hw.c >> +++ b/drivers/staging/media/rockchip/vpu/rk3399_vpu_hw.c >> @@ -175,3 +175,15 @@ const struct rockchip_vpu_variant rk3399_vpu_variant = { >> .clk_names = {"aclk", "hclk"}, >> .num_clocks = 2 >> }; >> + >> +const struct rockchip_vpu_variant rk3328_vpu_variant = { >> + .dec_offset = 0x400, >> + .dec_fmts = rk3399_vpu_dec_fmts, >> + .num_dec_fmts = ARRAY_SIZE(rk3399_vpu_dec_fmts), >> + .codec = RK_VPU_MPEG2_DECODER, >> + .codec_ops = rk3399_vpu_codec_ops, >> + .vdpu_irq = rk3399_vdpu_irq, >> + .init = rk3399_vpu_hw_init, >> + .clk_names = {"aclk", "hclk"}, >> + .num_clocks = 2 >> +}; >> diff --git a/drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c b/drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c >> index b94ff97451db..2e22009b6583 100644 >> --- a/drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c >> +++ b/drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c >> @@ -419,6 +419,7 @@ static const struct v4l2_file_operations rockchip_vpu_fops = { >> >> static const struct of_device_id of_rockchip_vpu_match[] = { >> { .compatible = "rockchip,rk3399-vpu", .data = &rk3399_vpu_variant, }, >> + { .compatible = "rockchip,rk3328-vpu", .data = &rk3328_vpu_variant, }, > This new compatible string should be documented in > Documentation/devicetree/bindings/media/rockchip-vpu.txt as well. > > I'll take patches 1-15 and drop this one. This patch can be merged once > the bindings file is updated as well. Looks like the bindings patch did not get picked for v6 :-) I am a bit unclear on how to handle patch submission that covers multiple subtrees. Should I send a single series including three patches: bindings update, this patch and device tree update? Or is a series with only bindings update and this patch preferred? Regards, Jonas > > Regards, > > Hans > >> { .compatible = "rockchip,rk3288-vpu", .data = &rk3288_vpu_variant, }, >> { /* sentinel */ } >> }; >> diff --git a/drivers/staging/media/rockchip/vpu/rockchip_vpu_hw.h b/drivers/staging/media/rockchip/vpu/rockchip_vpu_hw.h >> index 6cecb528f994..3d6b97af90fb 100644 >> --- a/drivers/staging/media/rockchip/vpu/rockchip_vpu_hw.h >> +++ b/drivers/staging/media/rockchip/vpu/rockchip_vpu_hw.h >> @@ -79,6 +79,7 @@ enum rockchip_vpu_enc_fmt { >> }; >> >> extern const struct rockchip_vpu_variant rk3399_vpu_variant; >> +extern const struct rockchip_vpu_variant rk3328_vpu_variant; >> extern const struct rockchip_vpu_variant rk3288_vpu_variant; >> >> void rockchip_vpu_watchdog(struct work_struct *work); >>