Re: [PATCH v3 3/4] media: mediatek: add MT8188 AIE driver

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

 



On Wed, 2024-12-25 at 17:00 +0800, bo.kong wrote:
> From: Bo Kong <Bo.Kong@xxxxxxxxxxxx>
> 
> Add a V4L2 sub-device driver for MT8188 AIE.
> 
> Signed-off-by: Bo Kong <Bo.Kong@xxxxxxxxxxxx>
> ---

[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;
> +}
> +





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux