Re: [PATCH v8 3/5] media: renesas: vsp1: Add support for VSP software version

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Biju,

On Tue, Apr 19, 2022 at 8:18 PM Biju Das <biju.das.jz@xxxxxxxxxxxxxx> wrote:
> The VSPD block on RZ/G2L does not have a version register.
>
> This patch adds support for adding VSP software version based on
> device match.
>
> Signed-off-by: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
> ---
> v8:
>  * New patch

Thanks for your patch!

> --- a/drivers/media/platform/renesas/vsp1/vsp1_drv.c
> +++ b/drivers/media/platform/renesas/vsp1/vsp1_drv.c
> @@ -812,11 +812,43 @@ static const struct vsp1_device_info vsp1_device_infos[] = {
>         },
>  };
>
> +static const struct vsp1_device_info *vsp1_lookup_info(struct vsp1_device *vsp1)
> +{
> +       const struct vsp1_device_info *info;
> +       unsigned int i;
> +
> +       /*
> +        * Try the info stored in match data first for devices that don't have
> +        * a version register.
> +        */
> +       info = of_device_get_match_data(vsp1->dev);
> +       if (info) {
> +               vsp1->version = VI6_IP_VERSION_VSP_SW | info->version | info->soc;
> +               return info;
> +       }
> +
> +       vsp1->version = vsp1_read(vsp1, VI6_IP_VERSION);
> +
> +       for (i = 0; i < ARRAY_SIZE(vsp1_device_infos); ++i) {
> +               info = &vsp1_device_infos[i];
> +
> +               if ((vsp1->version & VI6_IP_VERSION_MODEL_MASK) == info->version)
> +                       break;

return info? ...

> +       }
> +
> +       if (i == ARRAY_SIZE(vsp1_device_infos)) {

... so this check is no longer needed.

> +               dev_err(vsp1->dev, "unsupported IP version 0x%08x\n",
> +                       vsp1->version);
> +               return NULL;
> +       }
> +
> +       return info;
> +}

Reviewed-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

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



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux