Hi Geert, Thanks for the feedback. > Subject: Re: [PATCH v2 3/3] media: vsp1: Add support for RZ/G2L VSPD > > Hi Biju, > > On Thu, Mar 10, 2022 at 5:28 PM Biju Das <biju.das.jz@xxxxxxxxxxxxxx> > wrote: > > The RZ/G2L VSPD provides a single VSPD instance. It has the following > > sub modules MAU, CTU, RPF, DPR, LUT, BRS, WPF and LIF. > > > > The VSPD block on RZ/G2L does not have a version register, so added a > > new compatible string "renesas,rzg2l-vsp2" with a data pointer > > containing the info structure. Also the reset line is shared with the DU > module. > > > > Signed-off-by: Biju Das <biju.das.jz@xxxxxxxxxxxxxx> > > Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@xxxxxxxxxxxxxx> > > --- > > v1->v2: > > * Changed the compatible from vsp2-rzg2l->rzg2l-vsp2 > > * Added standalone device info for rzg2l-vsp2. > > * Added vsp1_lookup helper function. > > * Updated comments for LIF0 buffer attribute register > > * Used last ID for rzg2l-vsp2. > > Thanks for the update! > > > --- a/drivers/media/platform/vsp1/vsp1_drv.c > > +++ b/drivers/media/platform/vsp1/vsp1_drv.c > > @@ -814,11 +814,36 @@ static const struct vsp1_device_info > vsp1_device_infos[] = { > > }, > > }; > > > > +static const struct vsp1_device_info rzg2l_vsp2_device_info = { > > + .version = VI6_IP_VERSION_MODEL_VSPD_RZG2L, > > + .model = "VSP2-D", > > + .gen = 3, > > + .features = VSP1_HAS_BRS | VSP1_HAS_WPF_VFLIP | > VSP1_HAS_EXT_DL, > > + .lif_count = 1, > > + .rpf_count = 2, > > + .wpf_count = 1, > > +}; > > + > > +static const struct vsp1_device_info *vsp1_lookup(struct vsp1_device > *vsp1, > > + u32 version) { > > + unsigned int i; > > + > > + for (i = 0; i < ARRAY_SIZE(vsp1_device_infos); ++i) { > > + if ((vsp1->version & VI6_IP_VERSION_MODEL_MASK) == > > + version) { > > While moving this block, you replaced the wrong side of the comparison by > "version". Oops. OK will fix this in next version. Cheers, Biju > > > + vsp1->info = &vsp1_device_infos[i]; > > + break; > > + } > > > @@ -874,24 +899,21 @@ static int vsp1_probe(struct platform_device > *pdev) > > if (ret < 0) > > goto done; > > > > - vsp1->version = vsp1_read(vsp1, VI6_IP_VERSION); > > - > > - for (i = 0; i < ARRAY_SIZE(vsp1_device_infos); ++i) { > > - if ((vsp1->version & VI6_IP_VERSION_MODEL_MASK) == > > - vsp1_device_infos[i].version) { > > - vsp1->info = &vsp1_device_infos[i]; > > - break; > > - } > > + vsp1->info = of_device_get_match_data(&pdev->dev); > > + if (!vsp1->info) { > > + version = vsp1_read(vsp1, VI6_IP_VERSION); > > + vsp1->info = vsp1_lookup(vsp1, version); > > } > > The rest LGTM. > > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux- > m68k.org > > In personal conversations with technical people, I call myself a hacker. > But when I'm talking to journalists I just say "programmer" or something > like that. > -- Linus Torvalds