[PATCH v3 3/4] media: mediatek: add MT8188 AIE driver
CK Hu (胡俊光)
ck.hu at mediatek.com
Thu Dec 26 21:56:18 PST 2024
On Wed, 2024-12-25 at 17:00 +0800, bo.kong wrote:
> From: Bo Kong <Bo.Kong at mediatek.com>
>
> Add a V4L2 sub-device driver for MT8188 AIE.
>
> Signed-off-by: Bo Kong <Bo.Kong at mediatek.com>
> ---
[snip]
> +static int aie_config_dram(struct mtk_aie_dev *fd, struct aie_enq_info *aie_cfg)
> +{
> + int ret = -EINVAL;
> +
> + if (aie_cfg->sel_mode == FDMODE) {
> + ret = aie_config_y2r(fd, aie_cfg, aie_cfg->sel_mode);
This code is identical with ATTRIBUTEMODE, so move this out of this if-case.
Regards,
CK
> + if (ret)
> + return ret;
> +
> + ret = aie_config_rs(fd, aie_cfg);
> + if (ret)
> + return ret;
> +
> + ret = aie_config_network(fd, aie_cfg);
> + if (ret)
> + return ret;
> +
> + } else if (aie_cfg->sel_mode == ATTRIBUTEMODE) {
> + ret = aie_config_y2r(fd, aie_cfg, aie_cfg->sel_mode);
> + if (ret)
> + return ret;
> +
> + ret = aie_config_attr_network(fd, aie_cfg);
> + if (ret)
> + return ret;
> + }
> +
> + return ret;
> +}
> +
More information about the Linux-mediatek
mailing list